@ -9,12 +9,14 @@ namespace ZeroLevel.Patterns.DependencyInjection
public interface IContainerRegister : IDisposable
{
#region Register
/// <summary>
/// Dependency resolution registration
/// </summary>
/// <typeparam name="TContract">Contract</typeparam>
/// <typeparam name="TImplementation">Dependency resolution</typeparam>
void Register < TContract , TImplementation > ( ) ;
/// <summary>
/// Dependency resolution registration
/// </summary>
@ -22,6 +24,7 @@ namespace ZeroLevel.Patterns.DependencyInjection
/// <typeparam name="TImplementation">Dependency resolution</typeparam>
/// <param name="resolveName">Dependency name</param>
void Register < TContract , TImplementation > ( string resolveName ) ;
/// <summary>
/// Dependency resolution registration
/// </summary>
@ -29,6 +32,7 @@ namespace ZeroLevel.Patterns.DependencyInjection
/// <typeparam name="TImplementation">Dependency resolution</typeparam>
/// <param name="shared">true - for singletone</param>
void Register < TContract , TImplementation > ( bool shared ) ;
/// <summary>
/// Dependency resolution registration
/// </summary>
@ -44,6 +48,7 @@ namespace ZeroLevel.Patterns.DependencyInjection
/// <param name="contractType">Contract</param>
/// <param name="implementationType">Dependency resolution</param>
void Register ( Type contractType , Type implementationType ) ;
/// <summary>
/// Dependency resolution registration
/// </summary>
@ -51,6 +56,7 @@ namespace ZeroLevel.Patterns.DependencyInjection
/// <param name="implementationType">Dependency resolution</param>
/// <param name="resolveName">Dependency name</param>
void Register ( Type contractType , Type implementationType , string resolveName ) ;
/// <summary>
/// Dependency resolution registration
/// </summary>
@ -58,6 +64,7 @@ namespace ZeroLevel.Patterns.DependencyInjection
/// <param name="implementationType">Dependency resolution</param>
/// <param name="shared">true - for singletone</param>
void Register ( Type contractType , Type implementationType , bool shared ) ;
/// <summary>
/// Dependency resolution registration
/// </summary>
@ -66,9 +73,11 @@ namespace ZeroLevel.Patterns.DependencyInjection
/// <param name="resolveName">Dependency name</param>
/// <param name="shared">true - for singletone</param>
void Register ( Type contractType , Type implementationType , string resolveName , bool shared ) ;
# endregion
#endregion Register
#region Register with parameters
/// <summary>
/// Dependency resolution registration with constructor parameters
/// </summary>
@ -76,6 +85,7 @@ namespace ZeroLevel.Patterns.DependencyInjection
/// <typeparam name="TImplementation">Dependency resolution</typeparam>
/// <param name="constructorParameters">Ctor args</param>
void ParameterizedRegister < TContract , TImplementation > ( object [ ] constructorParameters ) ;
/// <summary>
/// Dependency resolution registration with constructor parameters
/// </summary>
@ -84,6 +94,7 @@ namespace ZeroLevel.Patterns.DependencyInjection
/// <param name="resolveName">Dependency name</param>
/// <param name="constructorParameters">Ctor args</param>
void ParameterizedRegister < TContract , TImplementation > ( string resolveName , object [ ] constructorParameters ) ;
/// <summary>
/// Dependency resolution registration with constructor parameters
/// </summary>
@ -92,6 +103,7 @@ namespace ZeroLevel.Patterns.DependencyInjection
/// <param name="shared">true - for singletone</param>
/// <param name="constructorParameters">Ctor args</param>
void ParameterizedRegister < TContract , TImplementation > ( bool shared , object [ ] constructorParameters ) ;
/// <summary>
/// Dependency resolution registration with constructor parameters
/// </summary>
@ -101,6 +113,7 @@ namespace ZeroLevel.Patterns.DependencyInjection
/// <param name="shared">true - for singletone</param>
/// <param name="constructorParameters">Ctor args</param>
void ParameterizedRegister < TContract , TImplementation > ( string resolveName , bool shared , object [ ] constructorParameters ) ;
/// <summary>
/// Dependency resolution registration with constructor parameters
/// </summary>
@ -108,6 +121,7 @@ namespace ZeroLevel.Patterns.DependencyInjection
/// <param name="implementationType">Dependency resolution</param>
/// <param name="constructorParameters">Ctor args</param>
void ParameterizedRegister ( Type contractType , Type implementationType , object [ ] constructorParameters ) ;
/// <summary>
/// Dependency resolution registration with constructor parameters
/// </summary>
@ -116,6 +130,7 @@ namespace ZeroLevel.Patterns.DependencyInjection
/// <param name="resolveName">Dependency name</param>
/// <param name="constructorParameters">Ctor args</param>
void ParameterizedRegister ( Type contractType , Type implementationType , string resolveName , object [ ] constructorParameters ) ;
/// <summary>
/// Dependency resolution registration with constructor parameters
/// </summary>
@ -124,6 +139,7 @@ namespace ZeroLevel.Patterns.DependencyInjection
/// <param name="shared">true - for singletone</param>
/// <param name="constructorParameters">Ctor args</param>
void ParameterizedRegister ( Type contractType , Type implementationType , bool shared , object [ ] constructorParameters ) ;
/// <summary>
/// Dependency resolution registration with constructor parameters
/// </summary>
@ -133,9 +149,11 @@ namespace ZeroLevel.Patterns.DependencyInjection
/// <param name="shared">true - for singletone</param>
/// <param name="constructorParameters">Ctor args</param>
void ParameterizedRegister ( Type contractType , Type implementationType , string resolveName , bool shared , object [ ] constructorParameters ) ;
# endregion
#endregion Register with parameters
#region Safe register
/// <summary>
/// Safe dependency resolution registration
/// </summary>
@ -144,6 +162,7 @@ namespace ZeroLevel.Patterns.DependencyInjection
/// <param name="fallback">Error handler</param>
/// <returns>true - registration successfully completed</returns>
bool TryRegister < TContract , TImplementation > ( Action < Exception > fallback = null ) ;
/// <summary>
/// Safe dependency resolution registration
/// </summary>
@ -153,6 +172,7 @@ namespace ZeroLevel.Patterns.DependencyInjection
/// <param name="fallback">Error handler</param>
/// <returns>true - registration successfully completed</returns>
bool TryRegister < TContract , TImplementation > ( string resolveName , Action < Exception > fallback = null ) ;
/// <summary>
/// Safe dependency resolution registration
/// </summary>
@ -162,6 +182,7 @@ namespace ZeroLevel.Patterns.DependencyInjection
/// <param name="fallback">Error handler</param>
/// <returns>true - registration successfully completed</returns>
bool TryRegister < TContract , TImplementation > ( bool shared , Action < Exception > fallback = null ) ;
/// <summary>
/// Safe dependency resolution registration
/// </summary>
@ -172,6 +193,7 @@ namespace ZeroLevel.Patterns.DependencyInjection
/// <param name="fallback">Error handler</param>
/// <returns>true - registration successfully completed</returns>
bool TryRegister < TContract , TImplementation > ( string resolveName , bool shared , Action < Exception > fallback = null ) ;
/// <summary>
/// Safe dependency resolution registration
/// </summary>
@ -180,6 +202,7 @@ namespace ZeroLevel.Patterns.DependencyInjection
/// <param name="fallback">Error handler</param>
/// <returns>true - registration successfully completed</returns>
bool TryRegister ( Type contractType , Type implementationType , Action < Exception > fallback = null ) ;
/// <summary>
/// Safe dependency resolution registration
/// </summary>
@ -189,6 +212,7 @@ namespace ZeroLevel.Patterns.DependencyInjection
/// <param name="fallback">Error handler</param>
/// <returns>true - registration successfully completed</returns>
bool TryRegister ( Type contractType , Type implementationType , string resolveName , Action < Exception > fallback = null ) ;
/// <summary>
/// Safe dependency resolution registration
/// </summary>
@ -198,6 +222,7 @@ namespace ZeroLevel.Patterns.DependencyInjection
/// <param name="fallback">Error handler</param>
/// <returns>true - registration successfully completed</returns>
bool TryRegister ( Type contractType , Type implementationType , bool shared , Action < Exception > fallback = null ) ;
/// <summary>
/// Safe dependency resolution registration
/// </summary>
@ -208,9 +233,11 @@ namespace ZeroLevel.Patterns.DependencyInjection
/// <param name="fallback">Error handler</param>
/// <returns>true - registration successfully completed</returns>
bool TryRegister ( Type contractType , Type implementationType , string resolveName , bool shared , Action < Exception > fallback = null ) ;
# endregion
#endregion Safe register
#region Safe register with parameters
/// <summary>
/// Safe dependency resolution registration with constructor parameters
/// </summary>
@ -220,6 +247,7 @@ namespace ZeroLevel.Patterns.DependencyInjection
/// <param name="fallback">Error handler</param>
/// <returns>true - registration successfully completed</returns>
bool TryParameterizedRegister < TContract , TImplementation > ( object [ ] constructorParameters , Action < Exception > fallback = null ) ;
/// <summary>
/// Safe dependency resolution registration with constructor parameters
/// </summary>
@ -230,6 +258,7 @@ namespace ZeroLevel.Patterns.DependencyInjection
/// <param name="fallback">Error handler</param>
/// <returns>true - registration successfully completed</returns>
bool TryParameterizedRegister < TContract , TImplementation > ( string resolveName , object [ ] constructorParameters , Action < Exception > fallback = null ) ;
/// <summary>
/// Safe dependency resolution registration with constructor parameters
/// </summary>
@ -240,6 +269,7 @@ namespace ZeroLevel.Patterns.DependencyInjection
/// <param name="fallback">Error handler</param>
/// <returns>true - registration successfully completed</returns>
bool TryParameterizedRegister < TContract , TImplementation > ( bool shared , object [ ] constructorParameters , Action < Exception > fallback = null ) ;
/// <summary>
/// Safe dependency resolution registration with constructor parameters
/// </summary>
@ -251,6 +281,7 @@ namespace ZeroLevel.Patterns.DependencyInjection
/// <param name="fallback">Error handler</param>
/// <returns>true - registration successfully completed</returns>
bool TryParameterizedRegister < TContract , TImplementation > ( string resolveName , bool shared , object [ ] constructorParameters , Action < Exception > fallback = null ) ;
/// <summary>
/// Safe dependency resolution registration with constructor parameters
/// </summary>
@ -260,6 +291,7 @@ namespace ZeroLevel.Patterns.DependencyInjection
/// <param name="fallback">Error handler</param>
/// <returns>true - registration successfully completed</returns>
bool TryParameterizedRegister ( Type contractType , Type implementationType , object [ ] constructorParameters , Action < Exception > fallback = null ) ;
/// <summary>
/// Safe dependency resolution registration with constructor parameters
/// </summary>
@ -270,6 +302,7 @@ namespace ZeroLevel.Patterns.DependencyInjection
/// <param name="fallback">Error handler</param>
/// <returns>true - registration successfully completed</returns>
bool TryParameterizedRegister ( Type contractType , Type implementationType , string resolveName , object [ ] constructorParameters , Action < Exception > fallback = null ) ;
/// <summary>
/// Safe dependency resolution registration with constructor parameters
/// </summary>
@ -280,6 +313,7 @@ namespace ZeroLevel.Patterns.DependencyInjection
/// <param name="fallback">Error handler</param>
/// <returns>true - registration successfully completed</returns>
bool TryParameterizedRegister ( Type contractType , Type implementationType , bool shared , object [ ] constructorParameters , Action < Exception > fallback = null ) ;
/// <summary>
/// Safe dependency resolution registration with constructor parameters
/// </summary>
@ -291,6 +325,7 @@ namespace ZeroLevel.Patterns.DependencyInjection
/// <param name="fallback">Error handler</param>
/// <returns>true - registration successfully completed</returns>
bool TryParameterizedRegister ( Type contractType , Type implementationType , string resolveName , bool shared , object [ ] constructorParameters , Action < Exception > fallback = null ) ;
# endregion
#endregion Safe register with parameters
}
}