Example #1
0
        /// <summary>
        /// Patch
        /// </summary>
        /// <param name="source"></param>
        /// <param name="target"></param>
        public static void Patch(this dataModel.ContactPropertyValue source, dataModel.ContactPropertyValue target)
        {
            var patchInjectionPolicy = new PatchInjection <dataModel.ContactPropertyValue>(x => x.BooleanValue, x => x.DateTimeValue,
                                                                                           x => x.DecimalValue, x => x.IntegerValue,
                                                                                           x => x.ShortTextValue, x => x.LongTextValue, x => x.ValueType);

            target.InjectFrom(patchInjectionPolicy, source);
        }
        public static dataModel.ContactPropertyValue ToDataModel(this coreModel.Property property)
        {
            if (property == null)
                throw new ArgumentNullException("property");

            var retVal = new dataModel.ContactPropertyValue();
            retVal.InjectFrom(property);
            retVal.ValueType = (int)property.ValueType;
            SetPropertyValue(retVal, property);
            return retVal;
        }
Example #3
0
        public static dataModel.ContactPropertyValue ToDataModel(this coreModel.Property property)
        {
            if (property == null)
            {
                throw new ArgumentNullException("property");
            }

            var retVal = new dataModel.ContactPropertyValue();

            retVal.InjectFrom(property);
            retVal.ValueType = (int)property.ValueType;
            SetPropertyValue(retVal, property);
            return(retVal);
        }