Show / Hide Table of Contents

Class InjectionProperty

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

Inheritance
Object
InjectionMember
InjectionMember<PropertyInfo, Object>
MemberInfoBase<PropertyInfo>
InjectionProperty
Implements
IEquatable<PropertyInfo>
Inherited Members
MemberInfoBase<PropertyInfo>.MemberInfo(Type)
MemberInfoBase<PropertyInfo>.SelectMember(Type, InjectionMember)
InjectionMember<PropertyInfo, Object>.NoMatchFound
InjectionMember<PropertyInfo, Object>.Selection
InjectionMember<PropertyInfo, Object>.Name
InjectionMember<PropertyInfo, Object>.Data
InjectionMember<PropertyInfo, Object>.MemberInfo(Type)
InjectionMember<PropertyInfo, Object>.DeclaredMembers(Type)
InjectionMember<PropertyInfo, Object>.IsInitialized
InjectionMember<PropertyInfo, Object>.Equals(PropertyInfo)
InjectionMember<PropertyInfo, Object>.Equals(Object)
InjectionMember<PropertyInfo, Object>.GetHashCode()
InjectionMember<PropertyInfo, Object>.BuildRequired
InjectionMember<PropertyInfo, Object>.AddPolicies<TContext, TPolicySet>(Type, Type, String, TPolicySet)
InjectionMember<PropertyInfo, 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 InjectionProperty : MemberInfoBase<PropertyInfo>, IEquatable<PropertyInfo>

Constructors

| Improve this Doc View Source

InjectionProperty(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.

| Improve this Doc View Source

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 Source

MemberType

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

Methods

| Improve this Doc View Source

DeclaredMember(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
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