Show / Hide Table of Contents

Class InjectionField

Inheritance
Object
InjectionMember
InjectionMember<FieldInfo, Object>
MemberInfoBase<FieldInfo>
InjectionField
Implements
IEquatable<FieldInfo>
Inherited Members
MemberInfoBase<FieldInfo>.MemberInfo(Type)
MemberInfoBase<FieldInfo>.SelectMember(Type, InjectionMember)
InjectionMember<FieldInfo, Object>.NoMatchFound
InjectionMember<FieldInfo, Object>.Selection
InjectionMember<FieldInfo, Object>.Name
InjectionMember<FieldInfo, Object>.Data
InjectionMember<FieldInfo, Object>.MemberInfo(Type)
InjectionMember<FieldInfo, Object>.DeclaredMembers(Type)
InjectionMember<FieldInfo, Object>.IsInitialized
InjectionMember<FieldInfo, Object>.Equals(FieldInfo)
InjectionMember<FieldInfo, Object>.Equals(Object)
InjectionMember<FieldInfo, Object>.GetHashCode()
InjectionMember<FieldInfo, Object>.BuildRequired
InjectionMember<FieldInfo, Object>.AddPolicies<TContext, TPolicySet>(Type, Type, String, TPolicySet)
InjectionMember<FieldInfo, Object>.SelectMember(Type, InjectionMember)
InjectionMember.AddPolicies<TContext, TPolicySet>(Type, Type, String, TPolicySet)
InjectionMember.BuildRequired
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Namespace: Unity.Injection
Assembly: Unity.Abstractions.dll
Syntax
public class InjectionField : MemberInfoBase<FieldInfo>, IEquatable<FieldInfo>

Constructors

| Improve this Doc View Source

InjectionField(String, Object)

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

Declaration
public InjectionField(string name, object value)
Parameters
Type Name Description
String name

Name of property to inject.

Object value

InjectionParameterValue for property.

| Improve this Doc View Source

InjectionField(String, ResolutionOption)

Configure the container to inject the given field name.

Declaration
public InjectionField(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 Source

MemberType

Declaration
protected override Type MemberType { get; }
Property Value
Type Description
Type
Overrides
Unity.Injection.MemberInfoBase<System.Reflection.FieldInfo>.MemberType

Methods

| Improve this Doc View Source

DeclaredMember(Type, String)

Declaration
protected override FieldInfo DeclaredMember(Type type, string name)
Parameters
Type Name Description
Type type
String name
Returns
Type Description
FieldInfo
Overrides
Unity.Injection.MemberInfoBase<System.Reflection.FieldInfo>.DeclaredMember(System.Type, System.String)
| Improve this Doc View Source

DeclaredMembers(Type)

Declaration
public override IEnumerable<FieldInfo> DeclaredMembers(Type type)
Parameters
Type Name Description
Type type
Returns
Type Description
IEnumerable<FieldInfo>
Overrides
Unity.Injection.InjectionMember<System.Reflection.FieldInfo, System.Object>.DeclaredMembers(System.Type)
| Improve this Doc View Source

ToString()

Declaration
public override string ToString()
Returns
Type Description
String
Overrides
Object.ToString()

Implements

System.IEquatable<T>

Extension Methods

InjectionMatching.Matches(Object, Type)
InjectionMatching.MatchesObject(Object, Type)
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2020 .NET Foundation and Contributors. All Rights Reserved