CustomAttributeExtensions.GetCustomAttribute Yöntem

Tanım

Belirtilen öğeye uygulanan özel bir özniteliği alır.

Aşırı Yüklemeler

GetCustomAttribute(Assembly, Type)

Belirtilen derlemeye uygulanan belirtilen türde özel bir özniteliği alır.

GetCustomAttribute(MemberInfo, Type)

Belirtilen üyeye uygulanan belirtilen türde bir özel özniteliği alır.

GetCustomAttribute(Module, Type)

Belirtilen modüle uygulanan belirtilen türde bir özel özniteliği alır.

GetCustomAttribute(ParameterInfo, Type)

Belirtilen parametreye uygulanan belirtilen türde bir özel özniteliği alır.

GetCustomAttribute(MemberInfo, Type, Boolean)

Belirtilen bir üyeye uygulanan belirtilen türde bir özel özniteliği alır ve isteğe bağlı olarak bu üyenin üstlerini inceler.

GetCustomAttribute(ParameterInfo, Type, Boolean)

Belirtilen parametreye uygulanan belirtilen türdeki özel bir özniteliği alır ve isteğe bağlı olarak bu parametrenin atalarını inceler.

GetCustomAttribute<T>(ParameterInfo, Boolean)

Belirtilen parametreye uygulanan belirtilen türde bir özel özniteliği alır ve isteğe bağlı olarak bu parametrenin üstlerini inceler.

GetCustomAttribute<T>(MemberInfo, Boolean)

Belirtilen bir üyeye uygulanan belirtilen türde bir özel özniteliği alır ve isteğe bağlı olarak bu üyenin üstlerini inceler.

GetCustomAttribute<T>(ParameterInfo)

Belirtilen parametreye uygulanan belirtilen türde bir özel özniteliği alır.

GetCustomAttribute<T>(Module)

Belirtilen modüle uygulanan belirtilen türde bir özel özniteliği alır.

GetCustomAttribute<T>(MemberInfo)

Belirtilen üyeye uygulanan belirtilen türde bir özel özniteliği alır.

GetCustomAttribute<T>(Assembly)

Belirtilen derlemeye uygulanan belirtilen türde özel bir özniteliği alır.

GetCustomAttribute(Assembly, Type)

Belirtilen derlemeye uygulanan belirtilen türde özel bir özniteliği alır.

public:
[System::Runtime::CompilerServices::Extension]
 static Attribute ^ GetCustomAttribute(System::Reflection::Assembly ^ element, Type ^ attributeType);
public static Attribute GetCustomAttribute (this System.Reflection.Assembly element, Type attributeType);
public static Attribute? GetCustomAttribute (this System.Reflection.Assembly element, Type attributeType);
static member GetCustomAttribute : System.Reflection.Assembly * Type -> Attribute
<Extension()>
Public Function GetCustomAttribute (element As Assembly, attributeType As Type) As Attribute

Parametreler

element
Assembly

İncelemek için derleme.

attributeType
Type

Aranacak öznitelik türü.

Döndürülenler

Attribute

ile eşleşen attributeTypeveya null böyle bir öznitelik bulunamazsa özel bir öznitelik.

Özel durumlar

element veya attributeType şeklindedir null.

attributeType , 'den Attributetüretilmemiştir.

İstenen özniteliklerden birden fazlası bulundu.

Açıklamalar

GetCustomAttributes Birden fazla değer döndürülmesini bekliyorsanız veya AmbiguousMatchException oluşturulacaksa uzantı yöntemini kullanın.

Şunlara uygulanır

GetCustomAttribute(MemberInfo, Type)

Belirtilen üyeye uygulanan belirtilen türde bir özel özniteliği alır.

public:
[System::Runtime::CompilerServices::Extension]
 static Attribute ^ GetCustomAttribute(System::Reflection::MemberInfo ^ element, Type ^ attributeType);
public static Attribute GetCustomAttribute (this System.Reflection.MemberInfo element, Type attributeType);
public static Attribute? GetCustomAttribute (this System.Reflection.MemberInfo element, Type attributeType);
static member GetCustomAttribute : System.Reflection.MemberInfo * Type -> Attribute
<Extension()>
Public Function GetCustomAttribute (element As MemberInfo, attributeType As Type) As Attribute

Parametreler

element
MemberInfo

İncelenecek üye.

attributeType
Type

Aranacak öznitelik türü.

Döndürülenler

Attribute

ile eşleşen attributeTypeveya null böyle bir öznitelik bulunamazsa özel bir öznitelik.

Özel durumlar

element veya attributeType şeklindedir null.

attributeType , 'den Attributetüretilmemiştir.

element oluşturucu, yöntem, özellik, olay, tür veya alan değildir.

İstenen özniteliklerden birden fazlası bulundu.

Özel öznitelik türü yüklenemiyor.

Açıklamalar

GetCustomAttributes Birden fazla değer döndürülmesini bekliyorsanız veya AmbiguousMatchException oluşturulacaksa uzantı yöntemini kullanın.

Şunlara uygulanır

GetCustomAttribute(Module, Type)

Belirtilen modüle uygulanan belirtilen türde bir özel özniteliği alır.

public:
[System::Runtime::CompilerServices::Extension]
 static Attribute ^ GetCustomAttribute(System::Reflection::Module ^ element, Type ^ attributeType);
public static Attribute GetCustomAttribute (this System.Reflection.Module element, Type attributeType);
public static Attribute? GetCustomAttribute (this System.Reflection.Module element, Type attributeType);
static member GetCustomAttribute : System.Reflection.Module * Type -> Attribute
<Extension()>
Public Function GetCustomAttribute (element As Module, attributeType As Type) As Attribute

Parametreler

element
Module

İncelenir modül.

attributeType
Type

Aranacak öznitelik türü.

Döndürülenler

Attribute

ile eşleşen attributeTypeveya null böyle bir öznitelik bulunamazsa özel bir öznitelik.

Özel durumlar

element veya attributeType şeklindedir null.

attributeType , 'den Attributetüretilmemiştir.

İstenen özniteliklerden birden fazlası bulundu.

Açıklamalar

GetCustomAttributes Birden fazla değer döndürülmesini bekliyorsanız veya AmbiguousMatchException oluşturulacaksa uzantı yöntemini kullanın.

Şunlara uygulanır

GetCustomAttribute(ParameterInfo, Type)

Belirtilen parametreye uygulanan belirtilen türde bir özel özniteliği alır.

public:
[System::Runtime::CompilerServices::Extension]
 static Attribute ^ GetCustomAttribute(System::Reflection::ParameterInfo ^ element, Type ^ attributeType);
public static Attribute GetCustomAttribute (this System.Reflection.ParameterInfo element, Type attributeType);
public static Attribute? GetCustomAttribute (this System.Reflection.ParameterInfo element, Type attributeType);
static member GetCustomAttribute : System.Reflection.ParameterInfo * Type -> Attribute
<Extension()>
Public Function GetCustomAttribute (element As ParameterInfo, attributeType As Type) As Attribute

Parametreler

element
ParameterInfo

İncelenecek parametre.

attributeType
Type

Aranacak öznitelik türü.

Döndürülenler

Attribute

ile eşleşen attributeTypeveya null böyle bir öznitelik bulunamazsa özel bir öznitelik.

Özel durumlar

element veya attributeType şeklindedir null.

attributeType , 'den Attributetüretilmemiştir.

İstenen özniteliklerden birden fazlası bulundu.

Özel öznitelik türü yüklenemiyor.

Açıklamalar

GetCustomAttributes Birden fazla değer döndürülmesini bekliyorsanız veya AmbiguousMatchException oluşturulacaksa uzantı yöntemini kullanın.

Şunlara uygulanır

GetCustomAttribute(MemberInfo, Type, Boolean)

Belirtilen bir üyeye uygulanan belirtilen türde bir özel özniteliği alır ve isteğe bağlı olarak bu üyenin üstlerini inceler.

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

Parametreler

element
MemberInfo

İncelenecek üye.

attributeType
Type

Aranacak öznitelik türü.

inherit
Boolean

trueöğesinin atalarını elementincelemek için ; aksi takdirde . false

Döndürülenler

Attribute

ile eşleşen attributeTypeveya null böyle bir öznitelik bulunamazsa özel bir öznitelik.

Özel durumlar

element veya attributeType şeklindedir null.

attributeType , 'den Attributetüretilmemiştir.

element oluşturucu, yöntem, özellik, olay, tür veya alan değildir.

İstenen özniteliklerden birden fazlası bulundu.

Özel öznitelik türü yüklenemiyor.

Açıklamalar

GetCustomAttributes Birden fazla değer döndürülmesini bekliyorsanız veya AmbiguousMatchException oluşturulacaksa uzantı yöntemini kullanın.

Şunlara uygulanır

GetCustomAttribute(ParameterInfo, Type, Boolean)

Belirtilen parametreye uygulanan belirtilen türdeki özel bir özniteliği alır ve isteğe bağlı olarak bu parametrenin atalarını inceler.

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

Parametreler

element
ParameterInfo

İncelenecek parametre.

attributeType
Type

Aranacak öznitelik türü.

inherit
Boolean

trueöğesinin atalarını elementincelemek için ; aksi takdirde . false

Döndürülenler

Attribute

ile eşleşen attributeTypeözel bir öznitelik veya null böyle bir öznitelik bulunamazsa.

Özel durumlar

element veya attributeType şeklindedir null.

attributeType , 'den Attributetüretilmemiştir.

İstenen özniteliklerden birden fazlası bulundu.

Özel öznitelik türü yüklenemiyor.

Açıklamalar

GetCustomAttributes Birden fazla değer döndürülmesini bekliyorsanız veya AmbiguousMatchException oluşturulacaksa uzantı yöntemini kullanın.

Şunlara uygulanır

GetCustomAttribute<T>(ParameterInfo, Boolean)

Belirtilen parametreye uygulanan belirtilen türde bir özel özniteliği alır ve isteğe bağlı olarak bu parametrenin üstlerini inceler.

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

Tür Parametreleri

T

Aranacak öznitelik türü.

Parametreler

element
ParameterInfo

İncelenecek parametre.

inherit
Boolean

trueöğesinin atalarını elementincelemek için ; aksi takdirde . false

Döndürülenler

T

ile eşleşen Tveya null böyle bir öznitelik bulunamazsa özel bir öznitelik.

Özel durumlar

element, null değeridir.

element oluşturucu, yöntem, özellik, olay, tür veya alan değildir.

İstenen özniteliklerden birden fazlası bulundu.

Özel öznitelik türü yüklenemiyor.

Açıklamalar

GetCustomAttributes Birden fazla değer döndürülmesini bekliyorsanız veya AmbiguousMatchException oluşturulacaksa uzantı yöntemini kullanın.

Şunlara uygulanır

GetCustomAttribute<T>(MemberInfo, Boolean)

Belirtilen bir üyeye uygulanan belirtilen türde bir özel özniteliği alır ve isteğe bağlı olarak bu üyenin üstlerini inceler.

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

Tür Parametreleri

T

Aranacak öznitelik türü.

Parametreler

element
MemberInfo

İncelenecek üye.

inherit
Boolean

trueöğesinin atalarını elementincelemek için ; aksi takdirde . false

Döndürülenler

T

ile eşleşen Tveya null böyle bir öznitelik bulunamazsa özel bir öznitelik.

Özel durumlar

element, null değeridir.

element oluşturucu, yöntem, özellik, olay, tür veya alan değildir.

İstenen özniteliklerden birden fazlası bulundu.

Özel öznitelik türü yüklenemiyor.

Açıklamalar

GetCustomAttributes Birden fazla değer döndürülmesini bekliyorsanız veya AmbiguousMatchException oluşturulacaksa uzantı yöntemini kullanın.

Şunlara uygulanır

GetCustomAttribute<T>(ParameterInfo)

Belirtilen parametreye uygulanan belirtilen türde bir özel özniteliği alır.

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

Tür Parametreleri

T

Aranacak öznitelik türü.

Parametreler

element
ParameterInfo

İncelenecek parametre.

Döndürülenler

T

ile eşleşen Tveya null böyle bir öznitelik bulunamazsa özel bir öznitelik.

Özel durumlar

element, null değeridir.

element oluşturucu, yöntem, özellik, olay, tür veya alan değildir.

İstenen özniteliklerden birden fazlası bulundu.

Özel öznitelik türü yüklenemiyor.

Açıklamalar

GetCustomAttributes Birden fazla değer döndürülmesini bekliyorsanız veya AmbiguousMatchException oluşturulacaksa uzantı yöntemini kullanın.

Şunlara uygulanır

GetCustomAttribute<T>(Module)

Belirtilen modüle uygulanan belirtilen türde bir özel özniteliği alır.

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

Tür Parametreleri

T

Aranacak öznitelik türü.

Parametreler

element
Module

İncelenir modül.

Döndürülenler

T

ile eşleşen Tveya null böyle bir öznitelik bulunamazsa özel bir öznitelik.

Özel durumlar

element, null değeridir.

İstenen özniteliklerden birden fazlası bulundu.

Açıklamalar

GetCustomAttributes Birden fazla değer döndürülmesini bekliyorsanız veya AmbiguousMatchException oluşturulacaksa uzantı yöntemini kullanın.

Şunlara uygulanır

GetCustomAttribute<T>(MemberInfo)

Belirtilen üyeye uygulanan belirtilen türde bir özel özniteliği alır.

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

Tür Parametreleri

T

Aranacak öznitelik türü.

Parametreler

element
MemberInfo

İncelenecek üye.

Döndürülenler

T

ile eşleşen Tveya null böyle bir öznitelik bulunamazsa özel bir öznitelik.

Özel durumlar

element, null değeridir.

element oluşturucu, yöntem, özellik, olay, tür veya alan değildir.

İstenen özniteliklerden birden fazlası bulundu.

Özel öznitelik türü yüklenemiyor.

Açıklamalar

GetCustomAttributes Birden fazla değer döndürülmesini bekliyorsanız veya AmbiguousMatchException oluşturulacaksa uzantı yöntemini kullanın.

Şunlara uygulanır

GetCustomAttribute<T>(Assembly)

Belirtilen derlemeye uygulanan belirtilen türde özel bir özniteliği alır.

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

Tür Parametreleri

T

Aranacak öznitelik türü.

Parametreler

element
Assembly

İncelemek için derleme.

Döndürülenler

T

ile eşleşen Tveya null böyle bir öznitelik bulunamazsa özel bir öznitelik.

Özel durumlar

element, null değeridir.

İstenen özniteliklerden birden fazlası bulundu.

Açıklamalar

GetCustomAttributes Birden fazla değer döndürülmesini bekliyorsanız veya AmbiguousMatchException oluşturulacaksa uzantı yöntemini kullanın.

Şunlara uygulanır