Body Changes Only
This commit is contained in:
@ -26,16 +26,15 @@ public abstract class DisposableObject : IDisposable
|
||||
/// <summary>
|
||||
/// If this object is disposed, then <see cref="ObjectDisposedException"/> is thrown.
|
||||
/// </summary>
|
||||
public void ThrowIfDisposed()
|
||||
{
|
||||
if (IsDisposed)
|
||||
throw new ObjectDisposedException(GetType().FullName);
|
||||
}
|
||||
public void ThrowIfDisposed() =>
|
||||
ObjectDisposedException.ThrowIf(IsDisposed, this);
|
||||
|
||||
internal void ThrowIfDisposed(string objectName)
|
||||
{
|
||||
#pragma warning disable CA1513
|
||||
if (IsDisposed)
|
||||
throw new ObjectDisposedException(objectName);
|
||||
#pragma warning restore CA1513
|
||||
}
|
||||
|
||||
#region Overrides
|
||||
|
Reference in New Issue
Block a user