Skip to content

Add polyfills for CallerMemberNameAttribute, CallerLineNumberAttribute and CallerFilePathAttribute#66

Merged
Tyrrrz merged 3 commits into
masterfrom
caller-attrs
Dec 3, 2025
Merged

Add polyfills for CallerMemberNameAttribute, CallerLineNumberAttribute and CallerFilePathAttribute#66
Tyrrrz merged 3 commits into
masterfrom
caller-attrs

Conversation

@Tyrrrz

@Tyrrrz Tyrrrz commented Dec 3, 2025

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings December 3, 2025 15:31
@Tyrrrz Tyrrrz added the enhancement New feature or request label Dec 3, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adds polyfill implementations for three caller information attributes (CallerMemberNameAttribute, CallerLineNumberAttribute, and CallerFilePathAttribute) that enable compile-time capture of caller context. These polyfills target .NET Framework versions prior to .NET 4.5, where these attributes were first introduced.

Key Changes

  • Added three caller information attribute polyfills for pre-.NET 4.5 frameworks
  • All three attributes follow consistent patterns with proper conditional compilation, namespace placement, and code coverage exclusion

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
PolyShim/NetCore10/CallerMemberNameAttribute.cs Adds polyfill for capturing the calling member's name at compile time
PolyShim/NetCore10/CallerLineNumberAttribute.cs Adds polyfill for capturing the calling line number at compile time
PolyShim/NetCore10/CallerFilePathAttribute.cs Adds polyfill for capturing the calling file path at compile time

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread PolyShim/NetCore10/CallerMemberNameAttribute.cs Outdated
Tyrrrz and others added 2 commits December 3, 2025 17:34
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants