示例#1
0
        public override ICProp <CT, T> CreateWithNoValue <CT, T>
        (
            PropNameType propertyName,
            object extraInfo,
            PropStorageStrategyEnum storageStrategy,
            bool typeIsSolid,
            Func <CT, CT, bool> comparer
        )
        {
            // TODO: Get a real value for comparerIsReqEquality
            bool comparerIsRefEquality      = false;
            IPropTemplate <CT> propTemplate = GetPropTemplate <CT>(PropKindEnum.ObservableCollection, storageStrategy, comparer, comparerIsRefEquality, getDefaultVal: null);

            ICProp <CT, T> prop = new CProp <CT, T>(propertyName, typeIsSolid, propTemplate);

            return(prop);
        }
示例#2
0
        public override object Clone()
        {
            //throw new NotImplementedException();

            object result;
            CT     curVal = this.TypedValue;

            if (curVal is ICloneable cloneable)
            {
                result = new CProp <CT, T>(this.PropertyName, (CT)cloneable.Clone(), this.TypeIsSolid, this._template);
            }
            else
            {
                result = new CProp <CT, T>(this.PropertyName, this.TypeIsSolid, this._template);
            }

            return(result);
        }