public static ApiVersion GetClientApiVersion(string queryString)
        {
            string item = null;

            if (!string.IsNullOrEmpty(queryString))
            {
                item = HttpUtility.ParseQueryString(queryString)["api-version"];
            }
            return(ApiVersionHelper.GetVersion(item));
        }
        public static string GetApiVersionQueryString(ApiVersion version)
        {
            string apiVersionString = ApiVersionHelper.GetApiVersionString(version);

            if (string.IsNullOrEmpty(apiVersionString))
            {
                return(string.Empty);
            }
            string[] strArrays = new string[] { "api-version", apiVersionString };
            return(string.Join("=", strArrays));
        }
 static ApiVersionHelper()
 {
     ApiVersionHelper.OldRuntimeApiVersion     = (int)ApiVersionHelper.GetVersion("2013-07");
     ApiVersionHelper.CurrentRuntimeApiVersion = (int)ApiVersionHelper.GetVersion("2014-09");
     ApiVersionHelper.PartitionedEntityMinimumRuntimeApiVersion = (int)ApiVersionHelper.GetVersion("2013-10");
     ApiVersionHelper.VersionSix    = (int)ApiVersionHelper.GetVersion("2013-08");
     ApiVersionHelper.VersionSeven  = (int)ApiVersionHelper.GetVersion("2013-10");
     ApiVersionHelper.VersionEight  = (int)ApiVersionHelper.GetVersion("2014-01");
     ApiVersionHelper.VersionNine   = (int)ApiVersionHelper.GetVersion("2014-05");
     ApiVersionHelper.VersionTen    = (int)ApiVersionHelper.GetVersion("2014-08");
     ApiVersionHelper.VersionEleven = (int)ApiVersionHelper.GetVersion("2014-09");
     ApiVersionHelper.SubscriptionPartitioningMinimumRuntimeApiVersion = (int)ApiVersionHelper.GetVersion("2014-01");
     ApiVersionHelper.CurrentApiVersion = ApiVersionHelper.GetVersion("2014-09");
 }
 public static ApiVersion GetClientApiVersion(Uri requestUri)
 {
     return(ApiVersionHelper.GetClientApiVersion(requestUri.Query));
 }