Skip to content

Support multicast weak event subscriptions - #30

Merged
Seramis merged 1 commit into
mainfrom
feature/multicast-subscriptions
Nov 22, 2026
Merged

Seramis merged 1 commit into
mainfrom
feature/multicast-subscriptions

Conversation

@Seramis

@Seramis Seramis commented Nov 22, 2026

Copy link
Copy Markdown
Member

Description

Adds support for multicast delegates by subscribing and unsubscribing each delegate invocation independently.

A multicast delegate that is subscribed once now registers all of its invocations as separate weak subscribers. Unsubscribing the same multicast delegate removes every matching invocation.

Adds test coverage for combined subscription and unsubscription behavior.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Other (please specify):

Checklist

  • The PR is submitted to the correct branch (main).
  • My code follows the project's coding style. (.editorconfig)
  • I have commented my code, particularly in hard-to-understand areas and public interfaces.
  • I have added or updated tests for the changes I made.
  • All new and existing tests passed.
  • I have updated the documentation where applicable.

Testing Instructions

  1. Open WeakEvent.sln.
  2. Build the solution.
  3. Run dotnet test WeakEvent.sln.
  4. Verify Subscribe_MulticastHandler_SubscribesAndUnsubscribesAllInvocations passes.

@Seramis Seramis self-assigned this Nov 22, 2026
@Seramis Seramis added the enhancement New feature or request label Nov 22, 2026
@Seramis
Seramis merged commit f1908be into main Nov 22, 2026
3 checks passed
@Seramis
Seramis deleted the feature/multicast-subscriptions branch November 22, 2026 15:47
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.

1 participant