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

Container.IsDisposed property not reflecting own scope disposed state. #588

Closed
A-Kjeldgaard opened this issue Aug 15, 2023 · 2 comments
Closed
Assignees
Labels
bug Something isn't working
Milestone

Comments

@A-Kjeldgaard
Copy link

If I open scopes within scopes (that is tracked by parent), and then disposes the outer/parent scope, then the inner scope is disposed as well.

However the IsDisposed property is still false, despite OwnCurrentScope being disposed.

//Arrange
var container = new Container();
var outerScope = container.OpenScope("Test", true);
var innerScope = outerScope.OpenScope("Test2", true);

//act
outerScope.Dispose();

//assert
Assert.True(innerScope.IsDisposed); // <-- Fails
@dadhi
Copy link
Owner

dadhi commented Aug 15, 2023

@A-Kjeldgaard Oh, interesting catch. I will check, thanks.

@dadhi dadhi added this to the v5.4.2 milestone Aug 15, 2023
@dadhi dadhi added the bug Something isn't working label Aug 15, 2023
@dadhi dadhi self-assigned this Aug 15, 2023
@dadhi dadhi closed this as completed in edec018 Aug 15, 2023
@dadhi
Copy link
Owner

dadhi commented Aug 15, 2023

fixed, will be out with v5.4.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants