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);
            }
Beispiel #2
0
 /// <summary>
 /// Adds a single DateFilter
 /// </summary>
 /// <param name="datefilter">The datefilter.</param>
 public void DateFilter(TLDateFilter datefilter)
 {
     datelist.Add(datefilter);
 }
Beispiel #3
0
 /// <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]);
 }
Beispiel #4
0
 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;
 }
Beispiel #5
0
 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());
 }
 /// <summary>
 /// Adds a single DateFilter
 /// </summary>
 /// <param name="datefilter">The datefilter.</param>
 public void DateFilter(TLDateFilter datefilter)
 {
     datelist.Add(datefilter);
 }