Beispiel #1
0
        virtual public bool Equals(AM <T> other)
        {
            T temp  = other;
            T temp2 = _content;

            return(Convert.ToBoolean(Compare(temp, temp2)));
        }
Beispiel #2
0
        override public IConstruct DeepCopy()
        {
            AM <T> other = ShallowCopy();

            other.Set((T)Copy(_content));
            return(other);
        }
Beispiel #3
0
        IConstruct DeepCopy(T t)
        {
            AM <T> other = ShallowCopy();

            other.DeepCopy();
            other.Set((T)Copy(_content));
            return(other);
        }
Beispiel #4
0
        //override public void Set<S>(S t)
        //{

        //    //  _content = t<T>.Cast(t,Get());///////////////////////////////////////

        //}
        public void Set(T value)
        {
            AM <T> oldContent = new AM <T>();

            oldContent.Content = _content;
            _content           = value;
            //  Debug(_content);
            //   Raise(this, oldContent);
        }
Beispiel #5
0
        public void Set(T value, bool notify)
        {
            AM <T> oldContent = new AM <T>();

            oldContent.Set(_content);
            _content = value;

            //    Debug(_content);
            if (notify == true)
            {
                Raise(this, oldContent);
            }
        }
Beispiel #6
0
 IConstruct Copy(T t)
 {
     if (t is ValueType)
     {
         T s = default(T);
         s = t;
         AM <T> amt = new AM <T>();
         amt.Set(s);
         return(amt);
     }
     else
     {
         return((t as  IConstruct).DeepCopy());
     }
 }
Beispiel #7
0
        public override bool Equals(object obj)
        {
            AM <T> p = IsSameType(obj);

            if (this.IsNull(p) == false && _content != null && p.IsNull() == false)
            {
                T    temp2    = _content;
                T    pContent = p.Get();
                bool isEqual  = pContent.Equals(temp2);
                return(isEqual);
            }
            else if (_content == null && p.IsNull() == true)
            {
                return(true);
            }
            return(false);
        }