指定したアセンブリの属性を列挙します。
名前空間: Microsoft.Windows.Design.Metadata
アセンブリ: Microsoft.Windows.Design.Extensibility (Microsoft.Windows.Design.Extensibility.dll 内)
構文
'宣言
Public Function GetAttributes ( _
assembly As Assembly, _
attributeType As Type, _
reflectionMapper As Func(Of Object, Object) _
) As IEnumerable(Of Object)
public IEnumerable<Object> GetAttributes(
Assembly assembly,
Type attributeType,
Func<Object, Object> reflectionMapper
)
public:
IEnumerable<Object^>^ GetAttributes(
Assembly^ assembly,
Type^ attributeType,
Func<Object^, Object^>^ reflectionMapper
)
member GetAttributes :
assembly:Assembly *
attributeType:Type *
reflectionMapper:Func<Object, Object> -> IEnumerable<Object>
public function GetAttributes(
assembly : Assembly,
attributeType : Type,
reflectionMapper : Func<Object, Object>
) : IEnumerable<Object>
パラメーター
- assembly
型: System.Reflection.Assembly
属性を列挙する対象のアセンブリ。
- attributeType
型: System.Type
列挙対象の属性の型。すべての属性を列挙する場合は nullnull 参照 (Visual Basic では Nothing)。
- reflectionMapper
型: System.Func<Object, Object>
受信するリフレクション メタデータをランタイム メタデータに割り当てるオプションのマッピング関数。
戻り値
型: System.Collections.Generic.IEnumerable<Object>
属性の列挙体。
例外
例外 | 条件 |
---|---|
ArgumentNullException | assembly は nullnull 参照 (Visual Basic では Nothing) なので、 |
解説
返される属性には、実際のアセンブリで定義されている属性と、このコンテナーに追加された属性テーブルで定義されている属性があります。 属性テーブルで定義されている属性は、アセンブリで定義されている属性よりも優先されます。
.NET Framework セキュリティ
- 直前の呼び出し元に対する完全な信頼。 このメンバーは、部分的に信頼されているコードから使用することはできません。 詳細については、「部分信頼コードからのライブラリの使用」を参照してください。