static public ComponentBase LoadFromStream(iCalObject parent, Stream s, Encoding encoding, DDay.iCal.Serialization.ISerializable serializer) { Type iCalendarType = typeof(iCalendar); if (parent != null) { iCalendarType = parent.iCalendar.GetType(); } ComponentBase component = (ComponentBase) serializer.Deserialize(s, encoding, iCalendarType); if (parent != null) { parent.AddChild(component); } return(component); }
static public iCalendar LoadFromStream(Type iCalendarType, Stream s, Encoding e, DDay.iCal.Serialization.ISerializable serializer) { return((iCalendar)serializer.Deserialize(s, e, iCalendarType)); }