Ejemplo n.º 1
0
        internal void RemoveSocketEndpointSubcription(string theSocketEndpointGuid, string theSubcriptionGuid)
        {
            SocketEndpointComponent SocketEndpoint = SocketEndpoints.FirstOrDefault(e => e.Guid == theSocketEndpointGuid);

            if (SocketEndpoint != null)
            {
                SocketEndpoint.RemoveSubcription(theSubcriptionGuid);
            }
        }
Ejemplo n.º 2
0
        internal void Update(SocketEndpointProperties[] theSocketEndpointProperties)
        {
            foreach (SocketEndpointProperties SocketEndpointProperties in theSocketEndpointProperties)
            {
                SocketEndpointComponent SocketEndpoint = SocketEndpoints.FirstOrDefault(e => e.Guid == SocketEndpointProperties.Guid);

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