Interface IProtoClientInitializer
Defines a contract for initializing and registering client instances (e.g., HttpClient, GrpcChannel) into the active ProtoExecutionContext.
public interface IProtoClientInitializer
- Extension Methods
Properties
ClientType
Gets the type under which the client is registered in the execution context.
Type ClientType { get; }
Property Value
Name
Gets the registration name for this client (e.g., "Default", "OrderService"). Initializers with the same name and ClientType form an ordered provider chain.
string Name { get; }
Property Value
Methods
TryInitializeAsync(ProtoExecutionContext, CancellationToken)
Attempts to build and register the client into the specified test execution context. Returns false without changing the context when this initializer cannot provide the client for the current configuration.
Task<bool> TryInitializeAsync(ProtoExecutionContext context, CancellationToken cancellationToken = default)
Parameters
contextProtoExecutionContextcancellationTokenCancellationToken