public void OnSubscribe(IDisposable d) { if (!DisposableHelper.SetOnce(ref s, d)) { OnSubscribeHelper.ReportDisposableSet(); } }
public void OnSubscribe(IDisposable d) { if (!DisposableHelper.SetOnce(ref this.d, d)) { d?.Dispose(); OnSubscribeHelper.ReportDisposableSet(); } }
public void OnSubscribe(IDisposable d) { if (DisposableHelper.SetOnce(ref this.d, d)) { actual.OnSubscribe(this); } else { d?.Dispose(); OnSubscribeHelper.ReportDisposableSet(); } }
public void SetOnce_Null() { try { var field = default(IDisposable); DisposableHelper.SetOnce(ref field, null); Assert.Fail("Should have thrown"); } catch (ArgumentNullException) { // expected } }
internal void SetResource(IDisposable o) { DisposableHelper.SetOnce(ref other, o); }
public void Set(IDisposable d) { DisposableHelper.SetOnce(ref timer, d); }
public void Set(IDisposable d) { DisposableHelper.SetOnce(ref this.d, d); }