private void SetBody(Method method, ApiDescription api) { foreach (var format in api.SupportedRequestFormats.Select(i => i.MediaType).Distinct() .Where(i => "application/json".Equals(i, StringComparison.OrdinalIgnoreCase))) { var parameters = api.ParameterDescriptions.Where(i => i.Source == BindingSource.Body) .Select(i => parameterConverter.Convert(i)).ToArray(); SetBody(method, format, parameters); } }
private void SetUriPatameters(ApiDescription item, Resource resource) { if (!resource.HasUriParameters) { foreach (var paramter in item.ParameterDescriptions.Where(i => i.Source == BindingSource.Path)) { resource.UriParameters.AddElement(parameterConverter.Convert(paramter)); } } }
public void ConvertDimensionIn(IEnumerable <IParameter> parameters, bool convertFormulasAtUsingFormula) { parameters.Each(parameter => _parameterConverter.Convert(parameter, convertFormulasAtUsingFormula)); }