DelegatingPluginTrustPolicy Class
Definition
- Namespace
- Bodu.Globalization.Calendar.Plugins
- Assembly
- Bodu.Globalization.Calendar.Plugins.dll
- Package
- Bodu.Globalization.Calendar.Plugins 1.0.0
A trust policy that delegates the decision to a caller-supplied function, suitable for runtime state, configuration, or remote attestation.
public sealed class DelegatingPluginTrustPolicy : IPluginTrustPolicy
- Inheritance
-
DelegatingPluginTrustPolicy
- Implements
- Inherited Members
- Extension Methods
Constructors
DelegatingPluginTrustPolicy(Func<PluginTrustContext, PluginTrustResult>)
Initializes a new instance of the DelegatingPluginTrustPolicy class.
public DelegatingPluginTrustPolicy(Func<PluginTrustContext, PluginTrustResult> decide)
Parameters
decideFunc<PluginTrustContext, PluginTrustResult>The function that decides trust for a candidate.
Exceptions
- ArgumentNullException
decideis null.
Methods
Evaluate(PluginTrustContext)
Evaluates the trust of a candidate plugin assembly.
public PluginTrustResult Evaluate(PluginTrustContext context)
Parameters
contextPluginTrustContextThe metadata describing the candidate assembly.
Returns
- PluginTrustResult
The trust result.
Exceptions
- ArgumentNullException
contextis null.
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |