Litium 7.4

Class Application

Litium Owin Application entry point and will handle the applications lifecycle. When application should be started the Start(IEnumerable<Assembly>, IEnumerable<Type>) should be executed with the list of needed assemblies for the application, the list of assemblies are used for initialization of components and dependency injection. When the appliation are started where an System.Web.Hosting.HostingEnvironment exists the application will automatic register for the shutdown notification and will stop the application when the event are fired. During startup the process will fire different tasks in different step, the order the tasks are executed in are: IPreSetupTask, ISetupTask, IPostSetupTask, IStartupTask and IStartupTaskAsync. The startup process are running all except the IStartupTaskAsync in synchronous and before returning that the application are started the IStartupTaskAsync are started. When application should be stopped the Stop() should be executed, that will execute all the IReleaseTask that are registered.

Inheritance
System.Object
Application
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Litium.Owin.Lifecycle
Assembly: Litium.Owin.dll
Syntax
public static class Application

Fields

ApplicationName

The application name

Declaration
public const string ApplicationName = "Litium"
Field Value
Type Description
System.String

Properties

ApplicationStopping

Triggered when the application host is performing a graceful shutdown. Request may still be in flight. Shutdown will block until this event completes.

Declaration
public static CancellationToken ApplicationStopping { get; }
Property Value
Type Description
System.Threading.CancellationToken

DependencyInjectionCreated

Triggered when the application dependency injection is initialized.

Declaration
public static CancellationToken DependencyInjectionCreated { get; }
Property Value
Type Description
System.Threading.CancellationToken

IsStarted

Gets a value indicating whether this application is started.

Declaration
public static bool IsStarted { get; }
Property Value
Type Description
System.Boolean

true if this application is started; otherwise, false.

Methods

Start(IEnumerable<Assembly>)

Starts the specified assemblies.

Declaration
public static void Start([NotNull] IEnumerable<Assembly> assemblies)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.Reflection.Assembly> assemblies

The assemblies.

Exceptions
Type Condition
System.Exception

Application was not able to find IoC container. Ensure that Litium.Infrastructure.InversionOfControl exists in your applications assembly folder.

Start(IEnumerable<Assembly>, IEnumerable<Type>)

Starts the specified assemblies.

Declaration
public static void Start([NotNull] IEnumerable<Assembly> assemblies, [NotNull] IEnumerable<Type> typesToIgnore)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.Reflection.Assembly> assemblies

The assemblies.

System.Collections.Generic.IEnumerable<System.Type> typesToIgnore

The types to ignore.

Exceptions
Type Condition
System.Exception

Application was not able to find IoC container. Ensure that Litium.Infrastructure.InversionOfControl exists in your applications assembly folder.

Stop()

Stops this instance.

Declaration
public static void Stop()