Beispiel #1
0
        /// <summary>
        /// Seriliaze the parameter value to string.
        /// </summary>
        /// <param name="context">The context.</param>
        /// <param name="parameter">The parameter.</param>
        /// <returns>Parameter value string.</returns>
        internal static string GetParameterValue(DataServiceContext context, OperationParameter parameter)
        {
            var requestInfo = new RequestInfo(context);
            var serializer  = new Serializer(requestInfo);
            UriEntityOperationParameter entityParameter = parameter as UriEntityOperationParameter;

            return(serializer.ConvertToEscapedUriValue(parameter.Name, parameter.Value, entityParameter != null && entityParameter.UseEntityReference));
        }
Beispiel #2
0
 /// <summary>
 /// Seriliaze the parameter value to string.
 /// </summary>
 /// <param name="context">The context.</param>
 /// <param name="parameter">The parameter.</param>
 /// <returns>Parameter value string.</returns>
 internal static string GetParameterValue(DataServiceContext context, OperationParameter parameter)
 {
     var requestInfo = new RequestInfo(context);
     var serializer = new Serializer(requestInfo);
     UriEntityOperationParameter entityParameter = parameter as UriEntityOperationParameter;
     return serializer.ConvertToEscapedUriValue(parameter.Name, parameter.Value, entityParameter != null && entityParameter.UseEntityReference);
 }