Creation d'un event

BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:PUBLISH
BEGIN:VEVENT
UID:vivek@tutorialsbag.com
DTSTART:20130617T050000Z
DTEND:20130617T065900Z
DTSTAMP:20130616T050000Z
DESCRIPTION:The is a test invite for you to see how this thing actually works
LAST-MODIFIED:20130616T050000Z
LOCATION:Queens, New York
SUMMARY:Test Demo Invite
SEQUENCE:0
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR

Update event

BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:REQUEST
BEGIN:VEVENT
UID:vivek@tutorialsbag.com
DTSTART:20130617T050000Z
DTEND:20130617T075900Z
DTSTAMP:20130616T050000Z
ORGANIZER;mailto:chvivek10@gmail.com
DESCRIPTION:The is a test invite for you to see how this thing actually works
LAST-MODIFIED:20130616T050000Z
LOCATION:Queens, New York
SUMMARY:Test Demo Invite
SEQUENCE:1
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR

Delete event

BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:CANCEL
BEGIN:VEVENT
UID:vivek@tutorialsbag.com
DTSTART:20130617T050000Z
DTEND:20130617T075900Z
DTSTAMP:20130616T050000Z
DESCRIPTION:The is a test invite for you to see how this thing actually works
LAST-MODIFIED:20130616T050000Z
LOCATION:Queens, New York
SUMMARY:Test Demo Invite
SEQUENCE:1
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR

iCalcreator class


BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//mysie/mypdt//EN
METHOD:REQUEST
BEGIN:VEVENT
DTSTAMP:20130822T125022Z
DTSTART:20130827T160000
DTEND:20130827T170000
SUMMARY:RDV important
ORGANIZER:mailto:noreply@mysie.com
SEQUENCE:1
UID:4LDHV6
DESCRIPTION:Bonjour Mademoiselle
ATTENDEE;ROLE=REQ-PARTICIPANT:mailto:toto@gmail.com
RRULE:FREQ=WEEKLY;UNTIL=20130901T000000;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR,SA
STATUS:CONFIRMED
BEGIN:VALARM
DESCRIPTION:RDV important
ACTION:DISPLAY
TRIGGER;RELATED=START:-PT15M
END:VALARM
END:VEVENT
END:VCALENDAR
and here is my delete event of a single instance
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//mysie/mypdt//EN
METHOD:CANCEL
BEGIN:VEVENT
DTSTAMP:20130822T125149Z
DTSTART:20130828T160000
DTEND:20130828T170000
SUMMARY:Annulation RDV
ORGANIZER:mailto:noreply@mysie.com
SEQUENCE:2
UID:4LDHV6
DESCRIPTION:rdv annule
ATTENDEE;ROLE=REQ-PARTICIPANT:mailto:toto@gmail.com
RECURRENCE-ID:20130828T160000
STATUS:CANCELLED
PRIORITY:1
END:VEVENT
END:VCALENDAR



Example of submitting:

string[] contents = {
"BEGIN:VCALENDAR",
"VERSION:2.0",
"PRODID:-//site.domain//iCal//EN",
"METHOD:PUBLISH",
"BEGIN:VEVENT",
"UID:" + Args.EventUID,
"SEQUENCE:0",
"DTSTART:" + Args.EventStartTime.ToUniversalTime().ToString("yyyyMMdd\\THHmmss\\Z"),
"DTEND:" +  Args.EventEndTime.ToUniversalTime().ToString("yyyyMMdd\\THHmmss\\Z"),
"SUMMARY:" + Args.EventDescription,
"STATUS:CONFIRMED",
"END:VEVENT",
"END:VCALENDAR"
};
Example of erasing:

string[] contents = {
"BEGIN:VCALENDAR",
"VERSION:2.0",
"PRODID:-//site.domain//iCal//EN",
"METHOD:CANCEL",
"BEGIN:VEVENT",
"UID:" + Args.EventUID,
"SEQUENCE:1",
"DTSTART:" + Args.EventStartTime.ToUniversalTime().ToString("yyyyMMdd\\THHmmss\\Z"),
"DTEND:" +  Args.EventEndTime.ToUniversalTime().ToString("yyyyMMdd\\THHmmss\\Z"),
"SUMMARY:" + Args.EventDescription,
"STATUS:CANCELLED",
"END:VEVENT",
"END:VCALENDAR"
};





