Example #1
0
 public static bool IsClientVersionLessThanOrEqualTo(this RestApiBaseController controller, string version)
 {
     return(controller.GetClientPlatformVersion(version.Count(x => x == '.') + 1) <= new Version(version));
 }
Example #2
0
 public static bool IsClientVersionEqualToOrGreaterThan(this RestApiBaseController controller, string version)
 {
     return(controller.GetClientPlatformVersion(version.Count(x => x == '.') + 1) >= new Version(version));
 }
Example #3
0
 public static string GetClientPlatformAndVersion(this RestApiBaseController controller)
 {
     return(string.Format("{0}-v{1}", controller.GetClientPlatform(), controller.GetClientPlatformVersion(2)));
 }