Table of Contents

Class ApplicationStartup

Namespace
Tlabs.Server
Assembly
Tlabs.SrvBase.dll

Class to facillitate the creation of the application's start-up configuration expressed as a pre-configured IHostBuilder.

public sealed class ApplicationStartup
Inheritance
ApplicationStartup
Inherited Members
Extension Methods

Remarks

The ambition of this ApplicationStartup class is to reducee hard-coded pre-configuration to an absolute minimum with favor of leveraging the IConfigurator<T> base ApplyConfigurator(...) pattern.

Constructors

ApplicationStartup(IWebHostEnvironment)

Ctor taking env.

public ApplicationStartup(IWebHostEnvironment env)

Parameters

env IWebHostEnvironment

Fields

DFLT_HOST_SECTION

Default section of the configuratiion to be used for the start-up hosting environment setup.

public const string DFLT_HOST_SECTION = "webHosting"

Field Value

string

Methods

Configure(IApplicationBuilder)

Configure the application middleware (HTTP request pipeline).

public void Configure(IApplicationBuilder app)

Parameters

app IApplicationBuilder

Remarks

This method gets called by the runtime after services have been configured with ConfigureServices().

ConfigureServices(IServiceCollection)

Configure application service provider container.

public void ConfigureServices(IServiceCollection services)

Parameters

services IServiceCollection

Remarks

This method gets called by the runtime before calling Configure().

CreateServerHostBuilder(string, string[]?)

Create a IHostBuilder from hostSection and command line args.

[Obsolete("Use Tlabs.Config.HostedAppBuilder as a replacement.", false)]
public static IHostBuilder CreateServerHostBuilder(string hostSection, string[]? args = null)

Parameters

hostSection string
args string[]

Returns

IHostBuilder

CreateServerHostBuilder(string[]?)

Create a IHostBuilder from optional command line args.

[Obsolete("Use Tlabs.Config.HostedAppBuilder as a replacement.", false)]
public static IHostBuilder CreateServerHostBuilder(string[]? args = null)

Parameters

args string[]

Returns

IHostBuilder