UnsupportedOSPlatformGuardAttribute クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
サポートされていないプラットフォーム名とオプションのバージョンを使用して、カスタム ガード フィールド、プロパティ、またはメソッドに注釈を付けます。 複数の属性を適用して、サポートされていない複数のプラットフォームのガードを示すことができます。
public ref class UnsupportedOSPlatformGuardAttribute sealed : System::Runtime::Versioning::OSPlatformAttribute
[System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Method | System.AttributeTargets.Property, AllowMultiple=true, Inherited=false)]
public sealed class UnsupportedOSPlatformGuardAttribute : System.Runtime.Versioning.OSPlatformAttribute
[<System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Method | System.AttributeTargets.Property, AllowMultiple=true, Inherited=false)>]
type UnsupportedOSPlatformGuardAttribute = class
inherit OSPlatformAttribute
Public NotInheritable Class UnsupportedOSPlatformGuardAttribute
Inherits OSPlatformAttribute
- 継承
- 属性
注釈
呼び出し元は、フィールド、プロパティ、メソッドに UnsupportedOSPlatformGuardAttribute を適用し、条件付きステートメントまたはアサート ステートメントでそのフィールド、プロパティ、またはメソッドをガードとして使用して、それらのプラットフォームでサポートされていない API を安全に呼び出すことができます。
The type of the field or property should be boolean, the method return type should be boolean in order to be used as platform guard.
コンストラクター
| 名前 | 説明 |
|---|---|
| UnsupportedOSPlatformGuardAttribute(String) |
指定したサポートされていない OS プラットフォームの UnsupportedOSPlatformGuardAttribute 属性クラスの新しいインスタンスを初期化します。 |
プロパティ
| 名前 | 説明 |
|---|---|
| PlatformName |
属性が適用されるプラットフォームの名前と省略可能なバージョンを取得します。 (継承元 OSPlatformAttribute) |
| TypeId |
派生クラスで実装されている場合は、この Attributeの一意の識別子を取得します。 (継承元 Attribute) |
メソッド
| 名前 | 説明 |
|---|---|
| Equals(Object) |
このインスタンスが指定したオブジェクトと等しいかどうかを示す値を返します。 (継承元 Attribute) |
| GetHashCode() |
このインスタンスのハッシュ コードを返します。 (継承元 Attribute) |
| GetType() |
現在のインスタンスの Type を取得します。 (継承元 Object) |
| IsDefaultAttribute() |
派生クラスでオーバーライドされた場合、このインスタンスの値が派生クラスの既定値であるかどうかを示します。 (継承元 Attribute) |
| Match(Object) |
派生クラスでオーバーライドされた場合、このインスタンスが指定したオブジェクトと等しいかどうかを示す値を返します。 (継承元 Attribute) |
| MemberwiseClone() |
現在の Objectの簡易コピーを作成します。 (継承元 Object) |
| ToString() |
現在のオブジェクトを表す文字列を返します。 (継承元 Object) |