Table of Contents

Class InjectionField

Namespace
Unity.Injection
Assembly
Unity.Abstractions.dll
public class InjectionField : MemberInfoBase<FieldInfo>, IEquatable<FieldInfo>
Inheritance
InjectionField
Implements
Inherited Members
Extension Methods

Constructors

InjectionField(string, object)

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

public InjectionField(string name, object value)

Parameters

name string

Name of property to inject.

value object

InjectionParameterValue for property.

InjectionField(string, ResolutionOption)

Configure the container to inject the given field name.

public InjectionField(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 FieldInfo DeclaredMember(Type type, string name)

Parameters

type Type
name string

Returns

FieldInfo

DeclaredMembers(Type)

public override IEnumerable<FieldInfo> DeclaredMembers(Type type)

Parameters

type Type

Returns

IEnumerable<FieldInfo>

ToString()

public override string ToString()

Returns

string