private void startReading_Click(object sender, EventArgs e) { if (eventStoreSubscription == null) { eventStoreSubscription = connection.SubscribeToStream("activities-" + readAs.Text, true, (x, y) => AppendToReadLog(x, y)); } }
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))) { } }
public void SubscribeValueChange(Action <MeasurementReadCounter> valueChanged) { _connection.SubscribeToStream( "$projections-MeasurementReadCounter-result", false, (subscription, resolvedEvent) => ValueChanged(subscription, resolvedEvent, valueChanged), Dropped, EventStoreCredentials.Default); }
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(); }
private void Subsribe() { _connection.SubscribeToStream("OrderCommandResponses", false, CommandResponseReceived, SubscriptionDropped); }