public void Init(MQPairConfig config) { if (config is null) { return; } StopListeners(); QueueServerListeners.Clear(); Config = config; Name = Config.Name; Counters = new MQRawServerCounters(Name, Config.IgnoreServerCounters); OnInit(); Core.Status.Attach(collection => { if (QueueServerListeners?.Any() != true) { return; } foreach (var listener in QueueServerListeners) { Core.Status.AttachChild(listener, this); } }); }
protected MQueueRawServerBase() { Counters = new MQRawServerCounters(); Core.Status.Attach(collection => { collection.Add("Type", GetType().FullName); }); }
protected MQueueRawServerListenerBase(MQConnection connection, IMQueueRawServer server, bool responseServer) { Connection = connection; Config = server.Config; Counters = new MQRawServerCounters(server.Name + "\\Listener (" + connection?.Route + ")", server.Config.IgnoreServerCounters); ReceiverSerializer = server.ReceiverSerializer; ResponseServer = responseServer; Core.Status.Attach(collection => { collection.Add("Connection Route:", Connection?.Route); collection.Add("Connection Name:", Connection?.Name); collection.Add(nameof(ResponseServer), ResponseServer); Core.Status.AttachChild(Counters, this); }); }