public void RaiseEvent(ICircuitBreakerDefinition breakerDefinition)
        {
            _connection.AppendToStreamAsync(StreamFormatter.GetStreamWithCategory("ClosedEvent", breakerDefinition.BreakerId),
                ExpectedVersion.Any, _credentials, breakerDefinition.AsJson());

            //var connection = EventStoreConnection.Create(new IPEndPoint(IPAddress.Parse("127.0.0.1"), 1113));
            //connection.Connect();
            //UserCredentials credentials = new UserCredentials("dFine", "Password02");
            //connection.AppendToStream("use the breaker name", ExpectedVersion.Any, credentials, breakerConfig.AsJson());
        }
 public void RaiseEvent(ICircuitBreakerDefinition breakerDefinition, BreakerOpenReason reason, Exception thrownException)
 {
     _connection.AppendToStreamAsync(StreamFormatter.GetStreamWithCategory("OpenedEvent", breakerDefinition.BreakerId),
         ExpectedVersion.Any, _credentials, breakerDefinition.AsJson());
 }
 public void RaiseEvent(ICircuitBreakerDefinition breakerDefinition)
 {
     _connection.AppendToStreamAsync(StreamFormatter.GetStreamWithCategory("UnregisterBreakerEvent", breakerDefinition.BreakerId),
         ExpectedVersion.Any, _credentials, breakerDefinition.AsJson());
 }