MetalamaAPI documentationExtensions APIMetalama.​Extensions.​Dependency­InjectionDependency­PropertiesDependency­Properties
Open sandboxFocus

DependencyProperties Constructor

DependencyProperties(INamedType, IType, String, Boolean, Nullable<Boolean>, Nullable<Boolean>, DeclarationKind)

Initializes a new instance of the DependencyProperties class. This overload excepts the dependency type as an IType.

Declaration
public DependencyProperties(INamedType targetType, IType dependencyType, string name, bool isStatic = false, Nullable<bool> isRequired = null, Nullable<bool> isLazy = null, DeclarationKind kind)
Parameters
Type Name Description
INamedType targetType

The type into which the dependency should be introduced.

IType dependencyType

The type of the dependency.

String name

The name of the field or property that should expose the property.

Boolean isStatic

Indicates whether the dependency field or property should be static.

Nullable<Boolean> isRequired

Indicates whether the dependency is required. When this parameter is set to false, the code will accept missing dependencies.

Nullable<Boolean> isLazy

Indicates whether the dependency should be lazily resolved upon first use. Whe this parameter is set to false, the dependency is resolved upon object construction.

DeclarationKind kind

Either Property or Field.

DependencyProperties(INamedType, Type, String, Boolean, Nullable<Boolean>, Nullable<Boolean>, DeclarationKind)

Initializes a new instance of the DependencyProperties class. This overload excepts the dependency type as a Type.

Declaration
public DependencyProperties(INamedType targetType, Type dependencyType, string name, bool isStatic = false, Nullable<bool> isRequired = null, Nullable<bool> isLazy = null, DeclarationKind kind)
Parameters
Type Name Description
INamedType targetType

The type into which the dependency should be introduced.

Type dependencyType

The type of the dependency.

String name

The name of the field or property that should expose the property.

Boolean isStatic

Indicates whether the dependency field or property should be static.

Nullable<Boolean> isRequired

Indicates whether the dependency is required. When this parameter is set to false, the code will accept missing dependencies.

Nullable<Boolean> isLazy

Indicates whether the dependency should be lazily resolved upon first use. Whe this parameter is set to false, the dependency is resolved upon object construction.

DeclarationKind kind

Either Property or Field.

DependencyProperties(DependencyProperties)

Declaration
protected DependencyProperties(DependencyProperties original)
Parameters
Type Name Description
DependencyProperties original