Class DependencyInjectionOptions
Options that influence the processing of IntroduceDependencyAttribute.
Namespace: Metalama.Extensions.DependencyInjection
Assembly: Metalama.Extensions.DependencyInjection.dll
Syntax
public sealed class DependencyInjectionOptions : ProjectExtension
Constructors
Name | Description |
---|---|
DependencyInjectionOptions() |
Properties
Name | Description |
---|---|
IsLazyByDefault | Gets or sets the default value for the IsLazy property of DependencyAttribute and IntroduceDependencyAttribute. |
IsRequiredByDefault | Gets or sets the default value for the IsRequired property of DependencyAttribute and IntroduceDependencyAttribute. |
RegisteredFrameworks | Gets or sets the list of frameworks that can be used to implement the IntroduceDependencyAttribute advice and DependencyAttribute aspect. |
Selector | Gets or sets a delegate that is called when several dependency injection frameworks have been registered for the current project and many vote to handle a given dependency. The default implementation is to return the first framework in the array. |
Methods
Name | Description |
---|---|
RegisterFramework(IDependencyInjectionFramework) | Registers an implementation of the IDependencyInjectionFramework interface with highest priority. The registration is ignored if another framework of the same was already registered. This method is typically called from the transitive project fabric of libraries that implement a specific dependency injection framework so that they are registered first by default. In a user project, you should rather set the RegisteredFrameworks property. |