Skip to content

Rename EventingExtensions class to DistributedApplicationEventingExtensions#10688

Merged
mitchdenny merged 2 commits intomainfrom
copilot/fix-863cf2ca-4f44-45b2-9fcf-d1dcc46dd3df
Jul 28, 2025
Merged

Rename EventingExtensions class to DistributedApplicationEventingExtensions#10688
mitchdenny merged 2 commits intomainfrom
copilot/fix-863cf2ca-4f44-45b2-9fcf-d1dcc46dd3df

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jul 28, 2025

This PR renames the EventingExtensions class to DistributedApplicationEventingExtensions to provide a more descriptive and specific name that clearly indicates its purpose and scope within the Aspire hosting framework.

Changes Made

  • Class Rename: Changed class definition from EventingExtensions to DistributedApplicationEventingExtensions in the source file
  • File Rename: Renamed the file from EventingExtensions.cs to DistributedApplicationEventingExtensions.cs to match the new class name

Impact

This is a non-breaking change for consumers of the library because:

  • All extension methods (OnBeforeResourceStarted, OnConnectionStringAvailable, OnInitializeResource, OnResourceEndpointsAllocated, OnResourceReady) remain functionally identical
  • Extension methods are accessed by their method names, not the class name that contains them
  • Existing code using these extension methods will continue to work without any modifications
  • The class is only used internally by the C# compiler for method resolution

Verification

  • ✅ All builds pass successfully after the rename
  • ✅ Existing tests that use the extension methods continue to work without modification
  • ✅ No references to the old class name remain in the codebase
  • ✅ Build artifacts and XML documentation now correctly reference the new class name

The new name DistributedApplicationEventingExtensions better reflects that these are extension methods specifically for distributed application resource eventing, making the codebase more maintainable and self-documenting.

This pull request was created as a result of the following prompt from Copilot chat.

Rename the extension method class EventingExtensions to DistributedApplicationEventingExtensions in Aspire 9.4.

Tasks:

  1. Class Rename: Rename the class definition from EventingExtensions to DistributedApplicationEventingExtensions in src/Aspire.Hosting/EventingExtensions.cs.
  2. File Rename: Rename the file from EventingExtensions.cs to DistributedApplicationEventingExtensions.cs to match the new class name.
  3. Reference Updates: Update all references to EventingExtensions throughout the codebase to use DistributedApplicationEventingExtensions instead (including all usages, using static statements, or comments if present).
  4. Project/Build File Update: If the renamed file is referenced explicitly in a project/build file, update its path/name accordingly.
  5. Test/Validate: Ensure no references to the old class name remain and that all documentation and usages reflect the new class name.

Note: Only the first 10 search results were available for direct reference. Please ensure a comprehensive search for all usages of the old class name.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

…nsions and update file name

Co-authored-by: mitchdenny <513398+mitchdenny@users.noreply.github.com>
Copilot AI changed the title [WIP] Rename EventingExtensions to DistributedApplicationEventingExtensions throughout Aspire 9.4 Rename EventingExtensions class to DistributedApplicationEventingExtensions Jul 28, 2025
Copilot AI requested a review from mitchdenny July 28, 2025 03:07
@mitchdenny mitchdenny marked this pull request as ready for review July 28, 2025 03:12
Copilot AI review requested due to automatic review settings July 28, 2025 03:12
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 renames the EventingExtensions class to DistributedApplicationEventingExtensions to provide a more descriptive and specific name that clearly indicates its purpose for distributed application resource eventing within the Aspire hosting framework.

Key Changes:

  • Renamed class from EventingExtensions to DistributedApplicationEventingExtensions
  • Renamed corresponding file to match the new class name
  • Maintained all existing extension method functionality
Comments suppressed due to low confidence (1)

src/Aspire.Hosting/DistributedApplicationEventingExtensions.cs:12

  • [nitpick] The new class name DistributedApplicationEventingExtensions is quite long and may impact readability. Consider a more concise alternative like DistributedAppEventingExtensions or AppEventingExtensions while still maintaining clarity about its purpose.
public static class DistributedApplicationEventingExtensions

@mitchdenny
Copy link
Copy Markdown
Member

LGTM

@mitchdenny
Copy link
Copy Markdown
Member

/backport to release/9.4

@github-actions
Copy link
Copy Markdown
Contributor

Started backporting to release/9.4: https://github.com/dotnet/aspire/actions/runs/16559154000

@davidfowl
Copy link
Copy Markdown
Contributor

This would need to be in 9.4 since this is not experimental.

@mitchdenny
Copy link
Copy Markdown
Member

Yep backporting now.

@davidfowl davidfowl added this to the 9.4 milestone Jul 28, 2025
@mitchdenny mitchdenny requested review from JamesNK and davidfowl July 28, 2025 04:32
@mitchdenny mitchdenny merged commit 5cc3320 into main Jul 28, 2025
289 of 290 checks passed
@mitchdenny mitchdenny deleted the copilot/fix-863cf2ca-4f44-45b2-9fcf-d1dcc46dd3df branch July 28, 2025 15:26
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants