using System;
namespace ZeroLevel.DependencyInjection
{
///
/// Methods for register contact resolvings
/// (singletones and multitones)
///
public interface IContainerRegister : IDisposable
{
#region Register
///
/// Dependency resolution registration
///
/// Contract
/// Dependency resolution
void Register();
///
/// Dependency resolution registration
///
/// Contract
/// Dependency resolution
/// Dependency name
void Register(string resolveName);
///
/// Dependency resolution registration
///
/// Contract
/// Dependency resolution
/// true - for singletone
void Register(bool shared);
///
/// Dependency resolution registration
///
/// Contract
/// Dependency resolution
/// Dependency name
/// true - for singletone
void Register(string resolveName, bool shared);
///
/// Dependency resolution registration
///
/// Contract
/// Dependency resolution
void Register(Type contractType, Type implementationType);
///
/// Dependency resolution registration
///
/// Contract
/// Dependency resolution
/// Dependency name
void Register(Type contractType, Type implementationType, string resolveName);
///
/// Dependency resolution registration
///
/// Contract
/// Dependency resolution
/// true - for singletone
void Register(Type contractType, Type implementationType, bool shared);
///
/// Dependency resolution registration
///
/// Contract
/// Dependency resolution
/// Dependency name
/// true - for singletone
void Register(Type contractType, Type implementationType, string resolveName, bool shared);
#endregion Register
#region Register with parameters
///
/// Dependency resolution registration with constructor parameters
///
/// Contract
/// Dependency resolution
/// Ctor args
void ParameterizedRegister(object[] constructorParameters);
///
/// Dependency resolution registration with constructor parameters
///
/// Contract
/// Dependency resolution
/// Dependency name
/// Ctor args
void ParameterizedRegister(string resolveName, object[] constructorParameters);
///
/// Dependency resolution registration with constructor parameters
///
/// Contract
/// Dependency resolution
/// true - for singletone
/// Ctor args
void ParameterizedRegister(bool shared, object[] constructorParameters);
///
/// Dependency resolution registration with constructor parameters
///
/// Contract
/// Dependency resolution
/// Dependency name
/// true - for singletone
/// Ctor args
void ParameterizedRegister(string resolveName, bool shared, object[] constructorParameters);
///
/// Dependency resolution registration with constructor parameters
///
/// Contract
/// Dependency resolution
/// Ctor args
void ParameterizedRegister(Type contractType, Type implementationType, object[] constructorParameters);
///
/// Dependency resolution registration with constructor parameters
///
/// Contract
/// Dependency resolution
/// Dependency name
/// Ctor args
void ParameterizedRegister(Type contractType, Type implementationType, string resolveName, object[] constructorParameters);
///
/// Dependency resolution registration with constructor parameters
///
/// Contract
/// Dependency resolution
/// true - for singletone
/// Ctor args
void ParameterizedRegister(Type contractType, Type implementationType, bool shared, object[] constructorParameters);
///
/// Dependency resolution registration with constructor parameters
///
/// Contract
/// Dependency resolution
/// Dependency name
/// true - for singletone
/// Ctor args
void ParameterizedRegister(Type contractType, Type implementationType, string resolveName, bool shared, object[] constructorParameters);
#endregion Register with parameters
#region Safe register
///
/// Safe dependency resolution registration
///
/// Contract
/// Dependency resolution
/// Error handler
/// true - registration successfully completed
bool TryRegister(Action fallback = null!);
///
/// Safe dependency resolution registration
///
/// Contract
/// Dependency resolution
/// Dependency name
/// Error handler
/// true - registration successfully completed
bool TryRegister(string resolveName, Action fallback = null!);
///
/// Safe dependency resolution registration
///
/// Contract
/// Dependency resolution
/// true - for singletone
/// Error handler
/// true - registration successfully completed
bool TryRegister(bool shared, Action fallback = null!);
///
/// Safe dependency resolution registration
///
/// Contract
/// Dependency resolution
/// Dependency name
/// true - for singletone
/// Error handler
/// true - registration successfully completed
bool TryRegister(string resolveName, bool shared, Action fallback = null!);
///
/// Safe dependency resolution registration
///
/// Contract
/// Dependency resolution
/// Error handler
/// true - registration successfully completed
bool TryRegister(Type contractType, Type implementationType, Action fallback = null!);
///
/// Safe dependency resolution registration
///
/// Contract
/// Dependency resolution
/// Dependency name
/// Error handler
/// true - registration successfully completed
bool TryRegister(Type contractType, Type implementationType, string resolveName, Action fallback = null!);
///
/// Safe dependency resolution registration
///
/// Contract
/// Dependency resolution
/// true - for singletone
/// Error handler
/// true - registration successfully completed
bool TryRegister(Type contractType, Type implementationType, bool shared, Action fallback = null!);
///
/// Safe dependency resolution registration
///
/// Contract
/// Dependency resolution
/// Dependency name
/// true - for singletone
/// Error handler
/// true - registration successfully completed
bool TryRegister(Type contractType, Type implementationType, string resolveName, bool shared, Action fallback = null!);
#endregion Safe register
#region Safe register with parameters
///
/// Safe dependency resolution registration with constructor parameters
///
/// Contract
/// Dependency resolution
/// Ctor args
/// Error handler
/// true - registration successfully completed
bool TryParameterizedRegister(object[] constructorParameters, Action fallback = null!);
///
/// Safe dependency resolution registration with constructor parameters
///
/// Contract
/// Dependency resolution
/// Dependency name
/// Ctor args
/// Error handler
/// true - registration successfully completed
bool TryParameterizedRegister(string resolveName, object[] constructorParameters, Action fallback = null!);
///
/// Safe dependency resolution registration with constructor parameters
///
/// Contract
/// Dependency resolution
/// true - for singletone
/// Ctor args
/// Error handler
/// true - registration successfully completed
bool TryParameterizedRegister(bool shared, object[] constructorParameters, Action fallback = null!);
///
/// Safe dependency resolution registration with constructor parameters
///
/// Contract
/// Dependency resolution
/// Dependency name
/// true - for singletone
/// Ctor args
/// Error handler
/// true - registration successfully completed
bool TryParameterizedRegister(string resolveName, bool shared, object[] constructorParameters, Action fallback = null!);
///
/// Safe dependency resolution registration with constructor parameters
///
/// Contract
/// Dependency resolution
/// Ctor args
/// Error handler
/// true - registration successfully completed
bool TryParameterizedRegister(Type contractType, Type implementationType, object[] constructorParameters, Action fallback = null!);
///
/// Safe dependency resolution registration with constructor parameters
///
/// Contract
/// Dependency resolution
/// Dependency name
/// Ctor args
/// Error handler
/// true - registration successfully completed
bool TryParameterizedRegister(Type contractType, Type implementationType, string resolveName, object[] constructorParameters, Action fallback = null!);
///
/// Safe dependency resolution registration with constructor parameters
///
/// Contract
/// Dependency resolution
/// true - for singletone
/// Ctor args
/// Error handler
/// true - registration successfully completed
bool TryParameterizedRegister(Type contractType, Type implementationType, bool shared, object[] constructorParameters, Action fallback = null!);
///
/// Safe dependency resolution registration with constructor parameters
///
/// Contract
/// Dependency resolution
/// Dependency name
/// true - for singletone
/// Ctor args
/// Error handler
/// true - registration successfully completed
bool TryParameterizedRegister(Type contractType, Type implementationType, string resolveName, bool shared, object[] constructorParameters, Action fallback = null!);
#endregion Safe register with parameters
}
}