public static TLDateFilter Deserialize(string msg) { string [] r = msg.Split(dl); TLDateFilter df = new TLDateFilter(); int ir = 0; if (int.TryParse(r[1], out ir)) { df.type = (DateMatchType)ir; } if (int.TryParse(r[0], out ir)) { df.date = ir; } return(df); }
/// <summary> /// Adds a single DateFilter /// </summary> /// <param name="datefilter">The datefilter.</param> public void DateFilter(TLDateFilter datefilter) { datelist.Add(datefilter); }
/// <summary> /// Adds an array of TLDateFilters /// </summary> /// <param name="filters">The filters.</param> public void DateFilter(TLDateFilter[] filters) { for (int i = 0; i < filters.Length; i++) datelist.Add(filters[i]); }
public static TLDateFilter Deserialize(string msg) { string [] r = msg.Split(dl); TLDateFilter df = new TLDateFilter(); int ir = 0; if (int.TryParse(r[1], out ir)) df.type = (DateMatchType)ir; if (int.TryParse(r[0], out ir)) df.date = ir; return df; }
public static string Serialize(TLDateFilter df) { return df.date.ToString() + dl + ((int)df.type).ToString(); }
public static string Serialize(TLDateFilter df) { return(df.date.ToString() + dl + ((int)df.type).ToString()); }