Show / Hide Table of Contents

Interface IHttpFunctionOptionsBuilder<TCommand>

Namespace: FunctionMonkey.Abstractions.Builders
Assembly: FunctionMonkey.Abstractions.dll
Syntax
public interface IHttpFunctionOptionsBuilder<TCommand>
Type Parameters
Name Description
TCommand

Methods

| Improve this Doc View Source

AddHeaderMapping<TProperty>(Expression<Func<TCommand, TProperty>>, String)

Configure a property on a command to be mapped from a header

Declaration
IHttpFunctionOptionsBuilder<TCommand> AddHeaderMapping<TProperty>(Expression<Func<TCommand, TProperty>> property, string headerName)
Parameters
Type Name Description
Expression<Func<TCommand, TProperty>> property

The property - using the lamnbda format x => x.MyProperty

System.String headerName

The name of the header to map the property from

Returns
Type Description
IHttpFunctionOptionsBuilder<TCommand>
Type Parameters
Name Description
TProperty
| Improve this Doc View Source

ClaimsPrincipalAuthorization<TClaimsPrincipalAuthorization>()

Declaration
IHttpFunctionOptionsBuilder<TCommand> ClaimsPrincipalAuthorization<TClaimsPrincipalAuthorization>()
    where TClaimsPrincipalAuthorization : IClaimsPrincipalAuthorization
Returns
Type Description
IHttpFunctionOptionsBuilder<TCommand>
Type Parameters
Name Description
TClaimsPrincipalAuthorization
| Improve this Doc View Source

CommandTransformer<TCommandTransformer>()

Allows a command transformer to be specified for a given function

Declaration
IHttpFunctionOptionsBuilder<TCommand> CommandTransformer<TCommandTransformer>()
    where TCommandTransformer : ICommandTransformer
Returns
Type Description
IHttpFunctionOptionsBuilder<TCommand>
Type Parameters
Name Description
TCommandTransformer
| Improve this Doc View Source

HasCommandHandler()

Use this to tell Function Monkey to attempt to dispatch a command - this can be useful if you've globally disabled command handlers with the root option

Declaration
IHttpFunctionOptionsBuilder<TCommand> HasCommandHandler()
Returns
Type Description
IHttpFunctionOptionsBuilder<TCommand>
| Improve this Doc View Source

JsonNamingStrategies<TDeserializerNamingStrategy, TSerializerNamingStrategy>()

Allows naming strategies for the default ISerializer implementation

Declaration
IHttpFunctionOptionsBuilder<TCommand> JsonNamingStrategies<TDeserializerNamingStrategy, TSerializerNamingStrategy>()
    where TDeserializerNamingStrategy : NamingStrategy where TSerializerNamingStrategy : NamingStrategy
Returns
Type Description
IHttpFunctionOptionsBuilder<TCommand>
Type Parameters
Name Description
TDeserializerNamingStrategy
TSerializerNamingStrategy
| Improve this Doc View Source

NoCommandHandler()

Use this to tell Function Monkey to not attempt to dispatch a command - this can be useful if you want to, for example, receive a payload on an HTTP API, validate it, then drop it onto a queue

Declaration
IHttpFunctionOptionsBuilder<TCommand> NoCommandHandler()
Returns
Type Description
IHttpFunctionOptionsBuilder<TCommand>
| Improve this Doc View Source

ResponseHandler<TResponseHandler>()

Associate a HTTP response handler with this function

Declaration
IHttpFunctionOptionsBuilder<TCommand> ResponseHandler<TResponseHandler>()
    where TResponseHandler : IHttpResponseHandler
Returns
Type Description
IHttpFunctionOptionsBuilder<TCommand>
Type Parameters
Name Description
TResponseHandler

The type of the handler

| Improve this Doc View Source

Serializer<TSerializer>()

Allows an alternative serializer to be provided. If a naming strategy pair is supplied then this is ignored.

Declaration
IHttpFunctionOptionsBuilder<TCommand> Serializer<TSerializer>()
    where TSerializer : ISerializer
Returns
Type Description
IHttpFunctionOptionsBuilder<TCommand>
Type Parameters
Name Description
TSerializer

The type of the serializer

| Improve this Doc View Source

TokenValidator<TTokenValidator>(String)

Allows a token validator to be configured for authorization headers to be resolved into a ClaimsPrincipal. A validator must be configured for authorization to be applied to HTTP functions.

Applying a validator here will override any validator applied in the Authentication block

Declaration
IHttpFunctionOptionsBuilder<TCommand> TokenValidator<TTokenValidator>(string header = null)
    where TTokenValidator : ITokenValidator
Parameters
Type Name Description
System.String header

Optional. Allows the token to be picked up from an alternate header rather than the Authorization header - useful if, for example, you need to support a legacy API Key approach

Returns
Type Description
IHttpFunctionOptionsBuilder<TCommand>

The builder for use in a Fluent API

Type Parameters
Name Description
TTokenValidator

The token validators concrete class

Extension Methods

OpenApiFluentValidationHelper.IsNumeric(Object)
OpenApiFluentValidationHelper.NumericToInt(Object)
OpenApiFluentValidationHelper.NumericToDouble(Object)
OpenApiFluentValidationHelper.NumericToDecimal(Object)
  • Improve this Doc
  • View Source
  • 0 Comments
In This Article
  • Methods
    • AddHeaderMapping<TProperty>(Expression<Func<TCommand, TProperty>>, String)
    • ClaimsPrincipalAuthorization<TClaimsPrincipalAuthorization>()
    • CommandTransformer<TCommandTransformer>()
    • HasCommandHandler()
    • JsonNamingStrategies<TDeserializerNamingStrategy, TSerializerNamingStrategy>()
    • NoCommandHandler()
    • ResponseHandler<TResponseHandler>()
    • Serializer<TSerializer>()
    • TokenValidator<TTokenValidator>(String)
  • Extension Methods
Back to top Copyright © 2018 James Randall