private static SetItemFieldType GetRecurrenceUpdate(Appointment apt) { SetItemFieldType recurrenceUpdate = new SetItemFieldType(); PathToUnindexedFieldType recurrencePath = new PathToUnindexedFieldType(); recurrencePath.FieldURI = UnindexedFieldURIType.calendarRecurrence; CalendarItemType recurrenceData = new CalendarItemType(); RecurrenceRule rrule; RecurrenceRule.TryParse(apt.RecurrenceRule, out rrule); if (rrule != null && rrule.Pattern.Frequency != RecurrenceFrequency.Hourly) { recurrenceData.Recurrence = CreateRecurrence(rrule, apt.Owner); } recurrenceUpdate.Item = recurrencePath; recurrenceUpdate.Item1 = recurrenceData; return recurrenceUpdate; }
private static SetItemFieldType GetStartUpdate(Appointment apt) { SetItemFieldType startUpdate = new SetItemFieldType(); PathToUnindexedFieldType startPath = new PathToUnindexedFieldType(); startPath.FieldURI = UnindexedFieldURIType.calendarStart; CalendarItemType startData = new CalendarItemType(); startData.Start = apt.Start; startData.StartSpecified = true; startUpdate.Item = startPath; startUpdate.Item1 = startData; return startUpdate; }
private static SetItemFieldType GetEndUpdate(Appointment apt) { SetItemFieldType endUpdate = new SetItemFieldType(); PathToUnindexedFieldType endPath = new PathToUnindexedFieldType(); endPath.FieldURI = UnindexedFieldURIType.calendarEnd; CalendarItemType endData = new CalendarItemType(); endData.End = apt.End; endData.EndSpecified = true; endUpdate.Item = endPath; endUpdate.Item1 = endData; return endUpdate; }
private static SetItemFieldType GetSubjectUpdate(Appointment apt) { SetItemFieldType subjectUpdate = new SetItemFieldType(); PathToUnindexedFieldType subjectPath = new PathToUnindexedFieldType(); subjectPath.FieldURI = UnindexedFieldURIType.itemSubject; CalendarItemType subjectData = new CalendarItemType(); subjectData.Subject = apt.Subject; subjectUpdate.Item = subjectPath; subjectUpdate.Item1 = subjectData; return subjectUpdate; }