private string GetOrThrowConnectionId(RemotingDbConnection connection) { if (ConnectionIds.TryGetValue(connection, out var id)) { return(id); } throw new InvalidOperationException("Missing Connection Id"); }