Class ProtoTargetBuilder

Namespace
ProtoTest.Http
Assembly
ProtoTest.Http.dll

Shared, protocol-neutral IProtoTargetBuilder for every protocol integration.

public sealed class ProtoTargetBuilder : IProtoTargetBuilder
Inheritance
ProtoTargetBuilder
Implements
Inherited Members
Extension Methods

Constructors

ProtoTargetBuilder(string, IServiceCollection)

Shared, protocol-neutral IProtoTargetBuilder for every protocol integration.

public ProtoTargetBuilder(string targetName, IServiceCollection services)

Parameters

targetName string
services IServiceCollection

Properties

Services

Gets the service collection used to register target services.

public IServiceCollection Services { get; }

Property Value

IServiceCollection

TargetName

Gets the target name used to match observations.

public string TargetName { get; }

Property Value

string

Methods

AddCollector<TCollector>(params object[])

Registers an observation collector once per collector type and target. The interface's default implementation uses a plain singleton, so a repeated call would collect and report twice.

public IProtoTargetBuilder AddCollector<TCollector>(params object[] additionalArguments) where TCollector : class, IProtoCollector

Parameters

additionalArguments object[]

Returns

IProtoTargetBuilder

Type Parameters

TCollector