Skip to content
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

Prevent cancelled events from being un-cancelled #343

Merged
merged 3 commits into from
May 9, 2023

Conversation

Foxtrek64
Copy link
Contributor

Fixes #342

Overview of changes:

  1. Modify ICancellable interface to remove setter on Cancel property.
  2. Rename ICancellable.Cancel to ICancellable.IsCancelled. Hopefully this doesn't cause any issues with reflection somewhere that I'm not aware of.
  3. Add ICancellable.Cancel().
  4. Perform similar changes (without rename) on AsyncEventArgs so events cannot be un-handled. We can cancel this change but I felt it was good to be consistent.
  5. Update consumers of ICancellable

@Foxtrek64 Foxtrek64 marked this pull request as draft May 9, 2023 03:44
@Foxtrek64 Foxtrek64 marked this pull request as ready for review May 9, 2023 03:44
@Foxtrek64 Foxtrek64 changed the title [WIP] Prevent cancelled events from being un-cancelled Prevent cancelled events from being un-cancelled May 9, 2023
@Foxtrek64
Copy link
Contributor Author

I think I got everything. Still getting a few build errors on my side, however they're items unrelated to my change (e.g. can't find a type called Material). I assume I just don't have my build environment configured properly.

@Tides
Copy link
Member

Tides commented May 9, 2023

I think I got everything. Still getting a few build errors on my side, however they're items unrelated to my change (e.g. can't find a type called Material). I assume I just don't have my build environment configured properly.

This is a source gen problem usually a clean and ide restart fixes the problem

Copy link
Member

@Tides Tides left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏼

@Craftplacer Craftplacer merged commit 29ed323 into ObsidianMC:master May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cancellable Events Can Be Uncancelled
3 participants