DynamicallyAccessedMembersAttribute クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
指定した Type 上の特定のメンバーが、たとえば、System.Reflectionを通じて動的にアクセスされることを示します。
public ref class DynamicallyAccessedMembersAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Field | System.AttributeTargets.GenericParameter | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Parameter | System.AttributeTargets.Property | System.AttributeTargets.ReturnValue | System.AttributeTargets.Struct, Inherited=false)]
public sealed class DynamicallyAccessedMembersAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.GenericParameter | System.AttributeTargets.Method | System.AttributeTargets.Parameter | System.AttributeTargets.Property | System.AttributeTargets.ReturnValue, Inherited=false)]
public sealed class DynamicallyAccessedMembersAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Field | System.AttributeTargets.GenericParameter | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Parameter | System.AttributeTargets.Property | System.AttributeTargets.ReturnValue | System.AttributeTargets.Struct, Inherited=false)>]
type DynamicallyAccessedMembersAttribute = class
inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.GenericParameter | System.AttributeTargets.Method | System.AttributeTargets.Parameter | System.AttributeTargets.Property | System.AttributeTargets.ReturnValue, Inherited=false)>]
type DynamicallyAccessedMembersAttribute = class
inherit Attribute
Public NotInheritable Class DynamicallyAccessedMembersAttribute
Inherits Attribute
- 継承
- 属性
注釈
この属性を使用すると、プログラムの実行中にアクセスされているメンバーをツールで把握できます。
この属性は、型が Type または Stringメンバーで有効です。
この属性が String型の場所に適用される場合、文字列は完全修飾型名を表すと想定されます。
属性がメソッドに適用される場合、属性は特殊なケースとして扱われ、属性をメソッドの "this" パラメーターに適用する必要があることを意味します。 この属性は、 Type に割り当てることができる型のインスタンス メソッドでのみ使用する必要があります (または stringが、そこで使用するメソッドはありません)。
詳細については、「 警告をトリミングする方法を参照してください。
コンストラクター
| 名前 | 説明 |
|---|---|
| DynamicallyAccessedMembersAttribute(DynamicallyAccessedMemberTypes) |
指定したメンバー型を使用して、 DynamicallyAccessedMembersAttribute クラスの新しいインスタンスを初期化します。 |
プロパティ
| 名前 | 説明 |
|---|---|
| MemberTypes |
動的にアクセスされるメンバーの種類を指定する DynamicallyAccessedMemberTypes を取得します。 |
| TypeId |
派生クラスで実装されている場合は、この Attributeの一意の識別子を取得します。 (継承元 Attribute) |
メソッド
| 名前 | 説明 |
|---|---|
| Equals(Object) |
このインスタンスが指定したオブジェクトと等しいかどうかを示す値を返します。 (継承元 Attribute) |
| GetHashCode() |
このインスタンスのハッシュ コードを返します。 (継承元 Attribute) |
| GetType() |
現在のインスタンスの Type を取得します。 (継承元 Object) |
| IsDefaultAttribute() |
派生クラスでオーバーライドされた場合、このインスタンスの値が派生クラスの既定値であるかどうかを示します。 (継承元 Attribute) |
| Match(Object) |
派生クラスでオーバーライドされた場合、このインスタンスが指定したオブジェクトと等しいかどうかを示す値を返します。 (継承元 Attribute) |
| MemberwiseClone() |
現在の Objectの簡易コピーを作成します。 (継承元 Object) |
| ToString() |
現在のオブジェクトを表す文字列を返します。 (継承元 Object) |