Пример #1
0
 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);
     }
 }
Пример #2
0
 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));
         }
     }
 }
Пример #3
0
 public void ConvertDimensionIn(IEnumerable <IParameter> parameters, bool convertFormulasAtUsingFormula)
 {
     parameters.Each(parameter => _parameterConverter.Convert(parameter, convertFormulasAtUsingFormula));
 }