mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-16 02:18:54 -07:00
Merge pull request #4775 from barronpm/nullable-jellyfinserverimplementations
Enable Nullable for Jellyfin.Server.Implementations
This commit is contained in:
commit
cb36feaa0f
@ -27,7 +27,7 @@ namespace Jellyfin.Server.Implementations.Activity
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public event EventHandler<GenericEventArgs<ActivityLogEntry>> EntryCreated;
|
||||
public event EventHandler<GenericEventArgs<ActivityLogEntry>>? EntryCreated;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public async Task CreateAsync(ActivityLog entry)
|
||||
|
@ -86,7 +86,7 @@ namespace Jellyfin.Server.Implementations.Events.Consumers.Session
|
||||
return name;
|
||||
}
|
||||
|
||||
private static string GetPlaybackNotificationType(string mediaType)
|
||||
private static string? GetPlaybackNotificationType(string mediaType)
|
||||
{
|
||||
if (string.Equals(mediaType, MediaType.Audio, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
|
@ -94,7 +94,7 @@ namespace Jellyfin.Server.Implementations.Events.Consumers.Session
|
||||
return name;
|
||||
}
|
||||
|
||||
private static string GetPlaybackStoppedNotificationType(string mediaType)
|
||||
private static string? GetPlaybackStoppedNotificationType(string mediaType)
|
||||
{
|
||||
if (string.Equals(mediaType, MediaType.Audio, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
|
@ -5,6 +5,7 @@
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
|
@ -1,3 +1,4 @@
|
||||
#nullable disable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
|
@ -1,5 +1,3 @@
|
||||
#nullable enable
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
@ -1,5 +1,3 @@
|
||||
#nullable enable
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
@ -1,5 +1,4 @@
|
||||
#nullable enable
|
||||
#pragma warning disable CS1591
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System.Threading.Tasks;
|
||||
using Jellyfin.Data.Entities;
|
||||
|
@ -1,5 +1,3 @@
|
||||
#nullable enable
|
||||
|
||||
using System.Threading.Tasks;
|
||||
using Jellyfin.Data.Entities;
|
||||
using MediaBrowser.Controller.Authentication;
|
||||
|
@ -1,5 +1,4 @@
|
||||
#nullable enable
|
||||
#pragma warning disable CA1307
|
||||
#pragma warning disable CA1307
|
||||
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
|
@ -13,9 +13,9 @@ namespace Jellyfin.Server.Implementations.ValueConverters
|
||||
/// </summary>
|
||||
/// <param name="kind">The kind to specify.</param>
|
||||
/// <param name="mappingHints">The mapping hints.</param>
|
||||
public DateTimeKindValueConverter(DateTimeKind kind, ConverterMappingHints mappingHints = null)
|
||||
public DateTimeKindValueConverter(DateTimeKind kind, ConverterMappingHints? mappingHints = null)
|
||||
: base(v => v.ToUniversalTime(), v => DateTime.SpecifyKind(v, kind), mappingHints)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user