// Token: 0x06001031 RID: 4145 RVA: 0x0005B828 File Offset: 0x00059A28 protected override void InternalCopyFrom(IProperty srcProperty) { IStartDueDateProperty startDueDateProperty = srcProperty as IStartDueDateProperty; if (startDueDateProperty == null) { throw new UnexpectedTypeException("IStartDueDateProperty", srcProperty); } if (startDueDateProperty.UtcStartDate != null) { base.CreateAirSyncNode(base.AirSyncTagNames[0], startDueDateProperty.UtcStartDate.Value.ToString("yyyy-MM-dd\\THH:mm:ss.fff\\Z", DateTimeFormatInfo.InvariantInfo)); } if (startDueDateProperty.StartDate != null) { base.CreateAirSyncNode(base.AirSyncTagNames[1], startDueDateProperty.StartDate.Value.ToString("yyyy-MM-dd\\THH:mm:ss.fff\\Z", DateTimeFormatInfo.InvariantInfo)); } if (startDueDateProperty.UtcDueDate != null) { base.CreateAirSyncNode(base.AirSyncTagNames[2], startDueDateProperty.UtcDueDate.Value.ToString("yyyy-MM-dd\\THH:mm:ss.fff\\Z", DateTimeFormatInfo.InvariantInfo)); } if (startDueDateProperty.DueDate != null) { base.CreateAirSyncNode(base.AirSyncTagNames[3], startDueDateProperty.DueDate.Value.ToString("yyyy-MM-dd\\THH:mm:ss.fff\\Z", DateTimeFormatInfo.InvariantInfo)); } }
protected override void InternalCopyFromModified(IProperty srcProperty) { IStartDueDateProperty startDueDateProperty = (IStartDueDateProperty)srcProperty; Task task = base.XsoItem as Task; if ((startDueDateProperty.StartDate == null && startDueDateProperty.UtcStartDate != null) || (startDueDateProperty.StartDate != null && startDueDateProperty.UtcStartDate == null) || (startDueDateProperty.DueDate == null && startDueDateProperty.UtcDueDate != null) || (startDueDateProperty.DueDate != null && startDueDateProperty.UtcDueDate == null)) { throw new ConversionException("Both Utc and local dates should be present for StartDate and DueDate"); } if ((startDueDateProperty.UtcStartDate != null && startDueDateProperty.UtcDueDate != null && startDueDateProperty.UtcStartDate.Value > startDueDateProperty.UtcDueDate.Value) || (startDueDateProperty.StartDate != null && startDueDateProperty.DueDate != null && startDueDateProperty.StartDate.Value > startDueDateProperty.DueDate.Value)) { throw new ConversionException("StartDate should be before DueDate"); } if (startDueDateProperty.StartDate == null) { task.StartDate = null; } else { base.XsoItem.SetOrDeleteProperty(ItemSchema.UtcStartDate, startDueDateProperty.UtcStartDate); base.XsoItem.SetOrDeleteProperty(ItemSchema.LocalStartDate, startDueDateProperty.StartDate); } if (startDueDateProperty.DueDate == null) { task.DueDate = null; return; } base.XsoItem.SetOrDeleteProperty(ItemSchema.UtcDueDate, startDueDateProperty.UtcDueDate); base.XsoItem.SetOrDeleteProperty(ItemSchema.LocalDueDate, startDueDateProperty.DueDate); }