Language

CustomAttributeExtensions.GetCustomAttributes メソッド

定義

指定した要素に適用されるカスタム属性のコレクションを取得します。

オーバーロード

名前 説明
GetCustomAttributes(ParameterInfo, Type, Boolean)

指定したパラメーターに適用される、指定した型のカスタム属性のコレクションを取得し、必要に応じてそのパラメーターの先祖を検査します。

GetCustomAttributes(MemberInfo, Type, Boolean)

指定したメンバーに適用される、指定した型のカスタム属性のコレクションを取得し、必要に応じてそのメンバーの先祖を検査します。

GetCustomAttributes(ParameterInfo, Type)

指定したパラメーターに適用される、指定した型のカスタム属性のコレクションを取得します。

GetCustomAttributes(ParameterInfo, Boolean)

指定したパラメーターに適用されるカスタム属性のコレクションを取得し、必要に応じてそのパラメーターの先祖を検査します。

GetCustomAttributes(Module, Type)

指定したモジュールに適用される、指定した型のカスタム属性のコレクションを取得します。

GetCustomAttributes(MemberInfo, Type)

指定したメンバーに適用される、指定した型のカスタム属性のコレクションを取得します。

GetCustomAttributes(MemberInfo, Boolean)

指定したメンバーに適用されるカスタム属性のコレクションを取得し、必要に応じてそのメンバーの先祖を検査します。

GetCustomAttributes(Assembly, Type)

指定したアセンブリに適用される、指定した型のカスタム属性のコレクションを取得します。

GetCustomAttributes(ParameterInfo)

指定したパラメーターに適用されるカスタム属性のコレクションを取得します。

GetCustomAttributes(Module)

指定したモジュールに適用されるカスタム属性のコレクションを取得します。

GetCustomAttributes(MemberInfo)

指定したメンバーに適用されるカスタム属性のコレクションを取得します。

GetCustomAttributes(Assembly)

指定したアセンブリに適用されるカスタム属性のコレクションを取得します。

GetCustomAttributes<T>(ParameterInfo, Boolean)

指定したパラメーターに適用される、指定した型のカスタム属性のコレクションを取得し、必要に応じてそのパラメーターの先祖を検査します。

GetCustomAttributes<T>(MemberInfo, Boolean)

指定したメンバーに適用される、指定した型のカスタム属性のコレクションを取得し、必要に応じてそのメンバーの先祖を検査します。

GetCustomAttributes<T>(ParameterInfo)

指定したパラメーターに適用される、指定した型のカスタム属性のコレクションを取得します。

GetCustomAttributes<T>(MemberInfo)

指定したメンバーに適用される、指定した型のカスタム属性のコレクションを取得します。

GetCustomAttributes<T>(Assembly)

指定したアセンブリに適用される、指定した型のカスタム属性のコレクションを取得します。

GetCustomAttributes<T>(Module)

指定したモジュールに適用される、指定した型のカスタム属性のコレクションを取得します。

GetCustomAttributes(ParameterInfo, Type, Boolean)

ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs

指定したパラメーターに適用される、指定した型のカスタム属性のコレクションを取得し、必要に応じてそのパラメーターの先祖を検査します。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable<Attribute ^> ^ GetCustomAttributes(System::Reflection::ParameterInfo ^ element, Type ^ attributeType, bool inherit);
public static System.Collections.Generic.IEnumerable<Attribute> GetCustomAttributes(this System.Reflection.ParameterInfo element, Type attributeType, bool inherit);
static member GetCustomAttributes : System.Reflection.ParameterInfo * Type * bool -> seq<Attribute>
<Extension()>
Public Function GetCustomAttributes (element As ParameterInfo, attributeType As Type, inherit As Boolean) As IEnumerable(Of Attribute)

パラメーター

element
ParameterInfo

検査するパラメーター。

attributeType
Type

検索する属性の種類。

inherit
Boolean

true elementの先祖を検査する場合は。それ以外の場合はfalse。

返品

elementに適用され、attributeTypeに一致するカスタム属性のコレクション。そのような属性が存在しない場合は空のコレクション。

例外

element または attributeType が null。

attributeType は Attributeから派生していません。

element は、コンストラクター、メソッド、プロパティ、イベント、型、またはフィールドではありません。

カスタム属性の型を読み込むことができません。

適用対象

GetCustomAttributes(MemberInfo, Type, Boolean)

ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs

指定したメンバーに適用される、指定した型のカスタム属性のコレクションを取得し、必要に応じてそのメンバーの先祖を検査します。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable<Attribute ^> ^ GetCustomAttributes(System::Reflection::MemberInfo ^ element, Type ^ attributeType, bool inherit);
public static System.Collections.Generic.IEnumerable<Attribute> GetCustomAttributes(this System.Reflection.MemberInfo element, Type attributeType, bool inherit);
static member GetCustomAttributes : System.Reflection.MemberInfo * Type * bool -> seq<Attribute>
<Extension()>
Public Function GetCustomAttributes (element As MemberInfo, attributeType As Type, inherit As Boolean) As IEnumerable(Of Attribute)

パラメーター

element
MemberInfo

検査するメンバー。

attributeType
Type

検索する属性の種類。

inherit
Boolean

true elementの先祖を検査する場合は。それ以外の場合はfalse。

返品

elementに適用され、attributeTypeに一致するカスタム属性のコレクション。そのような属性が存在しない場合は空のコレクション。

例外

element または attributeType が null。

attributeType は Attributeから派生していません。

element は、コンストラクター、メソッド、プロパティ、イベント、型、またはフィールドではありません。

カスタム属性の型を読み込むことができません。

適用対象

GetCustomAttributes(ParameterInfo, Type)

ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs

指定したパラメーターに適用される、指定した型のカスタム属性のコレクションを取得します。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable<Attribute ^> ^ GetCustomAttributes(System::Reflection::ParameterInfo ^ element, Type ^ attributeType);
public static System.Collections.Generic.IEnumerable<Attribute> GetCustomAttributes(this System.Reflection.ParameterInfo element, Type attributeType);
static member GetCustomAttributes : System.Reflection.ParameterInfo * Type -> seq<Attribute>
<Extension()>
Public Function GetCustomAttributes (element As ParameterInfo, attributeType As Type) As IEnumerable(Of Attribute)

パラメーター

element
ParameterInfo

検査するパラメーター。

attributeType
Type

検索する属性の種類。

返品

elementに適用され、attributeTypeに一致するカスタム属性のコレクション。そのような属性が存在しない場合は空のコレクション。

例外

element または attributeType が null。

attributeType は Attributeから派生していません。

element は、コンストラクター、メソッド、プロパティ、イベント、型、またはフィールドではありません。

カスタム属性の型を読み込むことができません。

適用対象

GetCustomAttributes(ParameterInfo, Boolean)

ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs

指定したパラメーターに適用されるカスタム属性のコレクションを取得し、必要に応じてそのパラメーターの先祖を検査します。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable<Attribute ^> ^ GetCustomAttributes(System::Reflection::ParameterInfo ^ element, bool inherit);
public static System.Collections.Generic.IEnumerable<Attribute> GetCustomAttributes(this System.Reflection.ParameterInfo element, bool inherit);
static member GetCustomAttributes : System.Reflection.ParameterInfo * bool -> seq<Attribute>
<Extension()>
Public Function GetCustomAttributes (element As ParameterInfo, inherit As Boolean) As IEnumerable(Of Attribute)

パラメーター

element
ParameterInfo

検査するパラメーター。

inherit
Boolean

true elementの先祖を検査する場合は。それ以外の場合はfalse。

返品

elementに適用されるカスタム属性のコレクション。そのような属性が存在しない場合は空のコレクション。

例外

element は nullです。

element は、コンストラクター、メソッド、プロパティ、イベント、型、またはフィールドではありません。

カスタム属性の型を読み込むことができません。

適用対象

GetCustomAttributes(Module, Type)

ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs

指定したモジュールに適用される、指定した型のカスタム属性のコレクションを取得します。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable<Attribute ^> ^ GetCustomAttributes(System::Reflection::Module ^ element, Type ^ attributeType);
public static System.Collections.Generic.IEnumerable<Attribute> GetCustomAttributes(this System.Reflection.Module element, Type attributeType);
static member GetCustomAttributes : System.Reflection.Module * Type -> seq<Attribute>
<Extension()>
Public Function GetCustomAttributes (element As Module, attributeType As Type) As IEnumerable(Of Attribute)

パラメーター

element
Module

検査するモジュール。

attributeType
Type

検索する属性の種類。

返品

elementに適用され、attributeTypeに一致するカスタム属性のコレクション。そのような属性が存在しない場合は空のコレクション。

例外

element または attributeType が null。

attributeType は Attributeから派生していません。

適用対象

GetCustomAttributes(MemberInfo, Type)

ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs

指定したメンバーに適用される、指定した型のカスタム属性のコレクションを取得します。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable<Attribute ^> ^ GetCustomAttributes(System::Reflection::MemberInfo ^ element, Type ^ attributeType);
public static System.Collections.Generic.IEnumerable<Attribute> GetCustomAttributes(this System.Reflection.MemberInfo element, Type attributeType);
static member GetCustomAttributes : System.Reflection.MemberInfo * Type -> seq<Attribute>
<Extension()>
Public Function GetCustomAttributes (element As MemberInfo, attributeType As Type) As IEnumerable(Of Attribute)

パラメーター

element
MemberInfo

検査するメンバー。

attributeType
Type

検索する属性の種類。

返品

elementに適用され、attributeTypeに一致するカスタム属性のコレクション。そのような属性が存在しない場合は空のコレクション。

例外

element または attributeType が null。

attributeType は Attributeから派生していません。

element は、コンストラクター、メソッド、プロパティ、イベント、型、またはフィールドではありません。

カスタム属性の型を読み込むことができません。

適用対象

GetCustomAttributes(MemberInfo, Boolean)

ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs

指定したメンバーに適用されるカスタム属性のコレクションを取得し、必要に応じてそのメンバーの先祖を検査します。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable<Attribute ^> ^ GetCustomAttributes(System::Reflection::MemberInfo ^ element, bool inherit);
public static System.Collections.Generic.IEnumerable<Attribute> GetCustomAttributes(this System.Reflection.MemberInfo element, bool inherit);
static member GetCustomAttributes : System.Reflection.MemberInfo * bool -> seq<Attribute>
<Extension()>
Public Function GetCustomAttributes (element As MemberInfo, inherit As Boolean) As IEnumerable(Of Attribute)

パラメーター

element
MemberInfo

検査するメンバー。

inherit
Boolean

true elementの先祖を検査する場合は。それ以外の場合はfalse。

返品

指定した条件に一致する element に適用されるカスタム属性のコレクション。そのような属性が存在しない場合は空のコレクション。

例外

element は nullです。

element は、コンストラクター、メソッド、プロパティ、イベント、型、またはフィールドではありません。

カスタム属性の型を読み込むことができません。

適用対象

GetCustomAttributes(Assembly, Type)

ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs

指定したアセンブリに適用される、指定した型のカスタム属性のコレクションを取得します。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable<Attribute ^> ^ GetCustomAttributes(System::Reflection::Assembly ^ element, Type ^ attributeType);
public static System.Collections.Generic.IEnumerable<Attribute> GetCustomAttributes(this System.Reflection.Assembly element, Type attributeType);
static member GetCustomAttributes : System.Reflection.Assembly * Type -> seq<Attribute>
<Extension()>
Public Function GetCustomAttributes (element As Assembly, attributeType As Type) As IEnumerable(Of Attribute)

パラメーター

element
Assembly

検査するアセンブリ。

attributeType
Type

検索する属性の種類。

返品

elementに適用され、attributeTypeに一致するカスタム属性のコレクション。そのような属性が存在しない場合は空のコレクション。

例外

element または attributeType が null。

attributeType は Attributeから派生していません。

適用対象

GetCustomAttributes(ParameterInfo)

ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs

指定したパラメーターに適用されるカスタム属性のコレクションを取得します。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable<Attribute ^> ^ GetCustomAttributes(System::Reflection::ParameterInfo ^ element);
public static System.Collections.Generic.IEnumerable<Attribute> GetCustomAttributes(this System.Reflection.ParameterInfo element);
static member GetCustomAttributes : System.Reflection.ParameterInfo -> seq<Attribute>
<Extension()>
Public Function GetCustomAttributes (element As ParameterInfo) As IEnumerable(Of Attribute)

パラメーター

element
ParameterInfo

検査するパラメーター。

返品

elementに適用されるカスタム属性のコレクション。そのような属性が存在しない場合は空のコレクション。

例外

element は nullです。

element は、コンストラクター、メソッド、プロパティ、イベント、型、またはフィールドではありません。

カスタム属性の型を読み込むことができません。

適用対象

GetCustomAttributes(Module)

ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs

指定したモジュールに適用されるカスタム属性のコレクションを取得します。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable<Attribute ^> ^ GetCustomAttributes(System::Reflection::Module ^ element);
public static System.Collections.Generic.IEnumerable<Attribute> GetCustomAttributes(this System.Reflection.Module element);
static member GetCustomAttributes : System.Reflection.Module -> seq<Attribute>
<Extension()>
Public Function GetCustomAttributes (element As Module) As IEnumerable(Of Attribute)

パラメーター

element
Module

検査するモジュール。

返品

elementに適用されるカスタム属性のコレクション。そのような属性が存在しない場合は空のコレクション。

例外

element は nullです。

適用対象

GetCustomAttributes(MemberInfo)

ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs

指定したメンバーに適用されるカスタム属性のコレクションを取得します。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable<Attribute ^> ^ GetCustomAttributes(System::Reflection::MemberInfo ^ element);
public static System.Collections.Generic.IEnumerable<Attribute> GetCustomAttributes(this System.Reflection.MemberInfo element);
static member GetCustomAttributes : System.Reflection.MemberInfo -> seq<Attribute>
<Extension()>
Public Function GetCustomAttributes (element As MemberInfo) As IEnumerable(Of Attribute)

パラメーター

element
MemberInfo

検査するメンバー。

返品

elementに適用されるカスタム属性のコレクション。そのような属性が存在しない場合は空のコレクション。

例外

element は nullです。

element は、コンストラクター、メソッド、プロパティ、イベント、型、またはフィールドではありません。

カスタム属性の型を読み込むことができません。

適用対象

GetCustomAttributes(Assembly)

ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs

指定したアセンブリに適用されるカスタム属性のコレクションを取得します。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable<Attribute ^> ^ GetCustomAttributes(System::Reflection::Assembly ^ element);
public static System.Collections.Generic.IEnumerable<Attribute> GetCustomAttributes(this System.Reflection.Assembly element);
static member GetCustomAttributes : System.Reflection.Assembly -> seq<Attribute>
<Extension()>
Public Function GetCustomAttributes (element As Assembly) As IEnumerable(Of Attribute)

パラメーター

element
Assembly

検査するアセンブリ。

返品

elementに適用されるカスタム属性のコレクション。そのような属性が存在しない場合は空のコレクション。

例外

element は nullです。

適用対象

GetCustomAttributes<T>(ParameterInfo, Boolean)

ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs

指定したパラメーターに適用される、指定した型のカスタム属性のコレクションを取得し、必要に応じてそのパラメーターの先祖を検査します。

public:
generic <typename T>
 where T : Attribute[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable<T> ^ GetCustomAttributes(System::Reflection::ParameterInfo ^ element, bool inherit);
public static System.Collections.Generic.IEnumerable<T> GetCustomAttributes<T>(this System.Reflection.ParameterInfo element, bool inherit) where T : Attribute;
static member GetCustomAttributes : System.Reflection.ParameterInfo * bool -> seq<'T (requires 'T :> Attribute)> (requires 'T :> Attribute)
<Extension()>
Public Function GetCustomAttributes(Of T As Attribute) (element As ParameterInfo, inherit As Boolean) As IEnumerable(Of T)

型パラメーター

T

検索する属性の種類。

パラメーター

element
ParameterInfo

検査するパラメーター。

inherit
Boolean

true elementの先祖を検査する場合は。それ以外の場合はfalse。

返品

elementに適用され、Tに一致するカスタム属性のコレクション。そのような属性が存在しない場合は空のコレクション。

例外

element は nullです。

element は、コンストラクター、メソッド、プロパティ、イベント、型、またはフィールドではありません。

カスタム属性の型を読み込むことができません。

適用対象

GetCustomAttributes<T>(MemberInfo, Boolean)

ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs

指定したメンバーに適用される、指定した型のカスタム属性のコレクションを取得し、必要に応じてそのメンバーの先祖を検査します。

public:
generic <typename T>
 where T : Attribute[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable<T> ^ GetCustomAttributes(System::Reflection::MemberInfo ^ element, bool inherit);
public static System.Collections.Generic.IEnumerable<T> GetCustomAttributes<T>(this System.Reflection.MemberInfo element, bool inherit) where T : Attribute;
static member GetCustomAttributes : System.Reflection.MemberInfo * bool -> seq<'T (requires 'T :> Attribute)> (requires 'T :> Attribute)
<Extension()>
Public Function GetCustomAttributes(Of T As Attribute) (element As MemberInfo, inherit As Boolean) As IEnumerable(Of T)

型パラメーター

T

検索する属性の種類。

パラメーター

element
MemberInfo

検査するメンバー。

inherit
Boolean

true elementの先祖を検査する場合は。それ以外の場合はfalse。

返品

elementに適用され、Tに一致するカスタム属性のコレクション。そのような属性が存在しない場合は空のコレクション。

例外

element は nullです。

element は、コンストラクター、メソッド、プロパティ、イベント、型、またはフィールドではありません。

カスタム属性の型を読み込むことができません。

適用対象

GetCustomAttributes<T>(ParameterInfo)

ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs

指定したパラメーターに適用される、指定した型のカスタム属性のコレクションを取得します。

public:
generic <typename T>
 where T : Attribute[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable<T> ^ GetCustomAttributes(System::Reflection::ParameterInfo ^ element);
public static System.Collections.Generic.IEnumerable<T> GetCustomAttributes<T>(this System.Reflection.ParameterInfo element) where T : Attribute;
static member GetCustomAttributes : System.Reflection.ParameterInfo -> seq<'T (requires 'T :> Attribute)> (requires 'T :> Attribute)
<Extension()>
Public Function GetCustomAttributes(Of T As Attribute) (element As ParameterInfo) As IEnumerable(Of T)

型パラメーター

T

検索する属性の種類。

パラメーター

element
ParameterInfo

検査するパラメーター。

返品

elementに適用され、Tに一致するカスタム属性のコレクション。そのような属性が存在しない場合は空のコレクション。

例外

element は nullです。

element は、コンストラクター、メソッド、プロパティ、イベント、型、またはフィールドではありません。

カスタム属性の型を読み込むことができません。

適用対象

GetCustomAttributes<T>(MemberInfo)

ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs

指定したメンバーに適用される、指定した型のカスタム属性のコレクションを取得します。

public:
generic <typename T>
 where T : Attribute[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable<T> ^ GetCustomAttributes(System::Reflection::MemberInfo ^ element);
public static System.Collections.Generic.IEnumerable<T> GetCustomAttributes<T>(this System.Reflection.MemberInfo element) where T : Attribute;
static member GetCustomAttributes : System.Reflection.MemberInfo -> seq<'T (requires 'T :> Attribute)> (requires 'T :> Attribute)
<Extension()>
Public Function GetCustomAttributes(Of T As Attribute) (element As MemberInfo) As IEnumerable(Of T)

型パラメーター

T

検索する属性の種類。

パラメーター

element
MemberInfo

検査するメンバー。

返品

elementに適用され、Tに一致するカスタム属性のコレクション。そのような属性が存在しない場合は空のコレクション。

例外

element は nullです。

element は、コンストラクター、メソッド、プロパティ、イベント、型、またはフィールドではありません。

カスタム属性の型を読み込むことができません。

適用対象

GetCustomAttributes<T>(Assembly)

ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs

指定したアセンブリに適用される、指定した型のカスタム属性のコレクションを取得します。

public:
generic <typename T>
 where T : Attribute[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable<T> ^ GetCustomAttributes(System::Reflection::Assembly ^ element);
public static System.Collections.Generic.IEnumerable<T> GetCustomAttributes<T>(this System.Reflection.Assembly element) where T : Attribute;
static member GetCustomAttributes : System.Reflection.Assembly -> seq<'T (requires 'T :> Attribute)> (requires 'T :> Attribute)
<Extension()>
Public Function GetCustomAttributes(Of T As Attribute) (element As Assembly) As IEnumerable(Of T)

型パラメーター

T

検索する属性の種類。

パラメーター

element
Assembly

検査するアセンブリ。

返品

elementに適用され、Tに一致するカスタム属性のコレクション。そのような属性が存在しない場合は空のコレクション。

例外

element は nullです。

適用対象

GetCustomAttributes<T>(Module)

ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs
ソース:
CustomAttributeExtensions.cs

指定したモジュールに適用される、指定した型のカスタム属性のコレクションを取得します。

public:
generic <typename T>
 where T : Attribute[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable<T> ^ GetCustomAttributes(System::Reflection::Module ^ element);
public static System.Collections.Generic.IEnumerable<T> GetCustomAttributes<T>(this System.Reflection.Module element) where T : Attribute;
static member GetCustomAttributes : System.Reflection.Module -> seq<'T (requires 'T :> Attribute)> (requires 'T :> Attribute)
<Extension()>
Public Function GetCustomAttributes(Of T As Attribute) (element As Module) As IEnumerable(Of T)

型パラメーター

T

検索する属性の種類。

パラメーター

element
Module

検査するモジュール。

返品

elementに適用され、Tに一致するカスタム属性のコレクション。そのような属性が存在しない場合は空のコレクション。

例外

element は nullです。

適用対象