public IrisDisposableSubscription(IIrisNode irisNode, string channel, ContentHandler contentHandler) { _irisNode = irisNode; Channel = channel; ContentHandler = contentHandler; IsDisposed = false; }
public void Dispose() { if (!IsDisposed) { if (Channel == null) { _irisNode?.UnsubscribeFromBroadcast(ContentHandler); } else { _irisNode?.Unsubscribe(Channel, ContentHandler); } _irisNode = null; this.ContentHandler = null; IsDisposed = true; } }