Show / Hide Table of Contents

Class WpfHostBuilderExtensions

Inheritance
System.Object
WpfHostBuilderExtensions
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: Injecter.Hosting.Wpf
Assembly: Injecter.Hosting.Wpf.dll
Syntax
public static class WpfHostBuilderExtensions

Methods

| Improve this Doc View Source

UseWpfLifetime(IHostBuilder)

Listens for Application.Current.Exit to start the shutdown process. This will unblock extensions like RunAsync and WaitForShutdownAsync.

Declaration
public static IHostBuilder UseWpfLifetime(this IHostBuilder hostBuilder)
Parameters
Type Name Description
Microsoft.Extensions.Hosting.IHostBuilder hostBuilder

The Microsoft.Extensions.Hosting.IHostBuilder to configure.

Returns
Type Description
Microsoft.Extensions.Hosting.IHostBuilder

The same instance of the Microsoft.Extensions.Hosting.IHostBuilder for chaining.

| Improve this Doc View Source

UseWpfLifetime(IHostBuilder, Action<WpfLifeTimeOptions>)

Listens for Application.Current.Exit to start the shutdown process. This will unblock extensions like RunAsync and WaitForShutdownAsync.

Declaration
public static IHostBuilder UseWpfLifetime(this IHostBuilder hostBuilder, Action<WpfLifeTimeOptions> configureOptions)
Parameters
Type Name Description
Microsoft.Extensions.Hosting.IHostBuilder hostBuilder

The Microsoft.Extensions.Hosting.IHostBuilder to configure.

System.Action<WpfLifeTimeOptions> configureOptions

The delegate for configuring the WpfLifetime.

Returns
Type Description
Microsoft.Extensions.Hosting.IHostBuilder

The same instance of the Microsoft.Extensions.Hosting.IHostBuilder for chaining.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX