Class ProtoProviderConditions
The canonical provider conditions: Configured for a target the environment already provides, Selected(string) for an integration-owned selection key, Available(string, Func<bool>) for a runtime probe, and Always for the fallback a chain ends with.
public static class ProtoProviderConditions
- Inheritance
-
ProtoProviderConditions
- Inherited Members
Properties
Always
Holds everywhere: the fallback provider a chain ends with.
public static IProtoProviderCondition Always { get; }
Property Value
Configured
Holds when every configuration key the target declares has a value: the environment already provides what the provider would fill.
public static IProtoProviderCondition Configured { get; }
Property Value
Methods
Available(string, Func<bool>)
Holds when the runtime probe succeeds. requirement names what the probe checks
for the skip record and the no-provider error, for example "Docker is available". The probe runs
once per resolution; an exception it throws propagates - a probe that cannot answer is a provider
bug, not an unavailable environment.
public static IProtoProviderCondition Available(string requirement, Func<bool> probe)
Parameters
Returns
Selected(string)
Holds when the integration-owned selection key has a value - a convention the run script sets as an environment variable, never a parameter of the provider itself.
public static IProtoProviderCondition Selected(string key)
Parameters
keystring
Returns
Selected(string, params string[])
Holds when any of the integration-owned selection keys has a value, so a provider with a broad switch and a per-target switch serves when either is set. Every key is a convention the run script sets as an environment variable, never a parameter of the provider itself.
public static IProtoProviderCondition Selected(string key, params string[] moreKeys)