private void DemoteRecurrenceProperties(Recurrence recurrence, string rRuleName, string exDateName) { Recurrence value = this.ICalRecurrenceFromXsoRecurrence(recurrence); this.calendarWriter.StartProperty(rRuleName); if (base.Context.Type != CalendarType.Default) { this.calendarWriter.StartParameter(ParameterId.ValueType); this.calendarWriter.WriteParameterValue("RECUR"); IYearlyPatternInfo yearlyPatternInfo = recurrence.Pattern as IYearlyPatternInfo; if (yearlyPatternInfo != null) { this.calendarWriter.StartParameter("X-MICROSOFT-ISLEAPMONTH"); this.calendarWriter.WriteParameterValue(yearlyPatternInfo.IsLeapMonth ? "TRUE" : "FALSE"); } } this.calendarWriter.WritePropertyValue(value); ExDateTime[] deletedOccurrences = recurrence.GetDeletedOccurrences(); if (deletedOccurrences.Length > 0) { this.calendarWriter.StartProperty(exDateName); if (base.Context.Type != CalendarType.Default) { this.calendarWriter.StartParameter(ParameterId.ValueType); this.calendarWriter.WriteParameterValue("DATE-TIME"); } this.calendarWriter.StartParameter(ParameterId.TimeZoneId); this.calendarWriter.WriteParameterValue(recurrence.ReadExTimeZone.AlternativeId); foreach (ExDateTime exDateTime in deletedOccurrences) { this.calendarWriter.WritePropertyValue((DateTime)exDateTime); } } }