mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
back to tiny for now
This commit is contained in:
parent
2912561d0e
commit
4deecde092
84 changed files with 617 additions and 558 deletions
30
NzbDrone.Common/Composition/IContainer.cs
Normal file
30
NzbDrone.Common/Composition/IContainer.cs
Normal file
|
@ -0,0 +1,30 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using TinyIoC;
|
||||
|
||||
namespace NzbDrone.Common.Composition
|
||||
{
|
||||
public interface IContainer
|
||||
{
|
||||
TinyIoCContainer TinyContainer { get; }
|
||||
void Register<T>(T instance) where T : class;
|
||||
|
||||
void Register<TService, TImplementation>()
|
||||
where TImplementation : class, TService
|
||||
where TService : class;
|
||||
T Resolve<T>() where T : class;
|
||||
object Resolve(Type type);
|
||||
void Register(Type serviceType, Type implementationType);
|
||||
void Register<TService>(Func<IContainer, TService> factory) where TService : class;
|
||||
void RegisterSingleton<TService, TImplementation>()
|
||||
where TImplementation : class, TService
|
||||
where TService : class;
|
||||
void RegisterSingleton<T>() where T : class;
|
||||
void RegisterSingleton(Type service, Type implementation);
|
||||
IEnumerable<T> ResolveAll<T>() where T : class;
|
||||
IEnumerable<object> ResolveAll(Type type);
|
||||
void Register(Type registrationType, object instance);
|
||||
void RegisterAll(Type registrationType, IEnumerable<Type> implementationList);
|
||||
bool IsTypeRegistered(Type type);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue