コード例 #1
0
 private bool IncludeParameter(ActionParameter parameter, BindingMode bindingMode)
 {
     return(!parameter.HasAttributes <FromUriAttribute, FromBodyAttribute>() &&
            (bindingMode == BindingMode.Implicit ||
             (bindingMode == BindingMode.Explicit && parameter
              .HasAttribute <FromRequestPropertiesAttribute>())));
 }
コード例 #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>())));
 }
コード例 #3
0
 public bool HasAttribute <T>() where T : Attribute => _parameter.HasAttribute <T>();