public async Task InitializeAsync(CancellationToken ct = default) { try { await connection.ConnectAsync(); } catch (Exception ex) { throw new ConfigurationException("Cannot connect to event store.", ex); } await projectionClient.ConnectAsync(); }
public void Initialize() { try { connection.ConnectAsync().Wait(); } catch (Exception ex) { throw new ConfigurationException("Cannot connect to event store.", ex); } projectionClient.ConnectAsync().Wait(); }
public async Task InitializeAsync(CancellationToken ct = default) { try { await connection.ConnectAsync(); } catch (Exception ex) { var error = new ConfigurationError("GetEventStore cannot connect to event store."); throw new ConfigurationException(error, ex); } await projectionClient.ConnectAsync(); }