Exemplo n.º 1
0
        private static ZonelessEventStore ProcessIcalExample(string example, string source, Calinfo calinfo, FeedRegistry fr, Collector collector, bool purge)
        {
            DeleteZonedObjects(calinfo.id);
            if (purge)
            {
                Utils.PurgeFeedCacheForHub(calinfo.id);
            }
            var feedurl = BlobStorage.MakeAzureBlobUri("admin", example + ".ics", false).ToString();

            fr.AddFeed(feedurl, source);
            var es = new ZonedEventStore(calinfo, SourceType.ical);

            collector.CollectIcal(fr, es, false);
            EventStore.CombineZonedEventStoresToZonelessEventStore(calinfo.id, settings);
            var zes = new ZonelessEventStore(calinfo).Deserialize();

            return(zes);
        }
Exemplo n.º 2
0
		public static void DoIcal(FeedRegistry fr, Calinfo calinfo)
		{
			if (testfeeds.Count > 0)
				foreach (var testfeed in testfeeds)
					fr.AddFeed(testfeed, "testing: " + testfeed);
			else
				fr.LoadFeedsFromAzure(FeedLoadOption.all);

			var id = calinfo.id;

			ZonedEventStore ical = new ZonedEventStore(calinfo, SourceType.ical);
			try
			{

				GenUtils.LogMsg("status", "DoIcal: " + id, null);
				Collector coll = new Collector(calinfo, settings);
				coll.CollectIcal(fr, ical, test: testing);
			}
			catch (Exception e)
			{
				GenUtils.LogMsg("exception", "DoIcal: " + id, e.Message + e.StackTrace);
			}
		}