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

Subject etc. should implement virtual Dispose pattern #253

Open
OpenEnergyGroup opened this issue Aug 29, 2024 · 1 comment
Open

Subject etc. should implement virtual Dispose pattern #253

OpenEnergyGroup opened this issue Aug 29, 2024 · 1 comment

Comments

@OpenEnergyGroup
Copy link

Hi, the Dispose pattern of Subject does not implement

protected virtual void Dispose(bool disposing){
...
}

it's instead

   public void Dispose(bool callOnCompleted)

which makes it impossible to inherit from Subject with a class that needs to call its own Dispose before the base. The canonical Microsoft solution examples are here .

Thank you!

@neuecc
Copy link
Member

neuecc commented Aug 29, 2024

Subject is not designed to be inherited, if it is misleading as such, it should be sealed.

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

No branches or pull requests

2 participants