Interface IFunctionHostBuilder
Namespace: FunctionMonkey.Abstractions.Builders
Assembly: FunctionMonkey.Abstractions.dll
Syntax
public interface IFunctionHostBuilder
Properties
| Improve this Doc View SourceFunctionDefinitions
Access to the registered function definitions
Declaration
IReadOnlyCollection<AbstractFunctionDefinition> FunctionDefinitions { get; }
Property Value
Type | Description |
---|---|
IRead |
Methods
| Improve this Doc View SourceAddValidator<TValidator>()
Registers a validator with the Functions runtime
Declaration
IFunctionHostBuilder AddValidator<TValidator>()
where TValidator : IValidator
Returns
Type | Description |
---|---|
IFunction |
Type Parameters
Name | Description |
---|---|
TValidator | A validator implementation, must implement the IValidator interface |
Authorization(Action<IAuthorizationBuilder>)
Surfaces a builder for configurating authorization
Declaration
IFunctionHostBuilder Authorization(Action<IAuthorizationBuilder> authorization)
Parameters
Type | Name | Description |
---|---|---|
Action<IAuthorization |
authorization |
Returns
Type | Description |
---|---|
IFunction |
CompilerOptions(Action<ICompilerOptionsBuilder>)
Compiler options such as output target
Declaration
IFunctionHostBuilder CompilerOptions(Action<ICompilerOptionsBuilder> options)
Parameters
Type | Name | Description |
---|---|---|
Action<ICompiler |
options |
Returns
Type | Description |
---|---|
IFunction |
DefaultCommandTransformer<TCommandTransformer>()
Declaration
IFunctionHostBuilder DefaultCommandTransformer<TCommandTransformer>()
where TCommandTransformer : ICommandTransformer
Returns
Type | Description |
---|---|
IFunction |
Type Parameters
Name | Description |
---|---|
TCommandTransformer |
DefaultConnectionStringSettingNames(Action<ConnectionStringSettingNames>)
Allows the default setting names to be specified - see ConnectionStringSettingNames for the defaults. Currently this must be called before Functions - a future API breaking change will not require this.
Declaration
IFunctionHostBuilder DefaultConnectionStringSettingNames(Action<ConnectionStringSettingNames> settingNames)
Parameters
Type | Name | Description |
---|---|---|
Action<Connection |
settingNames | The settings, new values can be set |
Returns
Type | Description |
---|---|
IFunction |
DefaultHttpHeaderBindingConfiguration(HeaderBindingConfiguration)
Sets the default HTTP header binding configuration. The default mode is no binding.
Declaration
IFunctionHostBuilder DefaultHttpHeaderBindingConfiguration(HeaderBindingConfiguration defaultConfiguration)
Parameters
Type | Name | Description |
---|---|---|
Header |
defaultConfiguration |
Returns
Type | Description |
---|---|
IFunction |
DefaultHttpResponseHandler<TResponseHandler>()
Allows a response handler to be registered for all HTTP requests. See IHttpResponseHandler documentation for details of how this functions.
By default no response handler is configured and all responses will be controlled by the framework.
Declaration
IFunctionHostBuilder DefaultHttpResponseHandler<TResponseHandler>()
where TResponseHandler : IHttpResponseHandler
Returns
Type | Description |
---|---|
IFunction |
Type Parameters
Name | Description |
---|---|
TResponseHandler | A type of IHttpResponseHandler |
DefaultOutputConverter<TConverter>()
Registers a default output converter to use for all triggers with an output parameter
Declaration
IFunctionHostBuilder DefaultOutputConverter<TConverter>()
where TConverter : IOutputBindingConverter
Returns
Type | Description |
---|---|
IFunction |
Type Parameters
Name | Description |
---|---|
TConverter |
Functions(Action<IFunctionBuilder>)
Surfaces a builder for declaring the command to function bindings The functions declaration needs to be the last thing that is configured so it doesn't return a builder
Declaration
void Functions(Action<IFunctionBuilder> functions)
Parameters
Type | Name | Description |
---|---|---|
Action<IFunction |
functions | The function builder |
Mediator<TMediator>()
Allows a mediator to be registered
Declaration
IFunctionHostBuilder Mediator<TMediator>()
where TMediator : IMediatorDecorator
Returns
Type | Description |
---|---|
IFunction |
The function host builder for use in a Fluent API |
Type Parameters
Name | Description |
---|---|
TMediator | The concrete type of the mediator |
NoCommandHandlers()
Marks all functions as having no command handlers - this can be useful if building a set of functions that purely route inputs to output bindings
Declaration
IFunctionHostBuilder NoCommandHandlers()
Returns
Type | Description |
---|---|
IFunction |
OpenApiEndpoint(Action<IOpenApiBuilder>)
Surfaces a builder that allows Open API to be configured. If this builder is not used then no document is included.
Declaration
IFunctionHostBuilder OpenApiEndpoint(Action<IOpenApiBuilder> openApi)
Parameters
Type | Name | Description |
---|---|---|
Action<IOpen |
openApi | Open API builder |
Returns
Type | Description |
---|---|
IFunction |
The function host builder to support a Fluent API |
Serialization(Action<ISerializationBuilder>)
Allows default for serialization to be configured
Declaration
IFunctionHostBuilder Serialization(Action<ISerializationBuilder> serialization)
Parameters
Type | Name | Description |
---|---|---|
Action<ISerialization |
serialization | A serialization builder |
Returns
Type | Description |
---|---|
IFunction |
Setup(Action<IServiceCollection, ICommandRegistry>)
Surfaces an IServiceCollection into which dependencies (for command handlers) can be registered
Declaration
IFunctionHostBuilder Setup(Action<IServiceCollection, ICommandRegistry> services)
Parameters
Type | Name | Description |
---|---|---|
Action<IService |
services | An action that will be given a command registry and service collection |
Returns
Type | Description |
---|---|
IFunction |
The function host builder for use in a Fluent API |
Setup(Action<IServiceCollection>)
Surfaces an IServiceCollection into which dependencies (can be registered
Declaration
IFunctionHostBuilder Setup(Action<IServiceCollection> services)
Parameters
Type | Name | Description |
---|---|---|
Action<IService |
services | An action that will be given a service collection |
Returns
Type | Description |
---|---|
IFunction |
The function host builder for use in a Fluent API |