aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Data/TypeMapper.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2021-05-21 13:05:03 +0200
committerGitHub <noreply@github.com>2021-05-21 13:05:03 +0200
commitd61530eb4b07ec19116773cdae1bb0d4cfa5d3d5 (patch)
treef95281f1b7c50e0f69a94a98a52acc682819a511 /Emby.Server.Implementations/Data/TypeMapper.cs
parenta937a854f2582a8770d9ada7c24375065a21f7a5 (diff)
parent7e8428e588b3f0a0574da44081098c64fe1a47d7 (diff)
Merge pull request #6083 from Bond-009/nullable4
Enable nullable reference types for Emby.Server.Implementations
Diffstat (limited to 'Emby.Server.Implementations/Data/TypeMapper.cs')
-rw-r--r--Emby.Server.Implementations/Data/TypeMapper.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/Data/TypeMapper.cs b/Emby.Server.Implementations/Data/TypeMapper.cs
index 7044b1d19..7f1306d15 100644
--- a/Emby.Server.Implementations/Data/TypeMapper.cs
+++ b/Emby.Server.Implementations/Data/TypeMapper.cs
@@ -13,7 +13,7 @@ namespace Emby.Server.Implementations.Data
/// This holds all the types in the running assemblies
/// so that we can de-serialize properly when we don't have strong types.
/// </summary>
- private readonly ConcurrentDictionary<string, Type> _typeMap = new ConcurrentDictionary<string, Type>();
+ private readonly ConcurrentDictionary<string, Type?> _typeMap = new ConcurrentDictionary<string, Type?>();
/// <summary>
/// Gets the type.
@@ -21,7 +21,7 @@ namespace Emby.Server.Implementations.Data
/// <param name="typeName">Name of the type.</param>
/// <returns>Type.</returns>
/// <exception cref="ArgumentNullException"><c>typeName</c> is null.</exception>
- public Type GetType(string typeName)
+ public Type? GetType(string typeName)
{
if (string.IsNullOrEmpty(typeName))
{
@@ -36,7 +36,7 @@ namespace Emby.Server.Implementations.Data
/// </summary>
/// <param name="typeName">Name of the type.</param>
/// <returns>Type.</returns>
- private Type LookupType(string typeName)
+ private Type? LookupType(string typeName)
{
return AppDomain.CurrentDomain.GetAssemblies()
.Select(a => a.GetType(typeName))