Class ProtobufRecordingBuilder

Namespace
Kuestenlogik.Bowire.Protocol.Grpc.Mock
Assembly
Kuestenlogik.Bowire.Protocol.Grpc.dll

Turns a protobuf Google.Protobuf.Reflection.FileDescriptorSet binary (the output of protoc --descriptor_set_out=...) into a synthetic BowireRecording: every gRPC method in every service becomes a step with ResponseBinary populated from ProtobufSampleEncoder. The existing mock pipeline — UnaryReplayer.ReplayGrpcAsync + DescriptorPool + Grpc.Reflection.ReflectionServiceImpl — handles the rest with no new wiring.

public static class ProtobufRecordingBuilder
Inheritance
ProtobufRecordingBuilder
Inherited Members

Methods

Build(IReadOnlyList<FileDescriptor>, IReadOnlyList<FileDescriptorProto>?, string)

Test-friendly overload operating on already-built descriptors.

public static BowireRecording Build(IReadOnlyList<FileDescriptor> descriptors, IReadOnlyList<FileDescriptorProto>? fileProtos, string sourceLabel)

Parameters

descriptors IReadOnlyList<FileDescriptor>
fileProtos IReadOnlyList<FileDescriptorProto>
sourceLabel string

Returns

BowireRecording

LoadAsync(string, CancellationToken)

Load a .pb file and build the synthetic recording.

public static Task<BowireRecording> LoadAsync(string path, CancellationToken ct)

Parameters

path string
ct CancellationToken

Returns

Task<BowireRecording>