Interface IProtoProviderChainBuilder

Namespace
ProtoTest.Core
Assembly
ProtoTest.Core.dll

Builds one target's provider chain. Providers are added in priority order: the first whose condition holds serves the target, and every later provider is recorded skipped with the reason.

public interface IProtoProviderChainBuilder
Extension Methods

Properties

Keys

Gets the configuration keys the target declares once; every provider checks or fills them.

IReadOnlyList<string> Keys { get; }

Property Value

IReadOnlyList<string>

Services

Gets the service collection this target's composition registers into.

IServiceCollection Services { get; }

Property Value

IServiceCollection

TargetName

Gets the target's name, used to identify the chain in records and error messages.

string TargetName { get; }

Property Value

string

Methods

ResolveAfter(params string[])

Resolves this target after the named targets, so a condition on this chain can read their winners through Target(string). A worker nested under an application resolves after it: whether the run hosts it depends on how the application is served. Targets resolved before this chain are also visible without it; this only orders one chain behind another whose own chain would otherwise resolve later.

IProtoProviderChainBuilder ResolveAfter(params string[] targetNames)

Parameters

targetNames string[]

Returns

IProtoProviderChainBuilder

Use(IProtoTargetProvider)

Adds a provider to the end of the chain; a later provider is lower priority.

IProtoProviderChainBuilder Use(IProtoTargetProvider provider)

Parameters

provider IProtoTargetProvider

Returns

IProtoProviderChainBuilder

UseConfigured()

Adds the provider that serves from configured values: it holds when every key the target declares has one, and it starts nothing.

IProtoProviderChainBuilder UseConfigured()

Returns

IProtoProviderChainBuilder