-
Notifications
You must be signed in to change notification settings - Fork 652
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
CA1816: correct idisposable implementation #2780
Conversation
@@ -33,8 +33,19 @@ protected RepositoryFixtureBase(IRepository repository) | |||
/// <summary> | |||
/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. | |||
/// </summary> | |||
public virtual void Dispose() | |||
public void Dispose() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Proper" implementation of the disposable pattern.
Note that this change could be considered as breaking change if you consider this class as part of your public API.
@@ -13,7 +13,7 @@ public interface IAssemblyInfoFileUpdater : IVersionConverter<AssemblyInfoContex | |||
{ | |||
} | |||
|
|||
public class AssemblyInfoFileUpdater : IAssemblyInfoFileUpdater | |||
public sealed class AssemblyInfoFileUpdater : IAssemblyInfoFileUpdater |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When class wasn't inherited I went with the option of sealing the class but we could also go for the disposable pattern implementation.
Note that this change could be considered as breaking change if you consider this was part of your API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine. I can't imagine anyone using GitTools.Testing
beside us, so I don't think there are any consumers to care for. If there are, perhaps with this change we'll find out.
Thank you @Evangelink for your contribution! |
🎉 This issue has been resolved in version 5.7.0 🎉 Your GitReleaseManager bot 📦🚀 |
Fix implementation of the disposable pattern.
Description
See Implementing Dispose and CA1816