Пример #1
0
        private static BindingNotification Merge(BindingNotification a, object b)
        {
            var bn = b as BindingNotification;

            if (bn != null)
            {
                Merge(a, bn);
            }
            else
            {
                a.SetValue(b);
            }

            return(a);
        }
Пример #2
0
        private static BindingNotification Merge(BindingNotification a, BindingNotification b)
        {
            if (b.HasValue)
            {
                a.SetValue(b.Value);
            }
            else
            {
                a.ClearValue();
            }

            if (b.Error != null)
            {
                a.AddError(b.Error, b.ErrorType);
            }

            return(a);
        }