Show / Hide Table of Contents

Class FieldOverride

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

Inheritance
Object
ResolverOverride
FieldOverride
Implements
IEquatable<FieldInfo>
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 FieldOverride : ResolverOverride, IEquatable<FieldInfo>, IResolve

Constructors

| Improve this Doc View Source

FieldOverride(String, Object)

Create an instance of FieldOverride.

Declaration
public FieldOverride(string fieldName, object fieldValue)
Parameters
Type Name Description
String fieldName

The Field name.

Object fieldValue

InjectionParameterValue to use for the Field.

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(FieldInfo)

Declaration
public bool Equals(FieldInfo other)
Parameters
Type Name Description
FieldInfo 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