Esempio n. 1
0
        public Webinar(WebinarResponse webinarResponse)
        {
            this.Description = webinarResponse.Description;
            this.OrganizerKey = webinarResponse.OrganizerKey;
            this.Subject = webinarResponse.Subject;
            this.TimeZone = webinarResponse.TimeZone;
            this.WebinarKey = webinarResponse.WebinarKey;

            this.EndTime = DateTime.Parse(webinarResponse.Times[0].StartTime,
                null, DateTimeStyles.RoundtripKind);

            this.StartTime = DateTime.Parse(webinarResponse.Times[0].EndTime,
                null, DateTimeStyles.RoundtripKind);

            Sessions = string.Join(",",
                webinarResponse.Times.Select(time =>
                    string.Format("[StartTime={0}, EndTime={1}",
                    DateTime.Parse(time.StartTime, null, DateTimeStyles.RoundtripKind),
                    DateTime.Parse(time.EndTime, null, DateTimeStyles.RoundtripKind))));

            //const string sessionFormat = "[StartTime={0}, EndTime={1}]";
            //foreach (var time in webinarResponse.Times)
            //{
            //  this.Sessions += string.Format(sessionFormat,
            //    DateTime.Parse(time.StartTime, null, DateTimeStyles.RoundtripKind),
            //    DateTime.Parse(time.EndTime, null, DateTimeStyles.RoundtripKind));
            //}
        }
Esempio n. 2
0
        public Webinar(WebinarResponse webinarResponse)
        {
            this.Description  = webinarResponse.Description;
            this.OrganizerKey = webinarResponse.OrganizerKey;
            this.Subject      = webinarResponse.Subject;
            this.TimeZone     = webinarResponse.TimeZone;
            this.WebinarKey   = webinarResponse.WebinarKey;

            this.EndTime = DateTime.Parse(webinarResponse.Times[0].StartTime,
                                          null, DateTimeStyles.RoundtripKind);

            this.StartTime = DateTime.Parse(webinarResponse.Times[0].EndTime,
                                            null, DateTimeStyles.RoundtripKind);

            Sessions = string.Join(",",
                                   webinarResponse.Times.Select(time =>
                                                                string.Format("[StartTime={0}, EndTime={1}",
                                                                              DateTime.Parse(time.StartTime, null, DateTimeStyles.RoundtripKind),
                                                                              DateTime.Parse(time.EndTime, null, DateTimeStyles.RoundtripKind))));

            //const string sessionFormat = "[StartTime={0}, EndTime={1}]";
            //foreach (var time in webinarResponse.Times)
            //{
            //  this.Sessions += string.Format(sessionFormat,
            //    DateTime.Parse(time.StartTime, null, DateTimeStyles.RoundtripKind),
            //    DateTime.Parse(time.EndTime, null, DateTimeStyles.RoundtripKind));
            //}
        }
Esempio n. 3
0
        public UpcomingWebinar(WebinarResponse webinarResponse)
        {
            this.Description = webinarResponse.Description;
            this.OrganizerKey = webinarResponse.OrganizerKey;
            this.Subject = webinarResponse.Subject;
            this.TimeZone = webinarResponse.TimeZone;
            this.WebinarKey = webinarResponse.WebinarKey;

            this.EndTime = DateTime.Parse(webinarResponse.Times[0].StartTime,
                null, System.Globalization.DateTimeStyles.RoundtripKind);

            this.StartTime = DateTime.Parse(webinarResponse.Times[0].EndTime,
                null, System.Globalization.DateTimeStyles.RoundtripKind);

            const string sessionFormat = "[StartTime={0}, EndTime={1}]";
            foreach (var time in webinarResponse.Times)
            {
                this.Sessions += string.Format(sessionFormat,
                    DateTime.Parse(time.StartTime, null, System.Globalization.DateTimeStyles.RoundtripKind),
                    DateTime.Parse(time.EndTime, null, System.Globalization.DateTimeStyles.RoundtripKind));
            }
        }
Esempio n. 4
0
        public UpcomingWebinar(WebinarResponse webinarResponse)
        {
            this.Description  = webinarResponse.Description;
            this.OrganizerKey = webinarResponse.OrganizerKey;
            this.Subject      = webinarResponse.Subject;
            this.TimeZone     = webinarResponse.TimeZone;
            this.WebinarKey   = webinarResponse.WebinarKey;

            this.EndTime = DateTime.Parse(webinarResponse.Times[0].StartTime,
                                          null, System.Globalization.DateTimeStyles.RoundtripKind);

            this.StartTime = DateTime.Parse(webinarResponse.Times[0].EndTime,
                                            null, System.Globalization.DateTimeStyles.RoundtripKind);

            const string sessionFormat = "[StartTime={0}, EndTime={1}]";

            foreach (var time in webinarResponse.Times)
            {
                this.Sessions += string.Format(sessionFormat,
                                               DateTime.Parse(time.StartTime, null, System.Globalization.DateTimeStyles.RoundtripKind),
                                               DateTime.Parse(time.EndTime, null, System.Globalization.DateTimeStyles.RoundtripKind));
            }
        }