Ejemplo n.º 1
0
 public bool IsIncluded(MapiVersion version)
 {
     foreach (MapiVersionRanges.MapiVersionRange mapiVersionRange in this.Ranges)
     {
         if (mapiVersionRange.IsInlcuded(version))
         {
             return(true);
         }
     }
     return(false);
 }
Ejemplo n.º 2
0
            public static MapiVersionRanges.MapiVersionRange Parse(string s)
            {
                string[] array = s.Split(new char[]
                {
                    '-'
                });
                string text;
                string text2;

                if (array.Length == 2)
                {
                    text  = array[0];
                    text2 = array[1];
                }
                else
                {
                    if (array.Length != 1)
                    {
                        throw new FormatException();
                    }
                    text2 = (text = array[0]);
                }
                bool        flag  = false;
                bool        flag2 = false;
                MapiVersion start;

                if (text.Trim().Length == 0)
                {
                    start = MapiVersion.Min;
                }
                else
                {
                    start = MapiVersion.Parse(text);
                    flag  = true;
                }
                MapiVersion end;

                if (text2.Trim().Length == 0)
                {
                    end = MapiVersion.Max;
                }
                else
                {
                    end   = MapiVersion.Parse(text2);
                    flag2 = true;
                }
                if (!flag && !flag2)
                {
                    throw new FormatException();
                }
                return(new MapiVersionRanges.MapiVersionRange(start, end));
            }
Ejemplo n.º 3
0
 private MapiVersionRange(MapiVersion start, MapiVersion end)
 {
     this.Start = start;
     this.End   = end;
 }
Ejemplo n.º 4
0
 public bool IsInlcuded(MapiVersion version)
 {
     return(this.Start <= version && version <= this.End);
 }