-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Port CustomReflectionContext type remarks to supplemental API documentation #51722
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: gewarren <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR ports type-level remarks for System.Reflection.Context.CustomReflectionContext from the dotnet-api-docs XML format to a supplemental API documentation page, following the established pattern from PR #51712 (DynamicILInfo).
Changes:
- New supplemental API remarks page explaining CustomReflectionContext usage, patterns, and warnings
- C# code example demonstrating custom attribute injection through reflection contexts
- TOC entry added under Reflection → Supplemental API remarks
- .gitignore entries for build artifacts (redundant with existing patterns)
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/fundamentals/toc.yml | Adds TOC entry for CustomReflectionContext under Reflection → Supplemental API remarks |
| docs/fundamentals/runtime-libraries/system-reflection-context-customreflectioncontext.md | New documentation page with type remarks, usage guidance, warnings, and example |
| docs/fundamentals/runtime-libraries/snippets/system-reflection-context-customreflectioncontext/csharp/program.cs | Complete C# example demonstrating custom attribute injection |
| docs/fundamentals/runtime-libraries/snippets/system-reflection-context-customreflectioncontext/csharp/CustomReflectionContextExample.csproj | Project file targeting net10.0 with System.Reflection.Context package reference |
| .gitignore | Adds bin/ and obj/ entries (redundant with existing [Bb]in/ and [Oo]bj/ patterns) |
| class myAttribute : Attribute | ||
| { | ||
| } | ||
|
|
||
| //Reflection context with custom rules. | ||
| class myCRC : CustomReflectionContext |
Copilot
AI
Feb 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The class names 'myAttribute' and 'myCRC' don't follow C# naming conventions. Class names should use PascalCase (e.g., 'MyAttribute' and 'MyCrc' or 'MyCustomReflectionContext'). This applies to example code as well, as it sets the standard for developers learning from the documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot apply changes based on this feedback
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated class names to follow PascalCase conventions: myAttribute → MyAttribute and myCRC → MyCustomReflectionContext. Changes verified with successful build and test run. (237bab6)
docs/fundamentals/runtime-libraries/system-reflection-context-customreflectioncontext.md
Outdated
Show resolved
Hide resolved
…customreflectioncontext.md Co-authored-by: Copilot <[email protected]>
Co-authored-by: gewarren <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot Remove this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted .gitignore changes. (08c3dab)
Co-authored-by: gewarren <[email protected]>
Head branch was pushed to by a user without write access
Porting CustomReflectionContext Type Remarks
This PR ports the type-level remarks from the dotnet-api-docs repository to create a new supplemental API remarks page for
System.Reflection.Context.CustomReflectionContext, following the pattern established in PR #51712.Completed Work
system-reflection-context-customreflectioncontext.mdChanges Summary
docs/fundamentals/runtime-libraries/system-reflection-context-customreflectioncontext.md- Main documentation page with type-level remarks ported from XMLdocs/fundamentals/runtime-libraries/snippets/system-reflection-context-customreflectioncontext/csharp/program.cs- C# example code with PascalCase class namesdocs/fundamentals/runtime-libraries/snippets/system-reflection-context-customreflectioncontext/csharp/CustomReflectionContextExample.csproj- Project file targeting .NET 10 with System.Reflection.Context packagedocs/fundamentals/toc.yml- Added TOC entry under Reflection → Supplemental API remarksNotes
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.
Internal previews