Compartilhar via


HttpControllerDescriptor.GetCustomAttributes<T> Method

Retrieves a collection of custom attributes of the controller.

Namespace:  System.Web.Http.Controllers
Assembly:  System.Web.Http (in System.Web.Http.dll)

Syntax

'Declaration
Public Overridable Function GetCustomAttributes(Of T As Class) As Collection(Of T)
'Usage
Dim instance As HttpControllerDescriptor
Dim returnValue As Collection(Of T)

returnValue = instance.GetCustomAttributes()
public virtual Collection<T> GetCustomAttributes<T>()
where T : class
public:
generic<typename T>
where T : ref class
virtual Collection<T>^ GetCustomAttributes()
abstract GetCustomAttributes : unit -> Collection<'T>  when 'T : not struct
override GetCustomAttributes : unit -> Collection<'T>  when 'T : not struct
JScript does not support generic types and methods.

Type Parameters

  • T
    The type of the object.

Return Value

Type: System.Collections.ObjectModel.Collection<T>
A collection of custom attributes

See Also

Reference

HttpControllerDescriptor Class

System.Web.Http.Controllers Namespace