Assembly.GetCustomAttributesData メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
現在の Assembly に適用されている属性に関する情報を、CustomAttributeData オブジェクトとして返します。
public:
virtual System::Collections::Generic::IList<System::Reflection::CustomAttributeData ^> ^ GetCustomAttributesData();
public virtual System.Collections.Generic.IList<System.Reflection.CustomAttributeData> GetCustomAttributesData ();
abstract member GetCustomAttributesData : unit -> System.Collections.Generic.IList<System.Reflection.CustomAttributeData>
override this.GetCustomAttributesData : unit -> System.Collections.Generic.IList<System.Reflection.CustomAttributeData>
Public Overridable Function GetCustomAttributesData () As IList(Of CustomAttributeData)
戻り値
現在のアセンブリに適用されている属性に関するデータを表す CustomAttributeData オブジェクトのジェネリック リスト。
注釈
リフレクション専用コンテキストに読み込まれるコードでカスタム属性自体が定義されている場合は、このメソッドを使用して、リフレクションのみのコンテキストでコードのカスタム属性を調べます。 このような場合、メソッドは属性のインスタンスを作成するため、このような場合は使用Attribute.GetCustomAttributesAssembly.GetCustomAttributesできません。 リフレクションのみのコンテキスト内のコードは実行できません。 詳細とコードの例については、クラスを CustomAttributeData 参照してください。