Ejemplo n.º 1
0
 private void startReading_Click(object sender, EventArgs e)
 {
     if (eventStoreSubscription == null)
     {
         eventStoreSubscription = connection.SubscribeToStream("activities-" + readAs.Text, true,
                                                               (x, y) => AppendToReadLog(x, y));
     }
 }
Ejemplo n.º 2
0
 protected void SubscribeToStream(string streamId, string login, string password)
 {
     using (Connection.SubscribeToStream(streamId, false, (x, y) => { }, (x, y, z) => { },
                                         login == null && password == null ? null : new UserCredentials(login, password)))
     {
     }
 }
Ejemplo n.º 3
0
 public void SubscribeValueChange(Action <MeasurementReadCounter> valueChanged)
 {
     _connection.SubscribeToStream(
         "$projections-MeasurementReadCounter-result",
         false,
         (subscription, resolvedEvent) => ValueChanged(subscription, resolvedEvent, valueChanged),
         Dropped,
         EventStoreCredentials.Default);
 }
Ejemplo n.º 4
0
        public void Start()
        {
            var subscription = connection.SubscribeToStream("alarmclock", false, EventAppeared);

            clock = new Stopwatch();
            clock.Start();
            var thread = new Thread(Run);

            thread.IsBackground = true;
            thread.Start();
        }
Ejemplo n.º 5
0
 private void Subsribe()
 {
     _connection.SubscribeToStream("OrderCommandResponses", false, CommandResponseReceived, SubscriptionDropped);
 }