Skip to main content

Class RequestUsageAttribute

Attribute used to register a request factory and specify its intended usage. Use this attribute to decorate IRequestFactory implementation and supply the request's associated usage.

public sealed class RequestUsageAttribute : Attribute

Inheritance​

object→Attribute→RequestUsageAttribute

Remarks​

Only one factory should be registered per RequestMethod. Defining multiple factories with the same usage will cause exception.

Constructors​

RequestUsageAttribute(RequestMethod)​

Creates a new RequestUsageAttribute used to register new IRequestFactory.

public RequestUsageAttribute(RequestMethod requestMethod)

Parameters​

NameTypeDescription
requestMethodRequestMethodSpecifies the usage of the requests produced by the factory.

Fields​

type​

The usage of the requests produced by the factory.

public readonly RequestMethod type

Field Value​

RequestMethod