Exemple #1
0
        private Uri FormatUri(string method, string pathParameters, string queryParameters)
        {
            if (string.IsNullOrWhiteSpace(queryParameters))
            {
                queryParameters = ApiKeyParameter;
            }
            else
            {
                queryParameters += "&" + ApiKeyParameter;
            }

            return(new Uri(RequestFormat
                           .Replace("{{Version}}", Version)
                           .Replace("{{Api}}", Api)
                           .Replace("{{Method}}", method)
                           .Replace("{{PathParameters}}", string.IsNullOrWhiteSpace(pathParameters) ? string.Empty : "/" + pathParameters)
                           .Replace("{{QueryParameters}}", queryParameters)));
        }