Exemplo n.º 1
0
 private RequestParameterMetadata GetRequestParameter(string bindingSourceName, string parameterName, Type parameterType, RequestParameterKind parameterKind, MetadataValueProvider provider)
 {
     return(new RequestParameterMetadata(bindingSourceName, parameterType, parameterKind)
     {
         ParameterName = parameterName,
         BindingPath = provider.GetBindingPath(),
         IsRequired = provider.GetIsRequired(),
         MediaType = provider.GetContentMediaType(),
         CharSet = provider.GetContentCharSet() ?? DefaultEncodingProvider.Encoding.WebName, //TODO
         FileName = provider.GetContentFileName(),
         Culture = DefaultCultureProvider.Culture,
         StringFormat = provider.GetStringFormat()
     });
 }