public static BrokerConnection InstanceOf() { if (_instance == null) { lock (s_lock) { if (_instance == null) { _instance = new BrokerConnection(); } } } return _instance; }
public void Disconnect() { foreach (var config in brokerConfigs.Values) { Subscriber subscriber = new Subscriber(config); if (subscriber != null) { subscriber.Disconnect(); _instance = null; } } }