Reflector<T> Class
Encapsulates the logic for value injection, including type transformation.
C#
public sealed class Reflector<T>
Type Parameters
- T
The type of the value to be injected.
- Inheritance
-
Reflector<T>
Constructors
Reflector(int, Type, Sugarcoater<T>) |
Encapsulates the logic for value injection, including type transformation. |
Properties
Parameter |
Gets the parameter index. |
Unit |
Gets the type of the unit. |
Sugarcoater |
Gets the sugarcoater. |
Methods
Inject(object[], object) |
Injects a value into an array of constructor arguments. |
Equals(object) | (Inherited from object) |
GetHashCode() | (Inherited from object) |
GetType() | (Inherited from object) |
MemberwiseClone() | (Inherited from object) |
ToString() | (Inherited from object) |
Constructors Detail
Reflector(int, Type, Sugarcoater<T>)
Encapsulates the logic for value injection, including type transformation.
C#
public Reflector(int parameterIndex, Type unitType, Sugarcoater<T> sugarcoater)
Parameters
- parameterIndex
- int
The parameter index in the constructor where the value is injected.
- unitType
- Type
The type of the unit.
- sugarcoater
- Sugarcoater<T>
The delegate that sugarcoats the specified value.
Properties Detail
ParameterIndex
Gets the parameter index.
C#
public int ParameterIndex { get; }
Property Value
UnitType
Gets the type of the unit.
C#
public Type UnitType { get; }
Property Value
Sugarcoater
Gets the sugarcoater.
C#
public Sugarcoater<T> Sugarcoater { get; }
Property Value
Methods Detail
Inject(object[], object)
Injects a value into an array of constructor arguments.
C#
public void Inject(object[] arguments, object value)
Parameters
- arguments
- object[]
The constructor arguments to inject the value into.
- value
- object
The value to be injected.