Class InjectionParameter
A class that holds on to the given value and provides the required IResolve when the container is configured.
public class InjectionParameter : ParameterBase, IEquatable<Type>, IResolve
- Inheritance
-
InjectionParameter
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
InjectionParameter(object)
Create an instance of InjectionParameter that stores the given value, using the runtime type of that value as the type of the parameter.
public InjectionParameter(object value)
Parameters
value
objectValue to be injected for this parameter.
InjectionParameter(Type, object)
Create an instance of InjectionParameter that stores the given value, associated with the given type.
public InjectionParameter(Type parameterType, object parameterValue)
Parameters
parameterType
TypeType of the parameter.
parameterValue
objectInjectionParameterValue of the parameter
Methods
Resolve<TContext>(ref TContext)
GetOrDefault the value
public object Resolve<TContext>(ref TContext context) where TContext : IResolveContext
Parameters
context
TContextCurrent build context.
Returns
- object
The value for the dependency.
Type Parameters
TContext