aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Data/TypeMapper.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2019-03-12 16:37:18 +0100
committerGitHub <noreply@github.com>2019-03-12 16:37:18 +0100
commit3ddbda9aca3be9bf24a1c0c1f0052e5d9e35b7d8 (patch)
treecd92d645dea415bd148c344afccbdaa62316866f /Emby.Server.Implementations/Data/TypeMapper.cs
parentffd6dac03a94bb99387e84b447aa22ca92cf9465 (diff)
parent1fef8bf266480dc41cdf7ab80d1deac54dedad3d (diff)
Merge branch 'master' into xml
Diffstat (limited to 'Emby.Server.Implementations/Data/TypeMapper.cs')
-rw-r--r--Emby.Server.Implementations/Data/TypeMapper.cs9
1 files changed, 2 insertions, 7 deletions
diff --git a/Emby.Server.Implementations/Data/TypeMapper.cs b/Emby.Server.Implementations/Data/TypeMapper.cs
index 37c952e88..0e67affbf 100644
--- a/Emby.Server.Implementations/Data/TypeMapper.cs
+++ b/Emby.Server.Implementations/Data/TypeMapper.cs
@@ -1,7 +1,6 @@
using System;
using System.Collections.Concurrent;
using System.Linq;
-using MediaBrowser.Model.Reflection;
namespace Emby.Server.Implementations.Data
{
@@ -10,16 +9,13 @@ namespace Emby.Server.Implementations.Data
/// </summary>
public class TypeMapper
{
- private readonly IAssemblyInfo _assemblyInfo;
-
/// <summary>
/// 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>();
- public TypeMapper(IAssemblyInfo assemblyInfo)
+ public TypeMapper()
{
- _assemblyInfo = assemblyInfo;
}
/// <summary>
@@ -45,8 +41,7 @@ namespace Emby.Server.Implementations.Data
/// <returns>Type.</returns>
private Type LookupType(string typeName)
{
- return _assemblyInfo
- .GetCurrentAssemblies()
+ return AppDomain.CurrentDomain.GetAssemblies()
.Select(a => a.GetType(typeName))
.FirstOrDefault(t => t != null);
}