Show / Hide Table of Contents

Interface IHttpResponseHandler

Namespace: FunctionMonkey.Abstractions.Http
Assembly: FunctionMonkey.Abstractions.dll
Syntax
public interface IHttpResponseHandler

Methods

| Improve this Doc View Source

CreateResponse<TCommand>(TCommand)

Invoked when a command with no associated result is successfully invoked. Return an IActionResult for custom behaviour otherwise return null for the default framework behaviour.

Declaration
Task<IActionResult> CreateResponse<TCommand>(TCommand command)
Parameters
Type Name Description
TCommand command

The command

Returns
Type Description
Task<IActionResult>

An action result or null for the default Function Monkey behaviour

Type Parameters
Name Description
TCommand

The type of the command

| Improve this Doc View Source

CreateResponse<TCommand, TResult>(TCommand, TResult)

Invoked when a command with an associated result is successfully invoked. Return an IActionResult for custom behaviour otherwise return null for the default framework behaviour

Declaration
Task<IActionResult> CreateResponse<TCommand, TResult>(TCommand command, TResult result)
Parameters
Type Name Description
TCommand command

The command

TResult result

The result

Returns
Type Description
Task<IActionResult>

An action result or null for the default Function Monkey behaviour

Type Parameters
Name Description
TCommand

The type of the command

TResult

The type of the result

| Improve this Doc View Source

CreateResponseFromException<TCommand>(TCommand, Exception)

Invoked when a command generates an exception during its execution. Return an IActionResult for custom behaviour otherwise return null for the default framework behaviour

Declaration
Task<IActionResult> CreateResponseFromException<TCommand>(TCommand command, Exception ex)
Parameters
Type Name Description
TCommand command

The command

Exception ex

The exception that was thrown

Returns
Type Description
Task<IActionResult>

An action result or null for the default Function Monkey behaviour

Type Parameters
Name Description
TCommand

The type of the command

| Improve this Doc View Source

CreateValidationFailureResponse<TCommand>(TCommand, ValidationResult)

Invoked when a command with a validator but no associated result is successfully invoked. Return an IActionResult for custom behaviour otherwise return null for the default framework behaviour.

Declaration
Task<IActionResult> CreateValidationFailureResponse<TCommand>(TCommand command, ValidationResult validationResult)
Parameters
Type Name Description
TCommand command

The command

ValidationResult validationResult

The validation result

Returns
Type Description
Task<IActionResult>

An action result or null for the default Function Monkey behaviour

Type Parameters
Name Description
TCommand

The type of the command

Extension Methods

OpenApiFluentValidationHelper.IsNumeric(Object)
OpenApiFluentValidationHelper.NumericToInt(Object)
OpenApiFluentValidationHelper.NumericToDouble(Object)
OpenApiFluentValidationHelper.NumericToDecimal(Object)
  • Improve this Doc
  • View Source
  • 0 Comments
Back to top Copyright © 2018 James Randall