public void SendTopologyChanges(TopologyChange change) { if (_watchTopology) { Send(change); } }
public void RaiseNotifications(TopologyChange topologyChange) { OnTopologyChange?.Invoke(topologyChange); foreach (var connection in Connections) { connection.Value.SendTopologyChanges(topologyChange); } }
private void Send(TopologyChange change) { var value = new DynamicJsonValue { ["Type"] = nameof(TopologyChange), ["Value"] = change.ToJson() }; if (_disposeToken.IsCancellationRequested == false) { _sendQueue.Enqueue(new ChangeValue { ValueToSend = value, AllowSkip = true }); } }