Beispiel #1
0
    public void IsDisposed()
    {
        IHasIsDisposed observable = this.handler;

        Assert.False(observable.IsDisposed);
        this.handler.Dispose();
        Assert.True(observable.IsDisposed);
    }
Beispiel #2
0
 public static void NotDisposed(IHasIsDisposed instance, string message = null)
 {
     if (!instance.IsDisposed)
     {
         return;
     }
     throw new ObjectDisposedException(instance.GetType().FullName, message);
 }