Table of Contents

Method SetObject

Namespace
Sisk.Core.Routing
Assembly
Sisk.Core.dll

SetObject(object)

Searches in the specified object for instance methods marked with routing attributes, such as RouteAttribute and optionals RequestHandlerAttribute, and creates routes from them. All routes is delegated to the specified instance.

public void SetObject(object attrClassInstance)

Parameters

attrClassInstance object

The instance of the class where the instance methods are. The routing methods must be instance methods and marked with RouteAttribute.

Exceptions

Exception

An exception is thrown when a method has an erroneous signature.

SetObject(Type)

Searches in the specified object for static methods marked with routing attributes, such as RouteAttribute and optionals RequestHandlerAttribute, and creates routes from them.

public void SetObject(Type attrClassType)

Parameters

attrClassType Type

The type of the class where the static methods are. The routing methods must be static and marked with RouteAttribute.

Exceptions

Exception

An exception is thrown when a method has an erroneous signature.

SetObject<TObject>()

Searches in the specified object for static methods marked with routing attributes, such as RouteAttribute and optionals RequestHandlerAttribute, and creates routes from them.

public void SetObject<TObject>()

Type Parameters

TObject

The type of the class where the static methods are. The routing methods must be static and marked with RouteAttribute.

Remarks

This method is an shortcut for SetObject(Type).

Exceptions

Exception

An exception is thrown when a method has an erroneous signature.