IntroduceDependency(IAdviser<INamedType>, IType, DependencyOptions?)
Introduces a dependency into a type.
Declaration
public static IntroduceDependencyResult IntroduceDependency(this IAdviser<INamedType> adviser, IType dependencyType, DependencyOptions? options = null)Parameters
| Type | Name | Description |
|---|---|---|
| IAdviser<INamedType> | adviser | The adviser for the target type. |
| IType | dependencyType | The type of the dependency to introduce. |
| DependencyOptions | options | Options for configuring the dependency, or |
Returns
| Type | Description |
|---|---|
| IntroduceDependencyResult | The result of the introduction operation. Use Declaration to access the introduced field or property. |
See Also
IntroduceDependency(IAdviser<INamedType>, Type, DependencyOptions?)
Introduces a dependency into a type using a reflection Type.
Declaration
public static IntroduceDependencyResult IntroduceDependency(this IAdviser<INamedType> adviser, Type dependencyType, DependencyOptions? options = null)Parameters
| Type | Name | Description |
|---|---|---|
| IAdviser<INamedType> | adviser | The adviser for the target type. |
| Type | dependencyType | The reflection type of the dependency to introduce. |
| DependencyOptions | options | Options for configuring the dependency, or |
Returns
| Type | Description |
|---|---|
| IntroduceDependencyResult | The result of the introduction operation. Use Declaration to access the introduced field or property. |