Class InjectionProperty
This class stores information about which properties to inject, and will configure the container accordingly.
Inheritance
InjectionProperty
Implements
Inherited Members
Namespace: Unity.Injection
Assembly: Unity.Abstractions.dll
Syntax
public class InjectionProperty : MemberInfoBase<PropertyInfo>, IEquatable<PropertyInfo>
Constructors
| Improve this Doc View SourceInjectionProperty(String, Object)
Configure the container to inject the given property name, using the value supplied.
Declaration
public InjectionProperty(string name, object value)
Parameters
Type | Name | Description |
---|---|---|
String | name | Name of property to inject. |
Object | value | InjectionParameterValue for property. |
InjectionProperty(String, ResolutionOption)
Configure the container to inject the given property name, using the value supplied.
Declaration
public InjectionProperty(string name, ResolutionOption option = ResolutionOption.Required)
Parameters
Type | Name | Description |
---|---|---|
String | name | Name of property to inject. |
ResolutionOption | option | Tells Unity if this field is optional. |
Properties
| Improve this Doc View SourceMemberType
Declaration
protected override Type MemberType { get; }
Property Value
Type | Description |
---|---|
Type |
Overrides
Unity.Injection.MemberInfoBase<System.Reflection.PropertyInfo>.MemberType
Methods
| Improve this Doc View SourceDeclaredMember(Type, String)
Declaration
protected override PropertyInfo DeclaredMember(Type type, string name)
Parameters
Type | Name | Description |
---|---|---|
Type | type | |
String | name |
Returns
Type | Description |
---|---|
PropertyInfo |
Overrides
Unity.Injection.MemberInfoBase<System.Reflection.PropertyInfo>.DeclaredMember(System.Type, System.String)
|
Improve this Doc
View Source
DeclaredMembers(Type)
Declaration
public override IEnumerable<PropertyInfo> DeclaredMembers(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type |
Returns
Type | Description |
---|---|
IEnumerable<PropertyInfo> |
Overrides
Unity.Injection.InjectionMember<System.Reflection.PropertyInfo, System.Object>.DeclaredMembers(System.Type)
|
Improve this Doc
View Source
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |