2016-11-20 13:34:50 +00:00
|
|
|
|
using System;
|
2017-01-31 11:01:08 +00:00
|
|
|
|
using Tapeti.Config;
|
2016-11-20 13:34:50 +00:00
|
|
|
|
|
|
|
|
|
namespace Tapeti
|
|
|
|
|
{
|
|
|
|
|
public interface IDependencyResolver
|
|
|
|
|
{
|
|
|
|
|
T Resolve<T>() where T : class;
|
2016-12-11 14:08:58 +00:00
|
|
|
|
object Resolve(Type type);
|
2016-11-20 13:34:50 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2017-01-31 11:01:08 +00:00
|
|
|
|
public interface IDependencyContainer : IDependencyResolver
|
2016-11-20 13:34:50 +00:00
|
|
|
|
{
|
2016-12-11 14:08:58 +00:00
|
|
|
|
void RegisterDefault<TService, TImplementation>() where TService : class where TImplementation : class, TService;
|
|
|
|
|
void RegisterPublisher(Func<IPublisher> publisher);
|
2017-01-31 11:01:08 +00:00
|
|
|
|
void RegisterConfig(IConfig config);
|
2016-11-20 13:34:50 +00:00
|
|
|
|
void RegisterController(Type type);
|
|
|
|
|
}
|
|
|
|
|
}
|