Ejemplo n.º 1
0
 private bool IncludeParameter(ActionParameter parameter, BindingMode bindingMode)
 {
     return(!parameter.HasAttributes <FromUriAttribute, FromBodyAttribute>() &&
            (bindingMode == BindingMode.Implicit ||
             (bindingMode == BindingMode.Explicit && parameter
              .HasAttribute <FromRequestPropertiesAttribute>())));
 }
Ejemplo n.º 2
0
 private bool IncludeParameter(ActionParameter parameter, BindingMode bindingMode)
 {
     return(!parameter.HasAttributes <FromUriAttribute, FromBodyAttribute>() &&
            (bindingMode == BindingMode.Implicit ||
             (bindingMode == BindingMode.Convention && HasHeaderPostfix(parameter.Name)) ||
             (bindingMode == BindingMode.Explicit && parameter.HasAttribute <FromHeadersAttribute>())));
 }
Ejemplo n.º 3
0
 public bool HasAnyAttribute <T1, T2>() where T1 : Attribute where T2 : Attribute =>
 _parameter.HasAttributes <T1, T2>();