Redigera

Dela via


StrongNameMembershipCondition Class

Definition

Caution

Code Access Security is not supported or honored by the runtime.

Determines whether an assembly belongs to a code group by testing its strong name. This class cannot be inherited.

public ref class StrongNameMembershipCondition sealed : System::Security::ISecurityEncodable, System::Security::Policy::IMembershipCondition
public ref class StrongNameMembershipCondition sealed : System::Security::Policy::IMembershipCondition
public ref class StrongNameMembershipCondition sealed
[System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public sealed class StrongNameMembershipCondition : System.Security.ISecurityEncodable, System.Security.Policy.IMembershipCondition
[System.Serializable]
public sealed class StrongNameMembershipCondition : System.Security.Policy.IMembershipCondition
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class StrongNameMembershipCondition
public sealed class StrongNameMembershipCondition : System.Security.ISecurityEncodable, System.Security.Policy.IMembershipCondition
[<System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type StrongNameMembershipCondition = class
    interface ISecurityEncodable
    interface ISecurityPolicyEncodable
    interface IMembershipCondition
[<System.Serializable>]
type StrongNameMembershipCondition = class
    interface IMembershipCondition
    interface ISecurityEncodable
    interface ISecurityPolicyEncodable
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type StrongNameMembershipCondition = class
    interface IMembershipCondition
    interface ISecurityEncodable
    interface ISecurityPolicyEncodable
type StrongNameMembershipCondition = class
    interface ISecurityEncodable
    interface ISecurityPolicyEncodable
    interface IMembershipCondition
Public NotInheritable Class StrongNameMembershipCondition
Implements IMembershipCondition, ISecurityEncodable
Public NotInheritable Class StrongNameMembershipCondition
Implements IMembershipCondition
Public NotInheritable Class StrongNameMembershipCondition
Inheritance
StrongNameMembershipCondition
Attributes
Implements

Remarks

Caution

Code Access Security (CAS) has been deprecated across all versions of .NET Framework and .NET. Recent versions of .NET do not honor CAS annotations and produce errors if CAS-related APIs are used. Developers should seek alternative means of accomplishing security tasks.

Strong names are well suited to specifying code assemblies to which you give a rich set of powerful permissions. Since strong names are cryptographically verified, attackers cannot impersonate rightful assemblies and use their permissions.

Constructors

StrongNameMembershipCondition(StrongNamePublicKeyBlob, String, Version)

Initializes a new instance of the StrongNameMembershipCondition class with the strong name public key blob, name, and version number that determine membership.

Properties

Name

Gets or sets the simple name of the StrongName for which the membership condition tests.

PublicKey

Gets or sets the StrongNamePublicKeyBlob of the StrongName for which the membership condition tests.

Version

Gets or sets the Version of the StrongName for which the membership condition tests.

Methods

Check(Evidence)

Determines whether the specified evidence satisfies the membership condition.

Copy()

Creates an equivalent copy of the current StrongNameMembershipCondition.

Equals(Object)

Determines whether the StrongName from the specified object is equivalent to the StrongName contained in the current StrongNameMembershipCondition.

FromXml(SecurityElement, PolicyLevel)

Reconstructs a security object with a specified state from an XML encoding.

FromXml(SecurityElement)

Reconstructs a security object with a specified state from an XML encoding.

GetHashCode()

Returns the hash code for the current StrongNameMembershipCondition.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Creates and returns a string representation of the current StrongNameMembershipCondition.

ToXml()

Creates an XML encoding of the security object and its current state.

ToXml(PolicyLevel)

Creates an XML encoding of the security object and its current state with the specified PolicyLevel.

Applies to