HttpActionDescriptor.GetCustomAttributes Method
Namespace: System.Web.Http.Controllers
Assembly: System.Web.Http (in System.Web.Http.dll)
Overload List
Name | Description | |
---|---|---|
GetCustomAttributes<T>() | Returns the custom attributes associated with the action descriptor. |
|
GetCustomAttributes<T>(Boolean) | Gets the custom attributes for the action. |
See Also
HttpActionDescriptor Class
System.Web.Http.Controllers Namespace
Return to top
HttpActionDescriptor.GetCustomAttributes<T> Method ()
Returns the custom attributes associated with the action descriptor.
Syntax
public virtual Collection<T> GetCustomAttributes<T>()
where T : class
public:
generic<typename T>
where T : ref class
virtual Collection<T>^ GetCustomAttributes()
abstract GetCustomAttributes<'T when 'T : not struct> : unit -> Collection<'T>
override GetCustomAttributes<'T when 'T : not struct> : unit -> Collection<'T>
Public Overridable Function GetCustomAttributes(Of T As Class) As Collection(Of T)
Return Value
Type: System.Collections.ObjectModel.Collection<T>
The custom attributes associated with the action descriptor.
Type Parameters
- T
The action descriptor.
Return to top
HttpActionDescriptor.GetCustomAttributes<T> Method (Boolean)
Gets the custom attributes for the action.
Syntax
public virtual Collection<T> GetCustomAttributes<T>(
bool inherit
)
where T : class
public:
generic<typename T>
where T : ref class
virtual Collection<T>^ GetCustomAttributes(
bool inherit
)
abstract GetCustomAttributes<'T when 'T : not struct> :
inherit:bool -> Collection<'T>
override GetCustomAttributes<'T when 'T : not struct> :
inherit:bool -> Collection<'T>
Public Overridable Function GetCustomAttributes(Of T As Class) (
inherit As Boolean
) As Collection(Of T)
Parameters
inherit
Type: System.Booleantrue to search this action's inheritance chain to find the attributes; otherwise, false.
Return Value
Type: System.Collections.ObjectModel.Collection<T>
The collection of custom attributes applied to this action.
Type Parameters
- T
The type of attribute to search for.
Return to top