Пример #1
0
 public ReleasePackage(int version)
 {
     this = new ReleasePackage()
     {
         Version = version
     };
 }
Пример #2
0
 public ReleasePackage(string s)
 {
     this = new ReleasePackage();
     string[] strArrays = s.Split(new char[] { '.' });
     if ((int)strArrays.Length != 4)
     {
         throw new ArgumentOutOfRangeException();
     }
     this.Version = strArrays.Aggregate<string, int>(0, (int v, string b) => v << 8 | byte.Parse(b));
 }
Пример #3
0
 public static bool IsVersionString(string s)
 {
     bool flag;
     try
     {
         ReleasePackage releasePackage = new ReleasePackage(s);
         return true;
     }
     catch (Exception exception)
     {
         flag = false;
     }
     return flag;
 }
Пример #4
0
 public bool Equals(ReleasePackage other)
 {
     return this.Version == other.Version;
 }