CustomReflectionContext.GetCustomAttributes Method

Definition

When overridden in a derived class, provides a modified collection of custom attributes for the specified object, as represented in this reflection context.

Overloads

GetCustomAttributes(MemberInfo, IEnumerable<Object>)

When overridden in a derived class, provides a list of custom attributes for the specified member, as represented in this reflection context.

GetCustomAttributes(ParameterInfo, IEnumerable<Object>)

When overridden in a derived class, provides a list of custom attributes for the specified parameter, as represented in this reflection context.

GetCustomAttributes(MemberInfo, IEnumerable<Object>)

Source:
CustomReflectionContext.cs
Source:
CustomReflectionContext.cs
Source:
CustomReflectionContext.cs

When overridden in a derived class, provides a list of custom attributes for the specified member, as represented in this reflection context.

C#
protected virtual System.Collections.Generic.IEnumerable<object> GetCustomAttributes (System.Reflection.MemberInfo member, System.Collections.Generic.IEnumerable<object> declaredAttributes);

Parameters

member
MemberInfo

The member whose custom attributes will be returned.

declaredAttributes
IEnumerable<Object>

A collection of the member's attributes in its current context.

Returns

A collection that represents the custom attributes of the specified member in this reflection context.

Applies to

.NET 9 (package-provided) en andere versies
Product Versies
.NET Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided)
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided), 2.1 (package-provided)
UWP 10.0

GetCustomAttributes(ParameterInfo, IEnumerable<Object>)

Source:
CustomReflectionContext.cs
Source:
CustomReflectionContext.cs
Source:
CustomReflectionContext.cs

When overridden in a derived class, provides a list of custom attributes for the specified parameter, as represented in this reflection context.

C#
protected virtual System.Collections.Generic.IEnumerable<object> GetCustomAttributes (System.Reflection.ParameterInfo parameter, System.Collections.Generic.IEnumerable<object> declaredAttributes);

Parameters

parameter
ParameterInfo

The parameter whose custom attributes will be returned.

declaredAttributes
IEnumerable<Object>

A collection of the parameter's attributes in its current context.

Returns

A collection that represents the custom attributes of the specified parameter in this reflection context.

Applies to

.NET 9 (package-provided) en andere versies
Product Versies
.NET Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided)
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided), 2.1 (package-provided)
UWP 10.0