Class ParameterOverride
A ResolverOverride class that lets you
override a named parameter passed to a constructor.
Inheritance
ParameterOverride
Assembly: Unity.Abstractions.dll
Syntax
public class ParameterOverride : ResolverOverride, IEquatable<ParameterInfo>, IResolve
Constructors
|
Improve this Doc
View Source
ParameterOverride(String, Object)
Construct a new ParameterOverride object that will
override the given named constructor parameter, and pass the given
value.
Declaration
public ParameterOverride(string parameterName, object parameterValue)
Parameters
Type |
Name |
Description |
String |
parameterName |
Name of the constructor parameter.
|
Object |
parameterValue |
InjectionParameterValue to pass for the constructor.
|
|
Improve this Doc
View Source
ParameterOverride(Type, Object)
Construct a new ParameterOverride object that will
override the given named constructor parameter, and pass the given
value.
Declaration
public ParameterOverride(Type parameterType, object parameterValue)
Parameters
Type |
Name |
Description |
Type |
parameterType |
Type of the parameter.
|
Object |
parameterValue |
Value to pass for the MethodBase.
|
|
Improve this Doc
View Source
ParameterOverride(Type, String, Object)
Construct a new ParameterOverride object that will
override the given named constructor parameter, and pass the given
value.
Declaration
public ParameterOverride(Type parameterType, string parameterName, object parameterValue)
Parameters
Type |
Name |
Description |
Type |
parameterType |
Type of the parameter.
|
String |
parameterName |
Name of the constructor parameter.
|
Object |
parameterValue |
Value to pass for the MethodBase.
|
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(ParameterInfo)
Declaration
public bool Equals(ParameterInfo 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