Ejemplo n.º 1
0
        private void CalendarDataGetResponse(IAsyncResult ar)
        {
            try
            {
                var response = Request.EndGetResponse(ar);

                EndHttpRequest();
                var param = new LoadCalendarDataCompleteArgs
                {
                    Success = true,
                    Events  = MultistateParser.ParseCalendarEvents(response.GetResponseStream())
                };
                try
                {
                    OnLoadCalendarDataComplete(param);
                }
                catch (Exception ex)
                {
                    throw;
                }
            }
            catch (Exception)
            {
                EndHttpRequest();
                OnLoadCalendarDataComplete(new LoadCalendarDataCompleteArgs {
                    Success = false
                });
            }
        }
Ejemplo n.º 2
0
        private void CalendarInfoGetResponse(IAsyncResult ar)
        {
            try
            {
                var response = Request.EndGetResponse(ar);

                EndHttpRequest();
                OnLoadCalendarInfoComplete(new LoadCalendarInfoCompleteArgs
                {
                    Success      = true,
                    CalendarInfo = MultistateParser.ParseCalendarCalDavInfo(response.GetResponseStream())
                });
            }
            catch (Exception ex)
            {
                EndHttpRequest();
                OnLoadCalendarInfoComplete(new LoadCalendarInfoCompleteArgs {
                    Success = false
                });
            }
        }