Skip to content

Instantly share code, notes, and snippets.

@superzadeh
Last active February 14, 2017 13:34
Show Gist options
  • Save superzadeh/cc3f420067ba5fbbadd9aeebb9d5a1a7 to your computer and use it in GitHub Desktop.
Save superzadeh/cc3f420067ba5fbbadd9aeebb9d5a1a7 to your computer and use it in GitHub Desktop.
Resharper templates #tags: template, resharper, c#, snippets
// Arrange
// Act
// Assert
#region IDisposable
bool _disposed;
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
~$ClassName$()
{
Dispose(false);
}
protected virtual void Dispose(bool disposing)
{
if (_disposed)
{
return;
}
if (disposing)
{
}
_disposed = true;
}
#endregion
@superzadeh
Copy link
Author

Remove things you do not need, most likely the finalizer and the call to GC.SuppressFinalize.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment