Class ProtoHostBuilderExtensions

Namespace
ProtoTest.Grpc
Assembly
ProtoTest.Grpc.dll
public static class ProtoHostBuilderExtensions
Inheritance
ProtoHostBuilderExtensions
Inherited Members

Methods

AddGrpc(IProtoApplicationBuilder, Action<ProtoGrpcBuilder>?)

Exposes gRPC under an application. Named clients are registered relative to the application and take their address from ProtoTest:Applications:{app}:Grpc:Address, falling back to the application's BaseUrl or in-process transport. A repeated call runs its configure too, so its clients compose.

public static IProtoApplicationBuilder AddGrpc(this IProtoApplicationBuilder application, Action<ProtoGrpcBuilder>? configure = null)

Parameters

application IProtoApplicationBuilder
configure Action<ProtoGrpcBuilder>

Returns

IProtoApplicationBuilder

AddGrpc(IProtoHostBuilder, Action<ProtoGrpcBuilder>?)

Adds the gRPC capability. A repeated call is not a no-op: its configure callback always runs, so a second call composes more clients while the hook and capability stay registered once. A call whose configure throws leaves no guard behind, so a later successful call still composes.

public static IProtoHostBuilder AddGrpc(this IProtoHostBuilder builder, Action<ProtoGrpcBuilder>? configure = null)

Parameters

builder IProtoHostBuilder
configure Action<ProtoGrpcBuilder>

Returns

IProtoHostBuilder