예제 #1
0
        public void SetValue(Result value)
        {
            if (value.IsResolved == false)
                return;
            var assignable = new AssignableValue(value.Value, destinationProperty, valueConverters);

            invoke.SetValue(assignable, destination);
        }
예제 #2
0
 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);
 }
예제 #3
0
        public void SetValue(Result value)
        {
            if (value.IsResolved == false)
            {
                return;
            }
            var assignable = new AssignableValue(value.Value, destinationProperty, valueConverters);

            invoke.SetValue(assignable, destination);
        }
예제 #4
0
        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);
        }
예제 #5
0
        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);
            }
        }
예제 #6
0
        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);
            }
        }