WebPermissionAttribute クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
注意事項
Code Access Security is not supported or honored by the runtime.
インターネット リソースにアクセスするためのアクセス許可を指定します。 このクラスは継承できません。
public ref class WebPermissionAttribute 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 WebPermissionAttribute : 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 WebPermissionAttribute : 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 WebPermissionAttribute : 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 WebPermissionAttribute = 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 WebPermissionAttribute = 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 WebPermissionAttribute = class
inherit CodeAccessSecurityAttribute
Public NotInheritable Class WebPermissionAttribute
Inherits CodeAccessSecurityAttribute
- 継承
- 属性
注釈
注意事項
コード アクセス セキュリティ (CAS) は、.NET Framework と .NET のすべてのバージョンで非推奨になりました。 最近のバージョンの .NET では、CAS に関連する API が使用されている場合、CAS 注釈は使用されず、エラーが発生します。 開発者は、セキュリティ タスクを実行するための代替手段を求める必要があります。
WebPermissionAttribute を使用すると、クラスで使用できる URI 文字列と正規表現文字列を宣言によって指定できます。
WebPermissionAttributeで指定されたセキュリティ情報は、WebPermissionAttributeが適用されるクラスである属性ターゲットのメタデータに格納されます。 システムは実行時にこの情報にアクセスします。 コンストラクターに渡される System.Security.Permissions.SecurityAction は、許容される WebPermissionAttribute ターゲットを決定します。 システムは、CreatePermission メソッドによって返されるWebPermissionを使用して、属性ターゲットのセキュリティ情報を、メタデータに格納されているシリアル化可能な形式に変換します。
Note
WebPermissionAttribute は宣言型セキュリティにのみ使用されます。 命令型セキュリティの場合は、対応する WebPermissionを使用します。
コンストラクター
| 名前 | 説明 |
|---|---|
| WebPermissionAttribute(SecurityAction) |
古い.
このクラスで実行できるセキュリティ アクションを指定する値を使用して、 WebPermissionAttribute クラスの新しいインスタンスを初期化します。 |
プロパティ
| 名前 | 説明 |
|---|---|
| Accept |
古い.
現在の WebPermissionAttributeで受け入れられる URI 文字列を取得または設定します。 |
| AcceptPattern |
古い.
現在の WebPermissionAttributeで受け入れられる URI を記述する正規表現パターンを取得または設定します。 |
| Action |
古い.
セキュリティ アクションを取得または設定します。 (継承元 SecurityAttribute) |
| Connect |
古い.
現在の WebPermissionAttributeによって制御される URI 接続文字列を取得または設定します。 |
| ConnectPattern |
古い.
現在の WebPermissionAttributeによって制御される URI 接続を記述する正規表現パターンを取得または設定します。 |
| TypeId |
古い.
派生クラスで実装されている場合は、この Attributeの一意の識別子を取得します。 (継承元 Attribute) |
| Unrestricted |
古い.
属性によって保護されているリソースに対する完全な (無制限の) アクセス許可が宣言されているかどうかを示す値を取得または設定します。 (継承元 SecurityAttribute) |
メソッド
| 名前 | 説明 |
|---|---|
| CreatePermission() |
古い.
WebPermission クラスの新しいインスタンスを作成して返します。 |
| 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) |