Interface IProtoApplicationBuilder

Namespace
ProtoTest.Core
Assembly
ProtoTest.Core.dll

Configures one named application under test. Integrations extend it, for example with app.AddRest(rest => rest.AddClient("Orders")), to expose the protocols and clients the application supports. The first client registered for a protocol becomes that protocol's default.

public interface IProtoApplicationBuilder
Extension Methods

Properties

ApplicationName

Gets the application name, matching [Application(name)] and configuration.

string ApplicationName { get; }

Property Value

string

Host

Gets the host builder the application is declared on, so an integration reached from inside AddApplication registers run-level pieces - a nested worker - through the same entries it uses outside.

IProtoHostBuilder Host { get; }

Property Value

IProtoHostBuilder

Providers

Gets the ordered provider chain that resolves the application's address - the derived ProtoTest:Applications:{name}:BaseUrl key. Providers are added in priority order (UseConfigured(), UseInProcess<TProgram>(), UseLoopback(...), an integration's UseAspireResource(...)); the first whose condition holds serves the application and only its capabilities are declared. An application that declares no provider keeps the plain configured-address behavior.

IProtoProviderChainBuilder Providers { get; }

Property Value

IProtoProviderChainBuilder

Services

Gets the service collection the application's clients are registered into.

IServiceCollection Services { get; }

Property Value

IServiceCollection

Methods

RegisterClient(string, string)

Records a named client of a protocol so accessors can resolve it by application.

void RegisterClient(string protocolName, string clientName)

Parameters

protocolName string
clientName string