共用方式為


CustomReflectionContext.GetCustomAttributes 方法

定義

在衍生類別中覆寫時,為指定的物件提供修改過的自訂屬性集合,如這個反映內容所表示。

多載

GetCustomAttributes(MemberInfo, IEnumerable<Object>)

在衍生類別中覆寫時,為指定的成員提供自訂屬性清單,如這個反射內容所表示。

GetCustomAttributes(ParameterInfo, IEnumerable<Object>)

在衍生類別中覆寫時,為指定的參數提供自訂屬性的清單,如這個反射內容所表示。

GetCustomAttributes(MemberInfo, IEnumerable<Object>)

來源:
CustomReflectionContext.cs
來源:
CustomReflectionContext.cs
來源:
CustomReflectionContext.cs
來源:
CustomReflectionContext.cs

在衍生類別中覆寫時,為指定的成員提供自訂屬性清單,如這個反射內容所表示。

protected:
 virtual System::Collections::Generic::IEnumerable<System::Object ^> ^ GetCustomAttributes(System::Reflection::MemberInfo ^ member, System::Collections::Generic::IEnumerable<System::Object ^> ^ declaredAttributes);
protected virtual System.Collections.Generic.IEnumerable<object> GetCustomAttributes (System.Reflection.MemberInfo member, System.Collections.Generic.IEnumerable<object> declaredAttributes);
abstract member GetCustomAttributes : System.Reflection.MemberInfo * seq<obj> -> seq<obj>
override this.GetCustomAttributes : System.Reflection.MemberInfo * seq<obj> -> seq<obj>
Protected Overridable Function GetCustomAttributes (member As MemberInfo, declaredAttributes As IEnumerable(Of Object)) As IEnumerable(Of Object)

參數

member
MemberInfo

會傳回其自訂屬性的成員。

declaredAttributes
IEnumerable<Object>

成員在其目前內容中的屬性集合。

傳回

表示此反射內容中指定成員之自訂屬性的集合。

適用於

GetCustomAttributes(ParameterInfo, IEnumerable<Object>)

來源:
CustomReflectionContext.cs
來源:
CustomReflectionContext.cs
來源:
CustomReflectionContext.cs
來源:
CustomReflectionContext.cs

在衍生類別中覆寫時,為指定的參數提供自訂屬性的清單,如這個反射內容所表示。

protected:
 virtual System::Collections::Generic::IEnumerable<System::Object ^> ^ GetCustomAttributes(System::Reflection::ParameterInfo ^ parameter, System::Collections::Generic::IEnumerable<System::Object ^> ^ declaredAttributes);
protected virtual System.Collections.Generic.IEnumerable<object> GetCustomAttributes (System.Reflection.ParameterInfo parameter, System.Collections.Generic.IEnumerable<object> declaredAttributes);
abstract member GetCustomAttributes : System.Reflection.ParameterInfo * seq<obj> -> seq<obj>
override this.GetCustomAttributes : System.Reflection.ParameterInfo * seq<obj> -> seq<obj>
Protected Overridable Function GetCustomAttributes (parameter As ParameterInfo, declaredAttributes As IEnumerable(Of Object)) As IEnumerable(Of Object)

參數

parameter
ParameterInfo

會傳回其自訂屬性的參數。

declaredAttributes
IEnumerable<Object>

參數在其目前內容中的屬性集合。

傳回

表示此反射內容中指定參數之自訂屬性的集合。

適用於