ITestHostManager.AddTestSessionLifetimeHandler Method

Definition

Overloads

Name Description
AddTestSessionLifetimeHandler(Func<IServiceProvider,ITestSessionLifetimeHandler>)

Adds a test session lifetime handle.

AddTestSessionLifetimeHandler<T>(CompositeExtensionFactory<T>)

Adds a test session lifetime handle of type T.

AddTestSessionLifetimeHandler(Func<IServiceProvider,ITestSessionLifetimeHandler>)

Source:
ITestHostManager.cs
Source:
ITestHostManager.cs
Source:
ITestHostManager.cs

Adds a test session lifetime handle.

public void AddTestSessionLifetimeHandler(Func<IServiceProvider,Microsoft.Testing.Platform.Extensions.TestHost.ITestSessionLifetimeHandler> testSessionLifetimeHandleFactory);
abstract member AddTestSessionLifetimeHandler : Func<IServiceProvider, Microsoft.Testing.Platform.Extensions.TestHost.ITestSessionLifetimeHandler> -> unit
Public Sub AddTestSessionLifetimeHandler (testSessionLifetimeHandleFactory As Func(Of IServiceProvider, ITestSessionLifetimeHandler))

Parameters

testSessionLifetimeHandleFactory
Func<IServiceProvider,ITestSessionLifetimeHandler>

The factory method for creating the test session lifetime handle.

Applies to

AddTestSessionLifetimeHandler<T>(CompositeExtensionFactory<T>)

Source:
ITestHostManager.cs
Source:
ITestHostManager.cs
Source:
ITestHostManager.cs

Adds a test session lifetime handle of type T.

public void AddTestSessionLifetimeHandler<T>(Microsoft.Testing.Platform.Extensions.CompositeExtensionFactory<T> compositeServiceFactory) where T : class, Microsoft.Testing.Platform.Extensions.TestHost.ITestSessionLifetimeHandler;
abstract member AddTestSessionLifetimeHandler : Microsoft.Testing.Platform.Extensions.CompositeExtensionFactory<'T (requires 'T : null and 'T :> Microsoft.Testing.Platform.Extensions.TestHost.ITestSessionLifetimeHandler)> -> unit (requires 'T : null and 'T :> Microsoft.Testing.Platform.Extensions.TestHost.ITestSessionLifetimeHandler)
Public Sub AddTestSessionLifetimeHandler(Of T As {Class, ITestSessionLifetimeHandler}) (compositeServiceFactory As CompositeExtensionFactory(Of T))

Type Parameters

T

The type of the test session lifetime handle.

Parameters

compositeServiceFactory
CompositeExtensionFactory<T>

The composite extension factory for creating the test session lifetime handle.

Applies to