2011-10-13 15 views

risposta

9

Ho una soluzione. Non molto pulito ma funziona per me.

iCalendar calendar = new iCalendar(); 
calendar.Method = "PUBLISH"; 

Event evt = calendar.Create<Event>(); 

var attendes = new List<IAttendee>(); 
//required attendee 
IAttendee attendee1 = new DDay.iCal.Attendee("MAILTO:[email protected]") 
{ 
    CommonName = "Naveen Jose", 
    Role = "REQ-PARTICIPANT" 
}; 
attendes.Add(attendee1); 
//optional attendee 
IAttendee attendee2 = new DDay.iCal.Attendee("MAILTO:[email protected]") 
{ 
    CommonName = "Noah Naveen", 
    Role = "OPT-PARTICIPANT" 
}; 
attendes.Add(attendee2); 
if (attendes != null && attendes.Count > 0) 
{ 
    evt.Attendees = attendes; 
} 
+0

Grazie - che ha lavorato per me. – seekay

2

Si potrebbe anche usare RSVP = true per richiedere una risposta dal partecipante

IAttendee attendee1 = new DDay.iCal.Attendee("MAILTO:[email protected]") 
{ 
    CommonName = "Naveen Jose", 
    Role = "REQ-PARTICIPANT", 
    RSVP = true 
}; 
Problemi correlati