Class Proto
Provides a static gateway to the active ProtoExecutionContext.
public static class Proto
- Inheritance
-
Proto
- Inherited Members
Properties
Context
Gets the current active test execution context.
public static ProtoExecutionContext Context { get; }
Property Value
Remarks
This is the intended lookup for everything that runs inside a test on the test's flow: test bodies, test-author entries and the plumbing they call. It throws when no test is active, so code that runs off the test's flow (telemetry callbacks, library threads) must use FindTraceWriter(Activity?) and correlate by trace id instead, and run-level code must use its host reference or CurrentHost. See the "Context lookups" section in CONTRIBUTING.md.
Host
Gets the active ProtoTest host.
public static ProtoHost Host { get; }