示例#1
0
 public static Uri ToRequestUri(this RequestUriHelper reqType, Uri baseUri, ResponseType respt)
 {
     return(RequestUriHelper.GetUri(baseUri, respt, reqType));
 }
示例#2
0
        /// <summary>
        /// Provides the remaining size for parameters calculated by difference of <paramref name="maxUriLength"/> and the combination <paramref name="serviceLocation"/>, <paramref name="requestPath"/> and <paramref name="parameterDefinitions"/>
        /// <remarks><paramref name="requestPath"/> and <paramref name="parameterDefinitions"/> must not contain any values (except for lists: empty brackets) but only fix parameter name </remarks>
        /// </summary>
        internal static int GetUriTargetSize(Uri serviceLocation, string requestPath, int maxUriLength, params ParameterDefinition[] parameterDefinitions)
        {
            var endpointUriString = RequestUriHelper.MakeRequestUri(serviceLocation, requestPath, parameterDefinitions).ToString();

            return(Math.Max(maxUriLength - endpointUriString.Length, 0));
        }
示例#3
0
 public static Uri ToRequestUri(this RequestUriHelper reqType, string baseUri, ResponseType respt)
 {
     return(RequestUriHelper.GetUri(new Uri(baseUri, UriKind.Relative), respt, reqType));
 }