Class ProtoApplicationResolution
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
contextProtoExecutionContext
Returns
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
contextProtoExecutionContextprotocolNamestringrequestedstringfallbackstring
Returns
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
contextProtoExecutionContext
Returns
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
contextProtoExecutionContextapplicationNamestring