mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-18 06:53:07 +03:00
Remove redundent class AssemblyInfo
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user