예제 #1
0
        protected override BaseItem serialize()
        {
            var into = new MegaItem()
            {
                MegaItemType = MegaItemType,

                EndTime  = EndTime,
                Reminder = Reminder,

                WeightCategoryIdentifier = WeightCategoryIdentifier,
                PercentComplete          = PercentComplete
            };

            base.serialize(into);

            return(into);
        }
예제 #2
0
        protected override void deserialize(BaseItem item, List <SyncPropertyNames> changedProperties)
        {
            MegaItem from = item as MegaItem;

            if (changedProperties != null)
            {
                if (MegaItemType != from.MegaItemType)
                {
                    changedProperties.Add(BaseDataItem.SyncPropertyNames.MegaItemType);
                }

                if (EndTime != from.EndTime.ToUniversalTime())
                {
                    changedProperties.Add(BaseDataItem.SyncPropertyNames.EndTime);
                }

                if (Reminder != from.Reminder.ToUniversalTime())
                {
                    changedProperties.Add(BaseDataItem.SyncPropertyNames.Reminder);
                }

                if (WeightCategoryIdentifier != from.WeightCategoryIdentifier)
                {
                    changedProperties.Add(SyncPropertyNames.WeightCategoryIdentifier);
                }

                if (PercentComplete != from.PercentComplete)
                {
                    changedProperties.Add(BaseDataItem.SyncPropertyNames.PercentComplete);
                }
            }

            MegaItemType = from.MegaItemType;

            EndTime  = from.EndTime.ToUniversalTime();
            Reminder = from.Reminder.ToUniversalTime();

            WeightCategoryIdentifier = from.WeightCategoryIdentifier;
            PercentComplete          = from.PercentComplete;

            base.deserialize(from, changedProperties);
        }