aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Data/TypeMapper.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2019-03-07 18:10:55 +0100
committerBond-009 <bond.009@outlook.com>2019-03-07 18:10:55 +0100
commite91dd14b3167e3fcf12e24b4664d4d18cdad7d26 (patch)
tree5ad850357ad094343d5071a4296cc60ac2a67b7a /Emby.Server.Implementations/Data/TypeMapper.cs
parent8a53b609127cca6feee06b34f12b6d21a9eb37c7 (diff)
Remove redundent 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);
}