mirror of https://github.com/ogoun/Zero.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.6 KiB
46 lines
1.6 KiB
using System;
|
|
|
|
namespace ZeroLevel.DependencyInjection
|
|
{
|
|
/// <summary>
|
|
/// Methods for register contact implementations
|
|
/// (singletone)
|
|
/// </summary>
|
|
public interface IContainerInstanceRegister
|
|
{
|
|
#region Register instance
|
|
|
|
/// <summary>
|
|
/// Register instance for contract <typeparamref name="TContract"/>. (singletone)
|
|
/// </summary>
|
|
/// <typeparam name="TContract">Contract</typeparam>
|
|
/// <param name="implementation">Instance</param>
|
|
void Register<TContract>(TContract implementation);
|
|
|
|
/// <summary>
|
|
/// Register instance for contract <typeparamref name="TContract"/>. (singletone)
|
|
/// </summary>
|
|
/// <typeparam name="TContract">Contract</typeparam>
|
|
/// <param name="implementation">Instance</param>
|
|
/// <param name="resolveName">Dependency name</param>
|
|
void Register<TContract>(TContract implementation, string resolveName);
|
|
|
|
/// <summary>
|
|
/// Register instance for contract (singletone)
|
|
/// </summary>
|
|
/// <param name="contractType">Contract</param>
|
|
/// <param name="implementation">Instance</param>
|
|
void Register(Type contractType, object implementation);
|
|
|
|
/// <summary>
|
|
/// Register instance for contract (singletone)
|
|
/// </summary>
|
|
/// <param name="contractType">Contract</param>
|
|
/// <param name="resolveName">Dependency name</param>
|
|
/// <param name="implementation">Instance</param>
|
|
void Register(Type contractType, string resolveName, object implementation);
|
|
|
|
#endregion Register instance
|
|
|
|
}
|
|
} |