예제 #1
0
        internal void Unsubscribe(QueryConnection connection)
        {
            _connectionIds.TryRemove(connection.Id, out var _);

            if (_connectionIds.Count == 0)
            {
                _db.RemoveInstance(this);
            }
        }
예제 #2
0
        internal void RemoveConnection(QueryConnection connection)
        {
            _connectionsById.TryRemove(connection.Id, out var _);

            UnsubscribeIfIdle();
        }
예제 #3
0
 internal void Subscribe(QueryConnection connection) =>
 _connectionIds.TryAdd(connection.Id, false);