Class ProtoApplicationResolution

Namespace
ProtoTest.Core
Assembly
ProtoTest.Core.dll

Resolves which client a protocol accessor should use for the current application.

public static class ProtoApplicationResolution
Inheritance
ProtoApplicationResolution
Inherited Members

Methods

ResolveApplicationName(ProtoExecutionContext)

Returns the name of the application selected for the test, or null.

public static string? ResolveApplicationName(ProtoExecutionContext context)

Parameters

context ProtoExecutionContext

Returns

string

ResolveClientName(ProtoExecutionContext, string, string?, string?)

Returns the client for protocolName: an explicit requested name wins, then an [Application] binding, then the application's first registered client, then fallback.

public static string ResolveClientName(ProtoExecutionContext context, string protocolName, string? requested = null, string? fallback = null)

Parameters

context ProtoExecutionContext
protocolName string
requested string
fallback string

Returns

string

ResolveState(ProtoExecutionContext)

Returns the application state set by the [Application] attribute, falling back to reading the attribute directly from the test method or class when the lifecycle pipeline did not run it.

public static ProtoApplicationState? ResolveState(ProtoExecutionContext context)

Parameters

context ProtoExecutionContext

Returns

ProtoApplicationState

ResolveTransportClient(ProtoExecutionContext, string?)

Returns the in-process transport client backing applicationName, or null. Used to serve an application's HTTP clients when no base address is configured.

public static HttpClient? ResolveTransportClient(ProtoExecutionContext context, string? applicationName)

Parameters

context ProtoExecutionContext
applicationName string

Returns

HttpClient