UnsupportedOSPlatformGuardAttribute クラス

定義

サポートされていないプラットフォーム名とオプションのバージョンを使用して、カスタム ガード フィールド、プロパティ、またはメソッドに注釈を付けます。 複数の属性を適用して、サポートされていない複数のプラットフォームのガードを示すことができます。

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
属性

注釈

呼び出し元は、フィールド、プロパティ、またはメソッドに適用 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)

適用対象