DynamicallyAccessedMembersAttribute クラス

定義

指定の Type 上にある特定のメンバーが動的に、たとえば System.Reflection を介してアクセスされることを示します。

public ref class DynamicallyAccessedMembersAttribute sealed : 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)]
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)>]
type DynamicallyAccessedMembersAttribute = class
    inherit 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
Public NotInheritable Class DynamicallyAccessedMembersAttribute
Inherits Attribute
継承
DynamicallyAccessedMembersAttribute
属性

注釈

この属性を使用すると、プログラムの実行中にアクセスされているメンバーをツールで把握できます。 この属性は、型が または Stringのメンバーで有効ですType。 この属性が 型 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)

適用対象

こちらもご覧ください