Table of Contents

Class InjectionProperty

Namespace
Unity.Injection
Assembly
Unity.Abstractions.dll

This class stores information about which properties to inject, and will configure the container accordingly.

public class InjectionProperty : MemberInfoBase<PropertyInfo>, IEquatable<PropertyInfo>
Inheritance
InjectionProperty
Implements
Inherited Members
Extension Methods

Constructors

InjectionProperty(string, object)

Configure the container to inject the given property name, using the value supplied.

public InjectionProperty(string name, object value)

Parameters

name string

Name of property to inject.

value object

InjectionParameterValue for property.

InjectionProperty(string, ResolutionOption)

Configure the container to inject the given property name, using the value supplied.

public InjectionProperty(string name, ResolutionOption option = ResolutionOption.Required)

Parameters

name string

Name of property to inject.

option ResolutionOption

Tells Unity if this field is optional.

Properties

MemberType

protected override Type MemberType { get; }

Property Value

Type

Methods

DeclaredMember(Type, string)

protected override PropertyInfo DeclaredMember(Type type, string name)

Parameters

type Type
name string

Returns

PropertyInfo

DeclaredMembers(Type)

public override IEnumerable<PropertyInfo> DeclaredMembers(Type type)

Parameters

type Type

Returns

IEnumerable<PropertyInfo>

ToString()

public override string ToString()

Returns

string