Show / Hide Table of Contents

Interface IRestCommandBuilder

RestCommandBuilder block for the convention system, uses a fluent API approach

Namespace: AzureFromTheTrenches.Commanding.AspNetCore
Assembly: AzureFromTheTrenches.Commanding.AspNetCore.dll
Syntax
public interface IRestCommandBuilder

Methods

| Improve this Doc View Source

Claims(Action<IClaimsMappingBuilder>)

Allow claims to be mapped to command properties

Declaration
IRestCommandBuilder Claims(Action<IClaimsMappingBuilder> claimsMappingBuilder)
Parameters
Type Name Description
System.Action<IClaimsMappingBuilder> claimsMappingBuilder

An action that is given a claims mapping builder

Returns
Type Description
IRestCommandBuilder
| Improve this Doc View Source

Controller(String, Action<IActionBuilder>)

Define a controller - a short cut for Controllers(cfg => ...)

Declaration
IRestCommandBuilder Controller(string controller, Action<IActionBuilder> actionBuilder)
Parameters
Type Name Description
System.String controller

The name of the controller

System.Action<IActionBuilder> actionBuilder

The action builder

Returns
Type Description
IRestCommandBuilder
| Improve this Doc View Source

Controller(String, Action<IAttributeBuilder>, Action<IActionBuilder>)

Declaration
IRestCommandBuilder Controller(string controller, Action<IAttributeBuilder> attributeBuilder, Action<IActionBuilder> actionBuilder)
Parameters
Type Name Description
System.String controller
System.Action<IAttributeBuilder> attributeBuilder
System.Action<IActionBuilder> actionBuilder
Returns
Type Description
IRestCommandBuilder
| Improve this Doc View Source

Controller(String, String, Action<IAttributeBuilder>, Action<IActionBuilder>)

Declaration
IRestCommandBuilder Controller(string controller, string route, Action<IAttributeBuilder> attributeBuilder, Action<IActionBuilder> actionBuilder)
Parameters
Type Name Description
System.String controller
System.String route
System.Action<IAttributeBuilder> attributeBuilder
System.Action<IActionBuilder> actionBuilder
Returns
Type Description
IRestCommandBuilder
| Improve this Doc View Source

Controllers(Action<IControllerBuilder>)

Define controllers using this builder

Declaration
IRestCommandBuilder Controllers(Action<IControllerBuilder> controllerBuilderAction)
Parameters
Type Name Description
System.Action<IControllerBuilder> controllerBuilderAction
Returns
Type Description
IRestCommandBuilder
| Improve this Doc View Source

DefaultControllerRoute(String)

Set the default route for controllers. Defaults to "api/[controller]"

Declaration
IRestCommandBuilder DefaultControllerRoute(string defaultRoute)
Parameters
Type Name Description
System.String defaultRoute

The route to use for controllers

Returns
Type Description
IRestCommandBuilder
| Improve this Doc View Source

LogControllerCode(Action<String>)

Optional. If set then as the code for each controller is created it will be passed to this action allowing visibility of exactly what code is being compiled.

Declaration
IRestCommandBuilder LogControllerCode(Action<string> logger)
Parameters
Type Name Description
System.Action<System.String> logger
Returns
Type Description
IRestCommandBuilder
| Improve this Doc View Source

OutputNamespace(String)

Optional. The output namespace. Defaults to AzureFromTheTrenches.Commanding.AspNetCore.Controllers

Declaration
IRestCommandBuilder OutputNamespace(string outputNamespace)
Parameters
Type Name Description
System.String outputNamespace
Returns
Type Description
IRestCommandBuilder
| Improve this Doc View Source

SetExternalTemplateProvider(Func<String, Stream>)

Optional. If set then external templates can be loaded on a per controller basis. The function will be passed a controller name (from the configuration set on the controller builder) and should return null if the default template is to be used or a stream to an alternative template.

Declaration
IRestCommandBuilder SetExternalTemplateProvider(Func<string, Stream> externalTemplateProvider)
Parameters
Type Name Description
System.Func<System.String, System.IO.Stream> externalTemplateProvider
Returns
Type Description
IRestCommandBuilder
| Improve this Doc View Source

TemplateCompilationReferences(Assembly[])

Optional. If you are using custom controller templates you will need to provide assemblies for any references / assemblies you make use of.

Declaration
IRestCommandBuilder TemplateCompilationReferences(params Assembly[] assemblies)
Parameters
Type Name Description
System.Reflection.Assembly[] assemblies

The assemblies to reference

Returns
Type Description
IRestCommandBuilder
  • Improve this Doc
  • View Source
Back to top Generated by DocFX