public void SetValue(Result value) { if (value.IsResolved == false) return; var assignable = new AssignableValue(value.Value, destinationProperty, valueConverters); invoke.SetValue(assignable, destination); }
public void SetValue(AssignableValue assignableValue, object destination) { var key = new CacheKey(destination.GetType(), assignableValue.PropertyName); PropertyInfo prop; if (setters.TryGetValue(key, out prop) == false) { setters[key] = prop = destination.GetType().GetProperty(assignableValue.PropertyName); } prop.SetValue(destination, assignableValue.DestinationValue, null); }
public void SetValue(Result value) { if (value.IsResolved == false) { return; } var assignable = new AssignableValue(value.Value, destinationProperty, valueConverters); invoke.SetValue(assignable, destination); }
public void SetValue(AssignableValue assignableValue, object destination) { Logger.Create(this).Debug("Setting value on '{0}' using assignable value:{1}{2}", destination, Environment.NewLine, assignableValue); MemberSetter setter = TryCacheSet(destination.GetType(), assignableValue.PropertyName); try { setter(destination, assignableValue.DestinationValue); } catch (Exception ex) { throw new DittoExecutionException(ex, "Failure while mapping '{0}'{1}{2}", assignableValue, Environment.NewLine, ex); } }
public void SetValue(AssignableValue assignableValue, object destination) { Logger.Create(this).Debug("Setting value on '{0}' using assignable value:{1}{2}", destination,Environment.NewLine, assignableValue); MemberSetter setter = TryCacheSet(destination.GetType(), assignableValue.PropertyName); try { setter(destination, assignableValue.DestinationValue); } catch (Exception ex) { throw new DittoExecutionException(ex, "Failure while mapping '{0}'{1}{2}", assignableValue, Environment.NewLine, ex); } }