Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Reflector{T}"/> class.
 /// </summary>
 /// <param name="inject">
 /// The delegate that injects the sugarcoated value to the field or
 /// with the method.
 /// </param>
 /// <param name="unitType">
 /// The type of the unit.
 /// </param>
 /// <param name="sugarcoater">
 /// The delegate that sugarcoats the specified value.
 /// </param>
 public Reflector(
     Injector inject, Type unitType, Sugarcoater <T> sugarcoater)
 {
     Inject      = inject;
     UnitType    = unitType;
     Sugarcoater = sugarcoater;
 }
Esempio n. 2
0
 private Triplet(
     Type placeholderType,
     Type unitType,
     Sugarcoater <object> sugarcoater)
 {
     PlaceHolderType = placeholderType;
     UnitType        = unitType;
     Sugarcoater     = sugarcoater;
 }
Esempio n. 3
0
 /// <summary>
 /// Gets a new instance of the <see cref="Reflector{T}"/> class.
 /// </summary>
 /// <param name="inject">
 /// The delegate that injects the sugarcoated value to the field or
 /// with the method.
 /// </param>
 /// <param name="unitType">
 /// Get the type of the unit.
 /// </param>
 /// <param name="sugarcoater">
 /// The delegate that sugarcoats the specified value.
 /// </param>
 /// <typeparam name="T">
 /// The type of the value to be injected.
 /// </typeparam>
 /// <returns>
 /// The new instance of the <see cref="Reflector{T}"/> class.
 /// </returns>
 public static Reflector <T> Of <T>(
     Injector inject, Type unitType, Sugarcoater <T> sugarcoater)
 {
     return(new Reflector <T>(inject, unitType, sugarcoater));
 }