PluginTrustResult Class
Definition
- Namespace
- Bodu.Globalization.Calendar.Plugins
- Assembly
- Bodu.Globalization.Calendar.Plugins.dll
- Package
- Bodu.Globalization.Calendar.Plugins 1.0.0
- Source
- PluginTrustResult.cs
The outcome of a trust-policy evaluation.
public sealed record PluginTrustResult : IEquatable<PluginTrustResult>
- Inheritance
-
PluginTrustResult
- Implements
- Inherited Members
- Extension Methods
Constructors
PluginTrustResult(bool, string?)
The outcome of a trust-policy evaluation.
public PluginTrustResult(bool IsTrusted, string? Reason)
Parameters
Properties
IsTrusted
Whether the candidate plugin assembly is trusted.
public bool IsTrusted { get; init; }
Property Value
Reason
An optional explanation, typically supplied when the candidate is rejected.
public string? Reason { get; init; }
Property Value
Methods
Deconstruct(out bool, out string?)
public void Deconstruct(out bool IsTrusted, out string? Reason)
Parameters
Equals(PluginTrustResult?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(PluginTrustResult? other)
Parameters
otherPluginTrustResultAn object to compare with this object.
Returns
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
Rejected(string)
Creates a rejected result with an explanation.
public static PluginTrustResult Rejected(string reason)
Parameters
reasonstringThe reason the candidate was rejected.
Returns
- PluginTrustResult
A result indicating rejection.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
Trusted()
Creates a trusted result.
public static PluginTrustResult Trusted()
Returns
- PluginTrustResult
A result indicating trust.
Operators
operator ==(PluginTrustResult?, PluginTrustResult?)
public static bool operator ==(PluginTrustResult? left, PluginTrustResult? right)
Parameters
leftPluginTrustResultrightPluginTrustResult
Returns
operator !=(PluginTrustResult?, PluginTrustResult?)
public static bool operator !=(PluginTrustResult? left, PluginTrustResult? right)
Parameters
leftPluginTrustResultrightPluginTrustResult
Returns
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |