コード例 #1
0
ファイル: IRLTests.cs プロジェクト: hiblen/CalDav
		public void ParseFeed() {
			var calendar = new CalDav.Calendar();
			var serializer = new Serializer();
			var req = System.Net.HttpWebRequest.Create("http://www.nasa.gov/templateimages/redesign/calendar/iCal/nasa_calendar.ics");
			using (var res = req.GetResponse())
			using (var str = res.GetResponseStream())
			using (var rdr = new System.IO.StreamReader(str))
				calendar.Deserialize(rdr, serializer);

			calendar.Events.Count.ShouldBeGreaterThan(0);
		}
コード例 #2
0
        public void ParseFeed()
        {
            var calendar   = new CalDav.Calendar();
            var serializer = new Serializer();
            var req        = System.Net.HttpWebRequest.Create("http://www.nasa.gov/templateimages/redesign/calendar/iCal/nasa_calendar.ics");

            using (var res = req.GetResponse())
                using (var str = res.GetResponseStream())
                    using (var rdr = new System.IO.StreamReader(str))
                        calendar.Deserialize(rdr, serializer);

            calendar.Events.Count.ShouldBeGreaterThan(0);
        }