/// <summary> /// Injects values from source to target /// </summary> /// <param name="target">target where the value is going to be injected</param> /// <param name="injection">ValueInjection used</param> /// <param name="source">source from where the value is taken</param> /// <returns>the modified target</returns> public static object InjectFrom(this object target, IValueInjection injection, object source) { currentInjection = (IDeltaInjection)injection; target = injection.Map(source, target); return(target); }
/// <summary> /// inject values from source to target /// </summary> /// <param name="injection">the injection used</param> /// <param name="target">target where the values is going to be injected</param> /// <param name="source">source from where the values are taken</param> /// <returns>the modified target</returns> public object Inject(IValueInjection injection, object target, params object[] source) { foreach (var o in source) { target = injection.Map(o, target); } return(target); }
/// <summary> /// Injects values from source to target /// </summary> /// <param name="target">target where the value is going to be injected</param> /// <param name="injection">ValueInjection used</param> /// <param name="source">source from where the value is taken</param> /// <returns>the modified target</returns> public static object InjectFrom(this object target, IValueInjection injection, params object[] source) { foreach (var o in source) { target = injection.Map(o, target); } return(target); }
/// <summary> /// Inject properties with exact same name and type /// </summary> public static object InjectFrom(this object target, object source) { return(DefaultInjection.Map(source, target)); }
/// <summary> /// Injects values from source to target /// </summary> /// <param name="target">target where the value is going to be injected</param> /// <param name="injection">ValueInjection used</param> /// <param name="source">source from where the value is taken</param> /// <returns>the modified target</returns> public static object InjectFrom(this object target, IValueInjection injection, object source) { target = injection.Map(source, target); return(target); }
/// <summary> /// Inject properties with exact same name and type /// </summary> public static object InjectFrom(this object target, object source) { currentInjection = (IDeltaInjection)DefaultInjection; return(DefaultInjection.Map(source, target)); }