-
-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
223 additions
and
592 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
src/EFCoreSecondLevelCacheInterceptor/EFCoreSecondLevelCacheInterceptor.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/Tests/EFCoreSecondLevelCacheInterceptor.UnitTests/MockDisposable.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
namespace EFCoreSecondLevelCacheInterceptor.UnitTests; | ||
|
||
public class MockDisposable : IDisposable | ||
{ | ||
private bool _disposed; | ||
|
||
public void Dispose() | ||
{ | ||
Dispose(disposing: true); | ||
|
||
// tell the GC not to finalize | ||
GC.SuppressFinalize(this); | ||
} | ||
|
||
protected virtual void Dispose(bool disposing) | ||
{ | ||
if (!_disposed) | ||
{ | ||
if (disposing) | ||
{ | ||
// Not in destructor, OK to reference other objects | ||
} | ||
|
||
// perform cleanup for this object | ||
} | ||
|
||
_disposed = true; | ||
} | ||
|
||
~MockDisposable() => Dispose(disposing: false); | ||
} |
Oops, something went wrong.