INetRequestService

Namespace: ASPSecurityKit.Net
Assembly: ASPSecurityKit.Net.dll

Summary

Provides a common abstraction to interact with Asp.Net (both .NET Framework and .NET Core) based request/response objects.

Properties

ControllerName

Summary

Gets the name of the controller that contains the requested action.

Value

The name of the controller that contains the requested action.

ActionName

Summary

Gets the method name of the requested action.

Value

The method name of the requested action.

Methods

GetAttribute<T>()

Summary

Gets an attribute instance of the specified type from the requested action if defined; otherwise, null.

Returns

An attribute instance of the specified type from the requested action if defined; otherwise, null.

Parameters

This method has no parameters.

Generic Types
Name Description
T Type of the attribute.

IsApiRequest()

Summary

Determines whether the request is a HTTP API request or not.

Returns

true if the request is HTTP API request; otherwise, false.

Parameters

This method has no parameters.

GetParameterValue(parameterName)

Summary

Gets a value by the specified parameter name from the requested action.

Returns

A value by the specified parameter name from the requested action.

Parameters
Name Type Description
parameterName System.String Name of the parameter.

GetActionMethodInfo()

Summary

Gets the metadata for the requested action.

Returns

The metadata for the requested action.

Parameters

This method has no parameters.

GetActionParameters()

Summary

Gets the parameters for the requested action.

Returns

The action method parameters as key-value pairs.

Parameters

This method has no parameters.

GetParameterValueAsync(parameterName)

Summary

Gets a value by the specified parameter name from the requested action.

Returns

A value by the specified parameter name from the requested action.

Parameters
Name Type Description
parameterName System.String Name of the parameter.

GetParameterValueAsync(parameterName,cancellationToken)

Summary

Gets a value by the specified parameter name from the requested action.

Returns

A value by the specified parameter name from the requested action.

Parameters
Name Type Description
parameterName System.String Name of the parameter.
cancellationToken System.Threading.CancellationToken The cancellation token.

GetActionMethodInfoAsync()

Summary

Gets the metadata for the requested action.

Returns

The metadata for the requested action.

Parameters

This method has no parameters.

GetActionMethodInfoAsync(cancellationToken)

Summary

Gets the metadata for the requested action.

Returns

The metadata for the requested action.

Parameters
Name Type Description
cancellationToken System.Threading.CancellationToken The cancellation token.

GetActionParametersAsync()

Summary

Gets the parameters for the requested action.

Returns

The action method parameters as key-value pairs.

Parameters

This method has no parameters.

GetActionParametersAsync(cancellationToken)

Summary

Gets the parameters for the requested action.

Returns

The action method parameters as key-value pairs.

Parameters
Name Type Description
cancellationToken System.Threading.CancellationToken The cancellation token.