PluginTrustContext Class
Definition
- Namespace
- Bodu.Globalization.Calendar.Plugins
- Assembly
- Bodu.Globalization.Calendar.Plugins.dll
- Package
- Bodu.Globalization.Calendar.Plugins 1.0.0
- Source
- PluginTrustContext.cs
Carries the metadata a trust policy evaluates before a plugin assembly's code is activated.
public sealed record PluginTrustContext : IEquatable<PluginTrustContext>
- Inheritance
-
PluginTrustContext
- Implements
- Inherited Members
- Extension Methods
Constructors
PluginTrustContext(string, string?, byte[]?, string?)
Carries the metadata a trust policy evaluates before a plugin assembly's code is activated.
public PluginTrustContext(string AssemblyName, string? AssemblyPath, byte[]? FileHash, string? PublicKeyToken = null)
Parameters
AssemblyNamestringThe simple name of the candidate assembly.
AssemblyPathstringThe file path of the candidate assembly, or null when loaded in memory.
FileHashbyte[]The SHA-256 hash of the assembly file, or null when no file is available.
PublicKeyTokenstringThe strong-name public-key token as lowercase hexadecimal, or null when the assembly is not strong-named.
Properties
AssemblyName
The simple name of the candidate assembly.
public string AssemblyName { get; init; }
Property Value
AssemblyPath
The file path of the candidate assembly, or null when loaded in memory.
public string? AssemblyPath { get; init; }
Property Value
FileHash
The SHA-256 hash of the assembly file, or null when no file is available.
public byte[]? FileHash { get; init; }
Property Value
- byte[]
PublicKeyToken
The strong-name public-key token as lowercase hexadecimal, or null when the assembly is not strong-named.
public string? PublicKeyToken { get; init; }
Property Value
Methods
Deconstruct(out string, out string?, out byte[]?, out string?)
public void Deconstruct(out string AssemblyName, out string? AssemblyPath, out byte[]? FileHash, out string? PublicKeyToken)
Parameters
Equals(PluginTrustContext?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(PluginTrustContext? other)
Parameters
otherPluginTrustContextAn 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.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
Operators
operator ==(PluginTrustContext?, PluginTrustContext?)
public static bool operator ==(PluginTrustContext? left, PluginTrustContext? right)
Parameters
leftPluginTrustContextrightPluginTrustContext
Returns
operator !=(PluginTrustContext?, PluginTrustContext?)
public static bool operator !=(PluginTrustContext? left, PluginTrustContext? right)
Parameters
leftPluginTrustContextrightPluginTrustContext
Returns
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |