mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
fixed diskscan
removed all stored status fields from episode
This commit is contained in:
parent
feb947fb74
commit
cbe4be814c
32 changed files with 295 additions and 286 deletions
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using TinyIoC;
|
||||
|
||||
namespace NzbDrone.Common.Composition
|
||||
|
@ -7,10 +8,12 @@ namespace NzbDrone.Common.Composition
|
|||
public class Container : IContainer
|
||||
{
|
||||
private readonly TinyIoCContainer _container;
|
||||
private readonly List<Type> _loadedTypes;
|
||||
|
||||
public Container(TinyIoCContainer container)
|
||||
public Container(TinyIoCContainer container, List<Type> loadedTypes)
|
||||
{
|
||||
_container = container;
|
||||
_loadedTypes = loadedTypes;
|
||||
_container.Register<IContainer>(this);
|
||||
}
|
||||
|
||||
|
@ -92,5 +95,15 @@ namespace NzbDrone.Common.Composition
|
|||
{
|
||||
return _container.CanResolve(type);
|
||||
}
|
||||
|
||||
public IEnumerable<Type> GetImplementations(Type contractType)
|
||||
{
|
||||
return _loadedTypes
|
||||
.Where(implementation =>
|
||||
contractType.IsAssignableFrom(implementation) &&
|
||||
!implementation.IsInterface &&
|
||||
!implementation.IsAbstract
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue