Example #1
0
		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);
				}
			}));
		}
Example #2
0
		private static void Test(CalDav.Filter filter, Action<CalDav.Filter> test){
			test(filter);
			filter = new CalDav.Filter((XElement)filter);
			test(filter);
		}
Example #3
0
		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);
		}