public virtual void RemoveClient(IndigoServices.CommonStreamService client) { bool stopGraph = false; lock (_clientsCollectionLock) { _clients.Remove(client); stopGraph = _clients.Count == 0; #if SHOW_ADDCLIENTS AppLogger.Message(" > " + this.SourceConfig.SourceName + " RemoveClient(" + client.UserName + ") -> total: " + _clients.Count); #endif } if (stopGraph) { Stop(); } }
public virtual void AddClient(IndigoServices.CommonStreamService client) { bool runGraph = false; lock (_clientsCollectionLock) { _clients.Add(client); runGraph = _clients.Count == 1; #if SHOW_ADDCLIENTS AppLogger.Message(" > " + this.SourceConfig.SourceName + " AddClient(" + client.UserName + ") -> total: " + _clients.Count); #endif } if (runGraph) { Run(); } }