private ResponseParameterMetadata GetResponseParameter(Type parameterType, RequestParameterKind parameterKind, MetadataValueProvider provider) { return(new ResponseParameterMetadata(parameterType, parameterKind) { ParameterName = provider.GetParameterName(), IsRequired = provider.GetIsRequired(), FileName = provider.GetContentFileName(), Culture = DefaultCultureProvider.Culture }); }
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() }); }