/// <summary> /// Tries to read element from XML. /// </summary> /// <param name="reader">The reader.</param> /// <returns>True if element was read.</returns> internal override bool TryReadElementFromXml(EwsServiceXmlReader reader) { if (base.TryReadElementFromXml(reader)) { return(true); } else { switch (reader.LocalName) { case XmlElementNames.DaysOfWeek: this.dayOfTheWeek = reader.ReadElementValue <DayOfTheWeek>(); return(true); case XmlElementNames.DayOfWeekIndex: this.dayOfTheWeekIndex = reader.ReadElementValue <DayOfTheWeekIndex>(); return(true); case XmlElementNames.Month: this.month = reader.ReadElementValue <Month>(); return(true); default: return(false); } } }
/// <summary> /// Loads from json. /// </summary> /// <param name="jsonProperty">The json property.</param> /// <param name="service">The service.</param> internal override void LoadFromJson(JsonObject jsonProperty, ExchangeService service) { base.LoadFromJson(jsonProperty, service); foreach (string key in jsonProperty.Keys) { switch (key) { case XmlElementNames.DaysOfWeek: this.dayOfTheWeek = jsonProperty.ReadEnumValue <DayOfTheWeek>(key); break; case XmlElementNames.DayOfWeekIndex: this.dayOfTheWeekIndex = jsonProperty.ReadEnumValue <DayOfTheWeekIndex>(key); break; case XmlElementNames.Month: this.month = jsonProperty.ReadEnumValue <Month>(key); break; default: break; } } }
/// <summary> /// Initializes a new instance of the <see cref="TimeChangeRecurrence"/> class. /// </summary> /// <param name="dayOfTheWeekIndex">The index of the day in the month at which the time change occurs.</param> /// <param name="dayOfTheWeek">The day of the week the time change occurs.</param> /// <param name="month">The month the time change occurs.</param> public TimeChangeRecurrence( DayOfTheWeekIndex dayOfTheWeekIndex, DayOfTheWeek dayOfTheWeek, Month month) : this() { this.dayOfTheWeekIndex = dayOfTheWeekIndex; this.dayOfTheWeek = dayOfTheWeek; this.month = month; }
bool TryReadElementFromXml(EwsServiceXmlReader reader) { if (base.TryReadElementFromXml(reader)) { return true; } else { switch (reader.LocalName) { case XmlElementNames.DaysOfWeek: this.dayOfTheWeek = reader.ReadElementValue<DayOfTheWeek>(); return true; case XmlElementNames.DayOfWeekIndex: this.dayOfTheWeekIndex = reader.ReadElementValue<DayOfTheWeekIndex>(); return true; default: return false; } } }
/// <summary> /// Tries to read element from XML. /// </summary> /// <param name="reader">The reader.</param> /// <returns>True if element was read.</returns> internal override bool TryReadElementFromXml(EwsServiceXmlReader reader) { if (base.TryReadElementFromXml(reader)) { return true; } else { switch (reader.LocalName) { case XmlElementNames.DaysOfWeek: this.dayOfTheWeek = reader.ReadElementValue<DayOfTheWeek>(); return true; case XmlElementNames.DayOfWeekIndex: this.dayOfTheWeekIndex = reader.ReadElementValue<DayOfTheWeekIndex>(); return true; case XmlElementNames.Month: this.month = reader.ReadElementValue<Month>(); return true; default: return false; } } }