aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Data/TypeMapper.cs
diff options
context:
space:
mode:
authorVasily <JustAMan@users.noreply.github.com>2019-03-12 16:34:21 +0300
committerGitHub <noreply@github.com>2019-03-12 16:34:21 +0300
commit1fef8bf266480dc41cdf7ab80d1deac54dedad3d (patch)
treeb9a285c9388d1a229810fa658ab749594a6fbd08 /Emby.Server.Implementations/Data/TypeMapper.cs
parent0220309ea755d8f711da9076d6290a0e4462acc4 (diff)
parente91dd14b3167e3fcf12e24b4664d4d18cdad7d26 (diff)
Merge pull request #1060 from Bond-009/assinfo
Remove redundant class AssemblyInfo
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);
}