Reverted DisposableObject.cs to its original state

This commit is contained in:
Robert
2018-01-11 13:22:23 +01:00
parent fa058f348d
commit e26cbccfe0

View File

@@ -21,8 +21,9 @@ namespace Umbraco.Core
private readonly object _locko = new object();
// gets a value indicating whether this instance is disposed.
// for internal tests only (not thread safe)
internal bool Disposed { get { return _disposed; } }
// for internal tests only (not thread safe)
//TODO make this internal + rename "Disposed" when we can break compatibility
public bool IsDisposed { get { return _disposed; } }
// implements IDisposable
public void Dispose()
@@ -32,12 +33,13 @@ namespace Umbraco.Core
}
// finalizer
~DisposableObject()
{
Dispose(false);
}
~DisposableObject()
{
Dispose(false);
}
private void Dispose(bool disposing)
//TODO make this private, non-virtual when we can break compatibility
protected virtual void Dispose(bool disposing)
{
lock (_locko)
{