I am using Icalendar to create a recurrence invite on a portal developed in C#. the body contains the information of rooms involved. If user creates a recurrence with 3 rooms for 5 week, a single invite for recurrence request got created. But if user updates rooms information for any specific day in that recurrence, I send a single invite for that day but to remove that day from single invite of recurrence, I have to recreate the the single invite for that 5 week with a specific days in EXDATE (exlusion). Is there a way i can achieve this to avoid recreation of the single invite for 5 week recurrence and a specific day is excluded from that invite.
sample of code i am using to create single invite for recurrence.
str.AppendLine("BEGIN:VCALENDAR");
str.AppendLine("PRODID:-//Team Test");
str.AppendLine("VERSION:2.0");
str.AppendLine("METHOD:REQUEST");
str.AppendLine("BEGIN:VEVENT");
str.AppendLine(string.Format("DTSTART:{0:yyyyMMddTHHmmssZ}", utcStime)); //utcStime is UTC time
str.AppendLine(string.Format("DTSTAMP:{0:yyyyMMddTHHmmssZ}", DateTime.UtcNow));
str.AppendLine(string.Format("DTEND:{0:yyyyMMddTHHmmssZ}", utcEtime));////utcEtime is UTC time
str.AppendLine(string.Format("RRULE:FREQ=WEEKLY;COUNT=5"));
str.AppendLine("LOCATION: ");
str.AppendLine(string.Format("UID:{0}", "Test12345"));
str.AppendLine(string.Format("DESCRIPTION:{0}", msg.Body));
str.AppendLine(string.Format("X-ALT-DESC;FMTTYPE=text/html:{0}", msg.Body));
str.AppendLine(string.Format("SUMMARY:{0}", msg.Subject));
str.AppendLine(string.Format("ORGANIZER:MAILTO:{0}", msg.From.Address));
for (int i = 0; i < msg.To.Count; i++)
{
str.AppendLine(string.Format("ATTENDEE;ROLE=REQ-PARTICIPANT;CN=\"{0}\";RSVP=TRUE:mailto:{1}", msg.To[i].DisplayName, msg.To[i].Address));
}
str.AppendLine(string.Format("ATTENDEE;PARTSTAT=ACCEPTED;CN=\"{0}\":mailto:{1}",
str.AppendLine("BEGIN:VALARM");
str.AppendLine("TRIGGER:-PT15M");
str.AppendLine("ACTION:DISPLAY");
str.AppendLine("DESCRIPTION:Reminder");
str.AppendLine("END:VALARM");
str.AppendLine("END:VEVENT");
str.AppendLine("END:VCALENDAR");
System.Net.Mime.ContentType ct = new System.Net.Mime.ContentType("text/calendar");
ct.Parameters.Add("method", "REQUEST");
AlternateView avCal = AlternateView.CreateAlternateViewFromString(str.ToString(), ct);
msg.AlternateViews.Add(avCal);
sc.Send(msg); // sc is smtpclient i.e. SmtpClient sc = new SmtpClient();