Пример #1
0
 /// <summary>
 /// Test whether this version matches another version, to a specified tolerance.
 /// </summary>
 public bool IsSamePatch(RiotVersion other, MatchTolerance tolerance = MatchTolerance.Minor)
 {
     if (Major != other.Major)
     {
         return(false);
     }
     if (tolerance == MatchTolerance.Major)
     {
         return(true);
     }
     if (Minor != other.Minor)
     {
         return(false);
     }
     if (tolerance == MatchTolerance.Minor)
     {
         return(true);
     }
     if (Patch != other.Patch)
     {
         return(false);
     }
     if (tolerance == MatchTolerance.Patch)
     {
         return(false);
     }
     return(SubPatch != other.SubPatch);
 }
Пример #2
0
 /// <summary>
 /// Test whether this version matches another version, to a specified tolerance.
 /// </summary>
 public bool IsSamePatch(RiotVersion other, MatchTolerance tolerance = MatchTolerance.Minor)
 {
     if (Major != other.Major) return false;
     if (tolerance == MatchTolerance.Major) return true;
     if (Minor != other.Minor) return false;
     if (tolerance == MatchTolerance.Minor) return true;
     if (Patch != other.Patch) return false;
     if (tolerance == MatchTolerance.Patch) return false;
     return (SubPatch != other.SubPatch);
 }