Specifies options for a dependency introduced by IntroduceDependency(IAdviser<INamedType>, IType, DependencyOptions?).
Implements
Namespace: Metalama.Extensions.DependencyInjection
Assembly: Metalama.Extensions.DependencyInjection.dll
Syntax
[CompileTime]
public sealed record DependencyOptions : IEquatable<DependencyOptions>Constructors
| Name | Description |
|---|---|
| DependencyOptions() |
Properties
| Name | Description |
|---|---|
| Default | Gets the default DependencyOptions instance. |
| IsLazy | Gets or sets a value indicating whether the dependency should be resolved lazily upon first use.
When set to |
| IsRequired | Gets or sets a value indicating whether the dependency is required. When set to |
| IsStatic | Gets or sets a value indicating whether the dependency field or property is static. |
| MemberKind | Gets or sets the kind of member to introduce, either Field or Property. The default is Field. |
| MemberName | Gets or sets the name of the field or property that will expose the dependency in the target type. |
Methods
| Name | Description |
|---|---|
| Equals(DependencyOptions?) | |
| Equals(object?) | |
| GetHashCode() | |
| ToString() |
Operators
| Name | Description |
|---|---|
| operator ==(DependencyOptions?, DependencyOptions?) | |
| operator !=(DependencyOptions?, DependencyOptions?) |