Class DependencyOverride
A ResolverOverride class that overrides
the value injected whenever there is a dependency of the
given type, regardless of where it appears in the object graph.
Inheritance
DependencyOverride
Assembly: Unity.Abstractions.dll
Syntax
public class DependencyOverride : ResolverOverride, IEquatable<NamedType>, IResolve
Constructors
|
Improve this Doc
View Source
DependencyOverride(String, Object)
Declaration
public DependencyOverride(string name, object dependencyValue)
Parameters
|
Improve this Doc
View Source
DependencyOverride(Type, Object)
Declaration
public DependencyOverride(Type typeToConstruct, object dependencyValue)
Parameters
Type |
Name |
Description |
Type |
typeToConstruct |
Type of the dependency.
|
Object |
dependencyValue |
InjectionParameterValue to use.
|
|
Improve this Doc
View Source
DependencyOverride(Type, String, Object)
Declaration
public DependencyOverride(Type type, string name, object value)
Parameters
|
Improve this Doc
View Source
DependencyOverride(Type, Type, String, Object)
Declaration
public DependencyOverride(Type target, Type type, string name, object value)
Parameters
Fields
|
Improve this Doc
View Source
Value
Declaration
protected readonly object Value
Field Value
Methods
|
Improve this Doc
View Source
Equals(Object)
Declaration
public override bool Equals(object other)
Parameters
Type |
Name |
Description |
Object |
other |
|
Returns
Overrides
|
Improve this Doc
View Source
Equals(NamedType)
Declaration
public bool Equals(NamedType other)
Parameters
Returns
|
Improve this Doc
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
|
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 Parameters
Name |
Description |
TContext |
|
Implements
Extension Methods