public void Execute(ICurrentActionContext context)
        {
            var target  = context.Target;
            var current = context.Current;

            CopyAttributes(target.Attributes, current.Attributes);
            CopyFormattedValues(target.Entity.FormattedValues, current.Entity.FormattedValues);
        }
Example #2
0
        public void Execute(ICurrentActionContext context)
        {
            var target  = context.Target;
            var current = context.Current;

            target.AttributeChanged += (entity, e) =>
            {
                var source = (Entity)entity;
                current[e.AttributeName] = source[e.AttributeName];
                var sourceFormattedValue = source.GetFormattedValue(e.AttributeName);
                current.SetFormattedValue(e.AttributeName, sourceFormattedValue);
            };

            target.FormattedValueChanged += (entity, e) =>
            {
                var source = (Entity)entity;
                var sourceFormattedValue = source.GetFormattedValue(e.AttributeName);
                current.SetFormattedValue(e.AttributeName, sourceFormattedValue);
            };
        }
 public bool CanExecute(ICurrentActionContext context) => true;