Beispiel #1
0
        internal void RemoveSocketClientSubcription(string theSocketClientGuid, string theSubcriptionGuid)
        {
            SocketClientComponent SocketClient = SocketClients.FirstOrDefault(c => c.Guid == theSocketClientGuid);

            if (SocketClient != null)
            {
                SocketClient.RemoveSubcription(theSubcriptionGuid);
            }
        }
Beispiel #2
0
        internal void Update(SocketClientProperties[] theSocketClientProperties)
        {
            foreach (var item in theSocketClientProperties)
            {
                SocketClientComponent SocketClient = SocketClients.FirstOrDefault(c => c.Guid == item.Guid);

                if (SocketClient != null)
                {
                    SocketClient.UpdateProperties(item);
                }
                else
                {
                    if (!string.IsNullOrEmpty(item.Guid))
                    {
                        var Logger = MultiPlugServices.Logging.New(item.Guid, Diagnostics.EventLogDefinitions.DefinitionsId);
                        SocketClient = new SocketClientComponent(item.Guid, Logger);
                        Add(new SocketClientComponent[] { SocketClient });
                        SocketClient.UpdateProperties(item);
                    }
                }
            }
        }