.editorconfig
JSON002
Private
IDE0230
Use Immich assets for random
This commit is contained in:
2024-05-11 14:23:01 -07:00
parent c9dbce3b57
commit bf2d6849b3
26 changed files with 215 additions and 63 deletions

View File

@ -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