I try to deserialize the iCal file and then map the collection to custom POCO. The problem is that I'm not sure where the properties are stored.
Here's the deserialization method
public static IICalendarCollection Deserialize(String iCalUri) { var wc = new WebClient(); var result = wc.DownloadString(iCalUri); using (var memoryStream = new MemoryStream(Encoding.UTF8.GetBytes(result))) { var serializer = new iCalendarSerializer(); var collection = (iCalendarCollection)serializer.Deserialize(memoryStream, Encoding.UTF8); return collection; } }
Then in my service I try to map properties to my POCO, but I can not find the properties.
var url = string.Format(GoogleICalUrl, calendarID); var feed = iCalUtility.Deserialize(url); foreach(var e in feed) { calendarModel.title = e.WhereTheHellAreThePropertiesKept; }
Does anyone know the correct path to loop through iCalendarCollection and get all the properties?
I checked the DDay website, but it did not work all day.
source share