public void ProcessEvent(IEventHandlerContext <ConstraintRegistered> context) { var constraintAdded = context.Event; _query.ConstraintRegistered(context.PrimitiveEvent.Id, constraintAdded.Axis, constraintAdded.Index, constraintAdded.Id, constraintAdded.Comparison, constraintAdded.Value); }
public void ProcessEvent(IEventHandlerContext <OperationRegistered> context) { var operationRegistered = context.Event; _query.AddOperation(operationRegistered.Id, context.PrimitiveEvent.Id, operationRegistered.SequenceNumber, operationRegistered.Operation, operationRegistered.ValueProviderName, operationRegistered.InputParameter); }
public void ProcessEvent(IEventHandlerContext <Registered> context) { var registered = context.Event; _query.Registered(context.PrimitiveEvent.Id, registered.Name, registered.ColumnArgumentId, registered.RowArgumentId, registered.DataTypeName); }
public void ProcessEvent(IEventHandlerContext <Registered> context) { var data = context.Event; _query.Register(context.PrimitiveEvent.Id, data.Name, data.FormulaId, data.ExpectedResult, data.ExpectedResultDataTypeName, data.Comparison); }
public void ProcessEvent(IEventHandlerContext <Registered> context) { using (_databaseContextFactory.Create(_configuration.ProviderName, _configuration.ConnectionString)) { _query.Register(context.ProjectionEvent, context.DomainEvent); } }
public Task HandleAsync(IEventHandlerContext <TEvent> context) { IEventHandler <TEvent> target; if (innerHandler.TryGetTarget(out target)) { return(target.HandleAsync(context.Payload.Body)); } else { context.Handlers.Remove(this); } return(Async.CompletedTask); }
private Task PublishInternalAsyc <TEvent>(IEventHandlerContext <TEvent> context) { Type eventType = typeof(TEvent); object[] contextHandlers = registry.GetContextHandlers(eventType); object[] envelopeHandlers = registry.GetEnvelopeHandlers(eventType); object[] directHandlers = registry.GetDirectHandlers(eventType); Task[] tasks = new Task[contextHandlers.Length + envelopeHandlers.Length + directHandlers.Length]; if (tasks.Length == 0) { return(Task.FromResult(true)); } // Execute context handlers and store tasks. for (int i = 0; i < contextHandlers.Length; i++) { tasks[i] = ((IEventHandler <IEventHandlerContext <TEvent> >)contextHandlers[i]).HandleAsync(context); } // Execute envelope handlers and store tasks. for (int i = 0; i < envelopeHandlers.Length; i++) { tasks[contextHandlers.Length + i] = ((IEventHandler <Envelope <TEvent> >)envelopeHandlers[i]).HandleAsync(context.Payload); } // Execute direct handlers and store tasks. for (int i = 0; i < directHandlers.Length; i++) { tasks[contextHandlers.Length + envelopeHandlers.Length + i] = ((IEventHandler <TEvent>)directHandlers[i]).HandleAsync(context.Payload.Body); } // Return joined task. return(Task.Factory.ContinueWhenAll(tasks, (items) => Task.FromResult(true))); }
public void ProcessEvent(IEventHandlerContext <ConstraintRemoved> context) { _query.RemoveConstraint(context.Event.Id); }
public void ProcessEvent(IEventHandlerContext <PermissionRemoved> context) { _query.PermissionRemoved(context.PrimitiveEvent, context.Event); }
public void ProcessEvent(IEventHandlerContext <Added> context) { _query.Added(context.PrimitiveEvent, context.Event); }
public void ProcessEvent(IEventHandlerContext <ArgumentRegistered> context) { _query.SetArgumentValue(context.PrimitiveEvent.Id, context.Event.ArgumentId, context.Event.Value); }
public void ProcessEvent(IEventHandlerContext <MovedEvent> context) { TimesMoved++; }
public void ProcessEvent(IEventHandlerContext <Renamed> context) { _query.Rename(context.PrimitiveEvent.Id, context.Event.Name); }
public void ProcessEvent(IEventHandlerContext <ElementRegistered> context) { var elementAdded = context.Event; _query.ElementRegistered(context.PrimitiveEvent.Id, elementAdded.Column, elementAdded.Row, elementAdded.Id, elementAdded.Value); }
public void ProcessEvent(IEventHandlerContext <OperationRemoved> context) { _query.RemoveOperation(context.Event.Id); _query.RenumberOperations(context.PrimitiveEvent.Id, context.Event.SequenceNumber); }
public void ProcessEvent(IEventHandlerContext <Removed> context) { _query.Remove(context.PrimitiveEvent.Id); }
public void ProcessEvent(IEventHandlerContext <TestEvent> context) { }
public void ProcessEvent(IEventHandlerContext <Registered> context) { _query.Register(context.ProjectionEvent, context.DomainEvent); }
public void ProcessEvent(IEventHandlerContext <Registered> context) { _query.Registered(context.PrimitiveEvent, context.Event); }
public void ProcessEvent(IEventHandlerContext <object> context) { }
public void ProcessEvent(IEventHandlerContext <ValueRemoved> context) { _query.ValueRemoved(context.PrimitiveEvent, context.Event); }