Ejemplo n.º 1
0
 private static NDReadOnlyPropertyKey <TKey, TType, TValue> GetReadonly(NDReadOnlyPropertyKey <TKey, TType, TValue> r)
 {
     if (r is INDProperty <TKey, TType, TValue> p)
     {
         return(p.ReadOnlyProperty);
     }
     return(r);
 }
Ejemplo n.º 2
0
        public bool Equals(NDReadOnlyPropertyKey <TKey, TType, TValue> obj)
        {
            var other = GetReadonly(obj);
            var me    = GetReadonly(this);

            if (ReferenceEquals(me, this) && ReferenceEquals(obj, other))
            {
                return(ReferenceEquals(me, other));
            }
            return(me.Equals(other));
        }
Ejemplo n.º 3
0
 public static ChangedEventArgs <TKey, TType, TValue> Create <TKey, TType, TValue>(TType objectThatChanged, NDReadOnlyPropertyKey <TKey, TType, TValue> changedProperty, TValue oldValue, TValue newValue) where TType : class => new ChangedEventArgs <TKey, TType, TValue>(objectThatChanged, changedProperty, oldValue, newValue);