Show / Hide Table of Contents

Class ResolverOverride

Base class for all override objects passed in the Resolve(Type, String, ResolverOverride[]) method.

Inheritance
Object
ResolverOverride
DependencyOverride
FieldOverride
ParameterOverride
PropertyOverride
Inherited Members
Object.Equals(Object, Object)
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Unity.Resolution
Assembly: Unity.Abstractions.dll
Syntax
public abstract class ResolverOverride

Constructors

| Improve this Doc View Source

ResolverOverride(String)

Declaration
protected ResolverOverride(string name)
Parameters
Type Name Description
String name
| Improve this Doc View Source

ResolverOverride(Type, Type, String)

Declaration
protected ResolverOverride(Type target, Type type, string name)
Parameters
Type Name Description
Type target
Type type
String name

Fields

| Improve this Doc View Source

Name

Declaration
protected readonly string Name
Field Value
Type Description
String
| Improve this Doc View Source

Target

Declaration
protected Type Target
Field Value
Type Description
Type
| Improve this Doc View Source

Type

Declaration
protected readonly Type Type
Field Value
Type Description
Type

Methods

| Improve this Doc View Source

Equals(Object)

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

GetHashCode()

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

GetResolver<TContext>(Type)

Declaration
public virtual ResolveDelegate<TContext> GetResolver<TContext>(Type type)
    where TContext : IResolveContext
Parameters
Type Name Description
Type type
Returns
Type Description
ResolveDelegate<TContext>
Type Parameters
Name Description
TContext
| Improve this Doc View Source

OnType(Type)

Wrap this resolver in one that verifies the type of the object being built. This allows you to narrow any override down to a specific type easily.

Declaration
public ResolverOverride OnType(Type targetType)
Parameters
Type Name Description
Type targetType

Type to constrain the override to.

Returns
Type Description
ResolverOverride

The new override.

| Improve this Doc View Source

OnType<T>()

Wrap this resolver in one that verifies the type of the object being built. This allows you to narrow any override down to a specific type easily.

Declaration
public ResolverOverride OnType<T>()
Returns
Type Description
ResolverOverride

The new override.

Type Parameters
Name Description
T

Type to constrain the override to.

Operators

| Improve this Doc View Source

Equality(ResolverOverride, ResolverOverride)

Declaration
public static bool operator ==(ResolverOverride left, ResolverOverride right)
Parameters
Type Name Description
ResolverOverride left
ResolverOverride right
Returns
Type Description
Boolean
| Improve this Doc View Source

Inequality(ResolverOverride, ResolverOverride)

Declaration
public static bool operator !=(ResolverOverride left, ResolverOverride right)
Parameters
Type Name Description
ResolverOverride left
ResolverOverride right
Returns
Type Description
Boolean

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