public static CalendarCollection Load(TextReader tr) { var calendars = SimpleDeserializer.Default.Deserialize(tr).OfType <Calendar>(); var collection = new CalendarCollection(); collection.AddRange(calendars); return(collection); }
protected bool Equals(CalendarCollection obj) => CollectionHelpers.Equals(this, obj);
public static Calendar Load(TextReader tr) => CalendarCollection.Load(tr).OfType <Calendar>().SingleOrDefault();
/// <summary> /// Loads an <see cref="Calendar"/> from an open stream. /// </summary> /// <param name="s">The stream from which to load the <see cref="Calendar"/> object</param> /// <returns>An <see cref="Calendar"/> object</returns> public static Calendar Load(Stream s) => CalendarCollection.Load(new StreamReader(s, Encoding.UTF8)).SingleOrDefault();
public static Calendar Load(string iCalendarString, bool collectErrors) => CalendarCollection.Load(new StringReader(iCalendarString), collectErrors).SingleOrDefault();
public static Calendar Load(string iCalendarString) => CalendarCollection.Load(new StringReader(iCalendarString)).SingleOrDefault();
protected bool Equals(CalendarCollection obj) { return(this.SequenceEqual(obj)); }