public CalendarCollection Search(CalDav.CalendarQuery query) { var result = Common.Request(Url, "REPORT", (XElement)query, Credentials, new Dictionary<string, object> { { "Depth", 1 } }); var xdoc = XDocument.Parse(result.Item2); var data = xdoc.Descendants(CalDav.Common.xCalDav.GetName("calendar-data")); var serializer = new Serializer(); return new CalendarCollection(data.SelectMany(x => { using (var rdr = new System.IO.StringReader(x.Value)) { return serializer.Deserialize<CalendarCollection>(rdr); } })); }
private static void Test(CalDav.Filter filter, Action<CalDav.Filter> test){ test(filter); filter = new CalDav.Filter((XElement)filter); test(filter); }
public static void Serialize(System.IO.Stream stream, CalDav.Calendar ical, System.Text.Encoding encoding = null) { var serializer = new CalDav.Serializer(); serializer.Serialize(stream, ical, encoding); }