public Ical.Net.DataTypes.RecurrencePattern DeserializeRecurrencePattern(TextReader stringReader) { try { var serializer = new Ical.Net.Serialization.DataTypes.RecurrencePatternSerializer(); return((Ical.Net.DataTypes.RecurrencePattern)serializer.Deserialize(stringReader)); } catch (Exception ex) { Log.Error(ex); return(null); } }
public Ical.Net.DataTypes.RecurrencePattern DeserializeRecurrencePattern(string iCalRecurrencePatternString) { if (string.IsNullOrEmpty(iCalRecurrencePatternString)) { return(null); } try { using (var stringReader = new StringReader(iCalRecurrencePatternString)) { var serializer = new Ical.Net.Serialization.DataTypes.RecurrencePatternSerializer(); return((Ical.Net.DataTypes.RecurrencePattern)serializer.Deserialize(stringReader)); } } catch (Exception ex) { Log.Error(ex); return(null); } }