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 |
|---|---|
| IReadOnlyCollection<AbstractFunctionDefinition> |
Methods
| Improve this Doc View SourceAddValidator<TValidator>()
Registers a validator with the Functions runtime
Declaration
IFunctionHostBuilder AddValidator<TValidator>()
where TValidator : IValidator
Returns
| Type | Description |
|---|---|
| IFunctionHostBuilder |
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<IAuthorizationBuilder> | authorization |
Returns
| Type | Description |
|---|---|
| IFunctionHostBuilder |
CompilerOptions(Action<ICompilerOptionsBuilder>)
Compiler options such as output target
Declaration
IFunctionHostBuilder CompilerOptions(Action<ICompilerOptionsBuilder> options)
Parameters
| Type | Name | Description |
|---|---|---|
| Action<ICompilerOptionsBuilder> | options |
Returns
| Type | Description |
|---|---|
| IFunctionHostBuilder |
DefaultCommandTransformer<TCommandTransformer>()
Declaration
IFunctionHostBuilder DefaultCommandTransformer<TCommandTransformer>()
where TCommandTransformer : ICommandTransformer
Returns
| Type | Description |
|---|---|
| IFunctionHostBuilder |
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<ConnectionStringSettingNames> | settingNames | The settings, new values can be set |
Returns
| Type | Description |
|---|---|
| IFunctionHostBuilder |
DefaultHttpHeaderBindingConfiguration(HeaderBindingConfiguration)
Sets the default HTTP header binding configuration. The default mode is no binding.
Declaration
IFunctionHostBuilder DefaultHttpHeaderBindingConfiguration(HeaderBindingConfiguration defaultConfiguration)
Parameters
| Type | Name | Description |
|---|---|---|
| HeaderBindingConfiguration | defaultConfiguration |
Returns
| Type | Description |
|---|---|
| IFunctionHostBuilder |
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 |
|---|---|
| IFunctionHostBuilder |
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 |
|---|---|
| IFunctionHostBuilder |
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<IFunctionBuilder> | functions | The function builder |
Mediator<TMediator>()
Allows a mediator to be registered
Declaration
IFunctionHostBuilder Mediator<TMediator>()
where TMediator : IMediatorDecorator
Returns
| Type | Description |
|---|---|
| IFunctionHostBuilder | 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 |
|---|---|
| IFunctionHostBuilder |
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<IOpenApiBuilder> | openApi | Open API builder |
Returns
| Type | Description |
|---|---|
| IFunctionHostBuilder | 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<ISerializationBuilder> | serialization | A serialization builder |
Returns
| Type | Description |
|---|---|
| IFunctionHostBuilder |
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<IServiceCollection, ICommandRegistry> | services | An action that will be given a command registry and service collection |
Returns
| Type | Description |
|---|---|
| IFunctionHostBuilder | 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<IServiceCollection> | services | An action that will be given a service collection |
Returns
| Type | Description |
|---|---|
| IFunctionHostBuilder | The function host builder for use in a Fluent API |