Show / Hide Table of Contents

Class PropertyOverride

A ResolverOverride that lets you override the value for a specified property.

Inheritance
Object
ResolverOverride
PropertyOverride
Implements
IEquatable<PropertyInfo>
IResolve
Inherited Members
ResolverOverride.Target
ResolverOverride.Type
ResolverOverride.Name
ResolverOverride.OnType<T>()
ResolverOverride.OnType(Type)
ResolverOverride.GetResolver<TContext>(Type)
Object.Equals(Object, Object)
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Unity.Resolution
Assembly: Unity.Abstractions.dll
Syntax
public class PropertyOverride : ResolverOverride, IEquatable<PropertyInfo>, IResolve

Constructors

| Improve this Doc View Source

PropertyOverride(String, Object)

Create an instance of PropertyOverride.

Declaration
public PropertyOverride(string propertyName, object propertyValue)
Parameters
Type Name Description
String propertyName

The property name.

Object propertyValue

InjectionParameterValue to use for the property.

Fields

| Improve this Doc View Source

Value

Declaration
protected readonly object Value
Field Value
Type Description
Object

Methods

| Improve this Doc View Source

Equals(Object)

Declaration
public override bool Equals(object other)
Parameters
Type Name Description
Object other
Returns
Type Description
Boolean
Overrides
ResolverOverride.Equals(Object)
| Improve this Doc View Source

Equals(PropertyInfo)

Declaration
public bool Equals(PropertyInfo other)
Parameters
Type Name Description
PropertyInfo other
Returns
Type Description
Boolean
| Improve this Doc View Source

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
Int32
Overrides
ResolverOverride.GetHashCode()
| Improve this Doc View Source

Resolve<TContext>(ref TContext)

Declaration
public object Resolve<TContext>(ref TContext context)
    where TContext : IResolveContext
Parameters
Type Name Description
TContext context
Returns
Type Description
Object
Type Parameters
Name Description
TContext

Implements

System.IEquatable<T>
IResolve

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