ITestHostHandle Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a launched test host that the platform monitors for completion.
public interface ITestHostHandle : IDisposable
type ITestHostHandle = interface
interface IDisposable
Public Interface ITestHostHandle
Implements IDisposable
- Implements
Remarks
The handle is intentionally agnostic of the underlying launch mechanism: it does not assume a local OS process. Identifier is therefore an optional, free-form string used only for diagnostics; the platform tracks completion through WaitForExitAsync(CancellationToken), HasExited, and ExitCode. The platform owns the handle for the whole lifetime of the test host and disposes it (via IDisposable) once the host has exited, so implementations should release any OS resources they hold (process objects, sockets, container clients, …) in Dispose().
Properties
| Name | Description |
|---|---|
| ExitCode |
Gets the exit code of the test host. |
| HasExited |
Gets a value indicating whether the test host has exited. |
| Identifier |
Gets an optional, free-form identifier for the launched test host, used only for diagnostics. |
Methods
| Name | Description |
|---|---|
| Terminate() |
Terminates the test host. The platform calls this for best-effort teardown (for example when hang dump decides to abort the run). |
| WaitForExitAsync(CancellationToken) |
Waits asynchronously for the test host to exit, or for |