Table of Contents

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

IsTrusted bool

Whether the candidate plugin assembly is trusted.

Reason string

An optional explanation, typically supplied when the candidate is rejected.

Properties

IsTrusted

Whether the candidate plugin assembly is trusted.

public bool IsTrusted { get; init; }

Property Value

bool

Reason

An optional explanation, typically supplied when the candidate is rejected.

public string? Reason { get; init; }

Property Value

string

Methods

Deconstruct(out bool, out string?)

public void Deconstruct(out bool IsTrusted, out string? Reason)

Parameters

IsTrusted bool
Reason string

Equals(PluginTrustResult?)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(PluginTrustResult? other)

Parameters

other PluginTrustResult

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

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

reason string

The 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

left PluginTrustResult
right PluginTrustResult

Returns

bool

operator !=(PluginTrustResult?, PluginTrustResult?)

public static bool operator !=(PluginTrustResult? left, PluginTrustResult? right)

Parameters

left PluginTrustResult
right PluginTrustResult

Returns

bool

Applies to

ProductVersions
.NET8, 10