示例#1
0
 /// <summary>
 /// Returns true if the given valid for flag is not set or it includes the server version
 /// </summary>
 /// <param name="serverVersion">Server version</param>
 /// <param name="validFor">Valid for flag</param>
 /// <returns></returns>
 public static bool IsValidFor(ValidForFlag serverVersion, ValidForFlag validFor)
 {
     // If either the flag is not set or if the serverVersion has a default value of "all", allow the check
     // Otherwise, actually do the comparison of the flags
     return(validFor == ValidForFlag.None || serverVersion == ValidForFlag.All || validFor.HasFlag(serverVersion));
 }
示例#2
0
 /// <summary>
 /// Returns true if the given valid for flag is not set or it includes the server version
 /// </summary>
 /// <param name="serverVersion">Server version</param>
 /// <param name="validFor">Valid for flag</param>
 /// <returns></returns>
 public static bool IsValidFor(ValidForFlag serverVersion, ValidForFlag validFor)
 {
     return(validFor == ValidForFlag.None || validFor.HasFlag(serverVersion));
 }