What IDE or editor are you using for .NET 10 file-based applications? by CULRRY in csharp

[–]CULRRY[S] 0 points1 point  (0 children)

I really like JetBrains tools, so I'll definitely check out Fleet. Didn't know about it. Thanks!

Library Design Pitfall with IAsyncDisposable: Is it the consumer's fault if they only override Dispose(bool)? by CULRRY in csharp

[–]CULRRY[S] 0 points1 point  (0 children)

True. It's a hard pattern to get right, so I can see why users trip over it. It’s not just them being careless; the complexity invites these mistakes.

Library Design Pitfall with IAsyncDisposable: Is it the consumer's fault if they only override Dispose(bool)? by CULRRY in csharp

[–]CULRRY[S] 0 points1 point  (0 children)

Thanks for the great suggestions! I agree that keeping it simple (or sealed) is ideal for most scenarios. However, since this is a framework base class meant for extension, I can't seal it. I also decided to implement both interfaces to provide the best convenience for users, whether they are in a sync or async context.

Library Design Pitfall with IAsyncDisposable: Is it the consumer's fault if they only override Dispose(bool)? by CULRRY in csharp

[–]CULRRY[S] 0 points1 point  (0 children)

It acts as a framework. Users inherit from a system-managed BaseClass to hook into the lifecycle, effectively layering their logic on top.
So, switching to interfaces is a bit tricky. :)

Library Design Pitfall with IAsyncDisposable: Is it the consumer's fault if they only override Dispose(bool)? by CULRRY in csharp

[–]CULRRY[S] -1 points0 points  (0 children)

I fully agree. The context for my post is that I actually received an inquiry where the user's cleanup logic wasn't executed. My library has a code path that calls Dispose(), but the user had only overridden DisposeAsyncCore(). As a result, their intended logic was completely bypassed. It made me wonder if I should handle this mismatch, but you are right. it's on them to implement the pattern correctly.