Exemple #1
0
        public void Initialize()
        {
            try
            {
                connection.ConnectAsync().Wait();
            }
            catch (Exception ex)
            {
                throw new ConfigurationException("Cannot connect to event store.", ex);
            }

            try
            {
                projectionsManager = connection.GetProjectionsManagerAsync(projectionHost).Result;

                projectionsManager.ListAllAsync(connection.Settings.DefaultUserCredentials).Wait();
            }
            catch (Exception ex)
            {
                throw new ConfigurationException($"Cannot connect to event store projections: {projectionHost}.", ex);
            }
        }