This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Add Public implementation RemoveEventHandler in EventRegistrationTokenTable#18671
Merged
luqunl merged 3 commits intodotnet:masterfrom Jun 27, 2018
Merged
Add Public implementation RemoveEventHandler in EventRegistrationTokenTable#18671luqunl merged 3 commits intodotnet:masterfrom
luqunl merged 3 commits intodotnet:masterfrom
Conversation
jkotas
reviewed
Jun 27, 2018
| /// Get EventHandler for specified EventRegistrationToken if it exists. | ||
| /// An internal contract between System.Private.Corelib and System.Runtime.WindowsRuntime | ||
| /// </summary> | ||
| public static T GetEventHandlerFromEventRegistrationToken<T>(EventRegistrationTokenTable<T> table, EventRegistrationToken token) where T : class |
Member
There was a problem hiding this comment.
This also removes the token from the table. It is pretty non-obvious from the name.
Member
There was a problem hiding this comment.
I think we should just add this as public API to EventRegistrationTokenTable directly:
bool RemoveEventHandler(EventRegistrationToken token, out T handler)
There are other non-exposed public APIs on EventRegistrationTokenTable, so having one more is not a big deal.
Author
There was a problem hiding this comment.
Added RemoveEventHandler in EventRegistrationTokenTable
jkotas
approved these changes
Jun 27, 2018
picenka21
pushed a commit
to picenka21/runtime
that referenced
this pull request
Feb 18, 2022
…nTable (dotnet/coreclr#18671) Commit migrated from dotnet/coreclr@7e6c6ce
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a public implementation API GetEventHandlerFromEventRegistrationToken for System.runtime.WindowsRuntime to consume instead of using FriendAccessAllowed/InternalVisiable
Corefx PR:dotnet/corefx#30699