Interface IHttpFunctionOptionsBuilder<TCommand>
Assembly: FunctionMonkey.Abstractions.dll
Syntax
public interface IHttpFunctionOptionsBuilder<TCommand>
Type Parameters
Name |
Description |
TCommand |
|
Methods
|
Improve this Doc
View Source
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 Parameters
Name |
Description |
TProperty |
|
|
Improve this Doc
View Source
ClaimsPrincipalAuthorization<TClaimsPrincipalAuthorization>()
Declaration
IHttpFunctionOptionsBuilder<TCommand> ClaimsPrincipalAuthorization<TClaimsPrincipalAuthorization>()
where TClaimsPrincipalAuthorization : IClaimsPrincipalAuthorization
Returns
Type Parameters
Name |
Description |
TClaimsPrincipalAuthorization |
|
|
Improve this Doc
View Source
Allows a command transformer to be specified for a given function
Declaration
IHttpFunctionOptionsBuilder<TCommand> CommandTransformer<TCommandTransformer>()
where TCommandTransformer : ICommandTransformer
Returns
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
|
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 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
|
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 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 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 Parameters
Name |
Description |
TTokenValidator |
The token validators concrete class
|
Extension Methods