Exemplo n.º 1
0
        public static TransitAccountEventICALEmitter Parse(string url, TimeSpan utcoffset, string useragent)
        {
            HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url.Replace("webcal:", "http:"));

            request.UserAgent = useragent;
            WebResponse  response = request.GetResponse();
            StreamReader sr       = new StreamReader(response.GetResponseStream());
            TransitAccountEventICALEmitter emitter = new TransitAccountEventICALEmitter();

            emitter.UtcOffset = utcoffset;
            Semaview.Shared.ICalParser.Parser parser = new Semaview.Shared.ICalParser.Parser(sr, emitter);
            parser.Parse();
            return(emitter);
        }
 public static TransitAccountEventICALEmitter Parse(string url, TimeSpan utcoffset, string useragent)
 {
     HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url.Replace("webcal:", "http:"));
     request.UserAgent = useragent;
     WebResponse response = request.GetResponse();
     StreamReader sr = new StreamReader(response.GetResponseStream());
     TransitAccountEventICALEmitter emitter = new TransitAccountEventICALEmitter();
     emitter.UtcOffset = utcoffset;
     Semaview.Shared.ICalParser.Parser parser = new Semaview.Shared.ICalParser.Parser(sr, emitter);
     parser.Parse();
     return emitter;
 }