Table of Contents

Class PropertyOverride

Namespace
Unity.Resolution
Assembly
Unity.Abstractions.dll

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

public class PropertyOverride : ResolverOverride, IEquatable<PropertyInfo>, IResolve
Inheritance
PropertyOverride
Implements
Inherited Members
Extension Methods

Constructors

PropertyOverride(string, object)

Create an instance of PropertyOverride.

public PropertyOverride(string propertyName, object propertyValue)

Parameters

propertyName string

The property name.

propertyValue object

InjectionParameterValue to use for the property.

Fields

Value

protected readonly object Value

Field Value

object

Methods

Equals(object)

public override bool Equals(object other)

Parameters

other object

Returns

bool

Equals(PropertyInfo)

public bool Equals(PropertyInfo other)

Parameters

other PropertyInfo

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

Resolve<TContext>(ref TContext)

GetOrDefault the value

public object Resolve<TContext>(ref TContext context) where TContext : IResolveContext

Parameters

context TContext

Current build context.

Returns

object

The value for the dependency.

Type Parameters

TContext