using System; using System.Reflection; namespace Abp.Dependency { /// /// Define interface for classes those are used to register dependencies. /// public interface IIocRegistrar { /// /// Adds a dependency registrar for conventional registration. /// /// dependency registrar void AddConventionalRegistrar(IConventionalDependencyRegistrar registrar); /// /// Registers types of given assembly by all conventional registrars. See method. /// /// Assembly to register void RegisterAssemblyByConvention(Assembly assembly); /// /// Registers types of given assembly by all conventional registrars. See method. /// /// Assembly to register /// Additional configuration void RegisterAssemblyByConvention(Assembly assembly, ConventionalRegistrationConfig config); /// /// Registers a type as self registration. /// /// Type of the class /// Lifestyle of the objects of this type void Register(DependencyLifeStyle lifeStyle = DependencyLifeStyle.Singleton) where T : class; /// /// Registers a type as self registration. /// /// Type of the class /// Lifestyle of the objects of this type void Register(Type type, DependencyLifeStyle lifeStyle = DependencyLifeStyle.Singleton); /// /// Registers a type with it's implementation. /// /// Registering type /// The type that implements /// Lifestyle of the objects of this type void Register(DependencyLifeStyle lifeStyle = DependencyLifeStyle.Singleton) where TType : class where TImpl : class, TType; /// /// Registers a type with it's implementation. /// /// Type of the class /// The type that implements /// Lifestyle of the objects of this type void Register(Type type, Type impl, DependencyLifeStyle lifeStyle = DependencyLifeStyle.Singleton); /// /// Checks whether given type is registered before. /// /// Type to check bool IsRegistered(Type type); /// /// Checks whether given type is registered before. /// /// Type to check bool IsRegistered(); } }