Class ProtoTargetProvider
A provider described by its parts: a name, the piece that serves the target, the condition, the capabilities it serves and the services the winner contributes. Use it when the provider has no behavior beyond those parts; implement IProtoTargetProvider when it does.
public sealed record ProtoTargetProvider : IProtoTargetProvider, IEquatable<ProtoTargetProvider>
- Inheritance
-
ProtoTargetProvider
- Implements
- Inherited Members
- Extension Methods
Constructors
ProtoTargetProvider(string, IProtoInfrastructure?, IProtoProviderCondition?)
A provider described by its parts: a name, the piece that serves the target, the condition, the capabilities it serves and the services the winner contributes. Use it when the provider has no behavior beyond those parts; implement IProtoTargetProvider when it does.
public ProtoTargetProvider(string Name, IProtoInfrastructure? Infrastructure = null, IProtoProviderCondition? Condition = null)
Parameters
NamestringThe provider's name in the resolution record and skip reasons.
InfrastructureIProtoInfrastructureThe piece that serves the target when this provider wins; none when configuration itself serves it.
ConditionIProtoProviderConditionWhen the provider can serve the target; none means always.
Properties
Capabilities
Gets the capabilities the provider serves. Only the winning provider's capabilities are declared, so a losing provider never advertises something the run cannot do.
public IReadOnlyList<ProtoCapabilityDescriptor> Capabilities { get; init; }
Property Value
Condition
When the provider can serve the target; none means always.
public IProtoProviderCondition? Condition { get; init; }
Property Value
Infrastructure
The piece that serves the target when this provider wins; none when configuration itself serves it.
public IProtoInfrastructure? Infrastructure { get; init; }
Property Value
Name
The provider's name in the resolution record and skip reasons.
public string Name { get; init; }
Property Value
WinnerServices
The services the provider contributes when it wins its target, in the ConfigureServices(IServiceCollection) contract. null leaves the winner with no services of its own.
public Action<IServiceCollection>? WinnerServices { get; init; }