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