共用方式為


ConfigBuilder Class

Definition

The ConfigBuilder class is responsible for initializing the service including ASP.NET Web API, Autofac, and OWIN. The default ConfigBuilder implementation configures the service using default settings but an application can customize this in multiple ways: By providing a ConfigOptions with custom settings; by providing an Action<T1,T2> which can configure the dependency injection engine; or by providing an entirely different IConfigBuilder implementation.

public class ConfigBuilder : Microsoft.WindowsAzure.Mobile.Service.Config.IConfigBuilder
type ConfigBuilder = class
    interface IConfigBuilder
Public Class ConfigBuilder
Implements IConfigBuilder
Inheritance
ConfigBuilder
Implements

Constructors

ConfigBuilder()

Initializes a new instance of the ConfigBuilder class with default settings.

ConfigBuilder(ConfigOptions, Action<ContainerBuilder>)
Obsolete.

Initializes a new instance of the ConfigBuilder class a given options instance providing custom settings and an Action<T> which is called when Autofac is configured allowing the application to inject additional dependencies as well as replacing existing dependencies.

ConfigBuilder(ConfigOptions, Action<HttpConfiguration,ContainerBuilder>)

Initializes a new instance of the ConfigBuilder class a given options instance providing custom settings and an Action<T1,T2> which is called when Autofac is configured allowing the application to inject additional dependencies as well as replacing existing dependencies.

ConfigBuilder(ConfigOptions)

Initializes a new instance of the ConfigBuilder class a given options instance providing custom settings.

Properties

AutofacConfig

The Action<T1,T2> to invoke to configure Autofac.

Options

Gets the ConfigOptions used by this ConfigBuilder.

Methods

ConfigureOwin(HttpConfiguration)

This step is called as part of configuring the OWIN application pipeline.

ConfigureServiceDependencies(HttpConfiguration, ContainerBuilder)

Provides a mechanism by which an application can register additional services with the default dependency injection container.

ConfigureWebApi(HttpConfiguration, IDictionary<Type,Object>)

This step is called as part of configuring ASP.NET Web API. It is passed the config which it can modify in place and a set of serviceInstances infrastructure services which the service depends on. These infrastructure services must be registered with the dependency resolver so that the runtime can obtain them at runtime.

ConfigureWebApiDependencyResolver(HttpConfiguration, IDictionary<Type,Object>)

Initializes the dependency resolver.

OnComplete(HttpConfiguration)

If overridden by a subclass this method is called once initialization has completed.

Applies to