Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions xml/System.Reflection.Context/CustomReflectionContext.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,16 @@
> <xref:System.Reflection.MemberInfo.GetCustomAttributes*> method. It doesn't alter the custom attribute data returned by the <xref:System.Reflection.MemberInfo.GetCustomAttributesData*>
> method, and these two lists won't match when you use a custom reflection context.

The following example demonstrates how to subclass <xref:System.Reflection.Context.CustomReflectionContext> to add a custom attribute to all the members of a given type whose names begin with "To".

:::code language="csharp" source="~/snippets/csharp/System.Reflection.Context/CustomReflectionContext/CustomReflectionContext.Examples.cs" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Reflection.Context/CustomReflectionContext/CustomReflectionContext.Examples.cs" id="Snippet2":::

]]></format>
</remarks>
<example>
The following example is a test...
<code lang="csharp" src="snippets/csharp/System.Reflection.Context/CustomReflectionContext/CustomReflectionContext.Examples.cs" />
<code lang="csharp" source="snippets/csharp/System.Reflection.Context/CustomReflectionContext/CustomReflectionContext.Examples.cs" id="Snippet1" />

<code lang="csharp" source="../snippets/csharp/System.Reflection.Context/CustomReflectionContext/CustomReflectionContext.Examples.cs" />
<code lang="csharp" src="../snippets/csharp/System.Reflection.Context/CustomReflectionContext/CustomReflectionContext.Examples.cs" id="Snippet1" />
</example>
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
Expand Down
Loading