public static void NotDisposed(IDisposableObservable disposedValue, string?message = null) { Requires.NotNull(disposedValue, nameof(disposedValue)); if (disposedValue.IsDisposed) { string objectName = disposedValue.GetType().FullName; if (message is object) { throw new ObjectDisposedException(objectName, message); } else { throw new ObjectDisposedException(objectName); } } }
public static void NotDisposed(IDisposableObservable disposedValue, string message = null) { Requires.NotNull(disposedValue, "disposedValue"); if (disposedValue.IsDisposed) { string objectName = disposedValue != null ? disposedValue.GetType().FullName : string.Empty; if (message != null) { throw new ObjectDisposedException(objectName, message); } else { throw new ObjectDisposedException(objectName); } } }
public static void NotDisposed(IDisposableObservable disposedValue, string message = null) { Requires.NotNull(disposedValue, "disposedValue"); if (disposedValue.IsDisposed) { string objectName = disposedValue != null?disposedValue.GetType().FullName : string.Empty; if (message != null) { throw new ObjectDisposedException(objectName, message); } else { throw new ObjectDisposedException(objectName); } } }