次の方法で共有


StrongNameIdentityPermissionAttribute クラス

定義

注意事項

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

宣言型セキュリティを使用して StrongNameIdentityPermission のセキュリティ アクションをコードに適用できるようにします。 このクラスは継承できません。

public ref class StrongNameIdentityPermissionAttribute sealed : System::Security::Permissions::CodeAccessSecurityAttribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
[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 StrongNameIdentityPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
[System.Serializable]
public sealed class StrongNameIdentityPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class StrongNameIdentityPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public sealed class StrongNameIdentityPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)>]
[<System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type StrongNameIdentityPermissionAttribute = class
    inherit CodeAccessSecurityAttribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)>]
[<System.Serializable>]
type StrongNameIdentityPermissionAttribute = class
    inherit CodeAccessSecurityAttribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)>]
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type StrongNameIdentityPermissionAttribute = class
    inherit CodeAccessSecurityAttribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)>]
type StrongNameIdentityPermissionAttribute = class
    inherit CodeAccessSecurityAttribute
Public NotInheritable Class StrongNameIdentityPermissionAttribute
Inherits CodeAccessSecurityAttribute
継承
StrongNameIdentityPermissionAttribute
属性

注釈

注意

コード アクセス セキュリティ (CAS) は、.NET Framework と .NET のすべてのバージョンで非推奨になりました。 最近のバージョンの .NET では、CAS に関連する API が使用されている場合、CAS 注釈は使用されず、エラーが発生します。 開発者は、セキュリティ タスクを実行するための代替手段を求める必要があります。

大事な

.NET Framework 4 以降では、ID アクセス許可は使用されません。

許可される宣言のスコープは、使用される SecurityAction によって異なります。 この属性のキー文字列を取得するには、トークンと公開キー オプション (Sn-tpkeyfile) を Authenticode 署名を持つファイルに対して厳密な名前ツール (Sn.exe) を実行します。 詳細については、「Sn.exe (厳密な名前ツール)を参照してください。

セキュリティ属性によって宣言されたセキュリティ情報は、属性ターゲットのメタデータに格納され、実行時にシステムによってアクセスされます。 セキュリティ属性は、宣言型セキュリティにのみ使用されます。 命令型セキュリティの場合は、対応するアクセス許可クラスを使用します。

StrongNameIdentityPermissionAttribute 属性を使用して、アセンブリ レベルでパブリック メンバーにアクセスするための厳密な名前の要件を定義できます。 .NET Framework バージョン 2.0 以降では、InternalsVisibleToAttribute 属性を使用して、そのアセンブリ内のすべての非パブリック型が別のアセンブリに表示されるように指定することもできます。 詳細については、「Friend アセンブリ」を参照してください。

コンストラクター

StrongNameIdentityPermissionAttribute(SecurityAction)
古い.

指定した SecurityActionを使用して、StrongNameIdentityPermissionAttribute クラスの新しいインスタンスを初期化します。

プロパティ

Action
古い.

セキュリティ アクションを取得または設定します。

(継承元 SecurityAttribute)
Name
古い.

厳密な名前 ID の名前を取得または設定します。

PublicKey
古い.

16 進文字列として表される厳密な名前 ID の公開キー値を取得または設定します。

TypeId
古い.

派生クラスで実装されている場合は、この Attributeの一意の識別子を取得します。

(継承元 Attribute)
Unrestricted
古い.

属性によって保護されているリソースに対する完全な (無制限の) アクセス許可が宣言されているかどうかを示す値を取得または設定します。

(継承元 SecurityAttribute)
Version
古い.

厳密な名前 ID のバージョンを取得または設定します。

メソッド

CreatePermission()
古い.

新しい StrongNameIdentityPermissionを作成して返します。

Equals(Object)
古い.

このインスタンスが指定したオブジェクトと等しいかどうかを示す値を返します。

(継承元 Attribute)
GetHashCode()
古い.

このインスタンスのハッシュ コードを返します。

(継承元 Attribute)
GetType()
古い.

現在のインスタンスの Type を取得します。

(継承元 Object)
IsDefaultAttribute()
古い.

派生クラスでオーバーライドされた場合、このインスタンスの値が派生クラスの既定値であるかどうかを示します。

(継承元 Attribute)
Match(Object)
古い.

派生クラスでオーバーライドされた場合、このインスタンスが指定したオブジェクトと等しいかどうかを示す値を返します。

(継承元 Attribute)
MemberwiseClone()
古い.

現在の Objectの簡易コピーを作成します。

(継承元 Object)
ToString()
古い.

現在のオブジェクトを表す文字列を返します。

(継承元 Object)

明示的なインターフェイスの実装

_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)
古い.

名前のセットを、対応するディスパッチ識別子のセットにマップします。

(継承元 Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)
古い.

インターフェイスの型情報を取得するために使用できるオブジェクトの型情報を取得します。

(継承元 Attribute)
_Attribute.GetTypeInfoCount(UInt32)
古い.

オブジェクトが提供する型情報インターフェイスの数を取得します (0 または 1)。

(継承元 Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)
古い.

オブジェクトによって公開されるプロパティとメソッドへのアクセスを提供します。

(継承元 Attribute)

適用対象

こちらもご覧ください