Class ProtoProviderConditionContext

Namespace
ProtoTest.Core
Assembly
ProtoTest.Core.dll

The resolved environment a provider condition is evaluated against.

public sealed record ProtoProviderConditionContext : IEquatable<ProtoProviderConditionContext>
Inheritance
ProtoProviderConditionContext
Implements
Inherited Members
Extension Methods

Constructors

ProtoProviderConditionContext(IConfiguration, IReadOnlyList<string>, IReadOnlyDictionary<string, ProtoResolvedTarget>?)

The resolved environment a provider condition is evaluated against.

public ProtoProviderConditionContext(IConfiguration Configuration, IReadOnlyList<string> Keys, IReadOnlyDictionary<string, ProtoResolvedTarget>? ResolvedTargets = null)

Parameters

Configuration IConfiguration

The run's configuration, resolved when the host was built.

Keys IReadOnlyList<string>

The configuration keys the target declares, once for the whole chain.

ResolvedTargets IReadOnlyDictionary<string, ProtoResolvedTarget>

The targets resolved before this chain, keyed by target name. A chain that declared ResolveAfter(params string[]) reads the winners of those targets here.

Properties

Configuration

The run's configuration, resolved when the host was built.

public IConfiguration Configuration { get; init; }

Property Value

IConfiguration

Keys

The configuration keys the target declares, once for the whole chain.

public IReadOnlyList<string> Keys { get; init; }

Property Value

IReadOnlyList<string>

ResolvedTargets

The targets resolved before this chain, keyed by target name. A chain that declared ResolveAfter(params string[]) reads the winners of those targets here.

public IReadOnlyDictionary<string, ProtoResolvedTarget>? ResolvedTargets { get; init; }

Property Value

IReadOnlyDictionary<string, ProtoResolvedTarget>

Methods

Target(string)

Returns the resolution of a target resolved before this chain, or null.

public ProtoResolvedTarget? Target(string targetName)

Parameters

targetName string

Returns

ProtoResolvedTarget