Class ApplicationDependencyInjector
Implements base app dependency injection services
Inheritance
System.Object
ApplicationDependencyInjector
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Azos.Apps.Injection
Assembly: Azos.dll
Syntax
public class ApplicationDependencyInjector : ApplicationComponent, IApplicationDependencyInjectorImplementation, IApplicationDependencyInjector, IApplicationComponent, IConfigurable, IDisposable
Constructors
ApplicationDependencyInjector(IApplication)
Declaration
public ApplicationDependencyInjector(IApplication app)
Parameters
Type | Name | Description |
---|---|---|
IApplication | app |
Properties
ComponentLogTopic
Declaration
public override string ComponentLogTopic { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
Methods
DoConfigure(IConfigSectionNode)
Override to perform custom configuration
Declaration
protected virtual void DoConfigure(IConfigSectionNode node)
Parameters
Type | Name | Description |
---|---|---|
IConfigSectionNode | node |
DoInjectInto(Object)
Injects app context into target checking for IApplicationInjection first, then uses Injector(type) to inject into specific type
Declaration
protected virtual void DoInjectInto(object target)
Parameters
Type | Name | Description |
---|---|---|
System.Object | target |
GetApplicationRoots()
Enumerates app injectable roots (root application chassis objects). This method is usually used by [Inject]-derived attributes for defaults
Declaration
public virtual IEnumerable<object> GetApplicationRoots()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Object> |
GetInjector(Type)
Creates injector for the specified type if the type was not injected yet, otherwise returns an existing injector
Declaration
protected TypeInjector GetInjector(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type |
Returns
Type | Description |
---|---|
TypeInjector |
InjectInto(Object)
Performs Injection into target fields decorated with [Inject] attribute
Declaration
public void InjectInto(object target)
Parameters
Type | Name | Description |
---|---|---|
System.Object | target |
MakeInjector(Type)
Factory method that makes instance of Injector. Override to create custom injectors
Declaration
protected virtual TypeInjector MakeInjector(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type |
Returns
Type | Description |
---|---|
TypeInjector |
Explicit Interface Implementations
IConfigurable.Configure(IConfigSectionNode)
Declaration
void IConfigurable.Configure(IConfigSectionNode node)
Parameters
Type | Name | Description |
---|---|---|
IConfigSectionNode | node |
Implements
System.IDisposable