public void Handle(ProjectionManagementMessage.GetResult message)
        {
            if (!_started)
            {
                return;
            }
            var projection = GetProjection(message.Name);

            if (projection == null)
            {
                message.Envelope.ReplyWith(new ProjectionManagementMessage.NotFound());
            }
            else
            {
                projection.Handle(message);
            }
        }
Exemple #2
0
 public void Handle(ProjectionManagementMessage.GetResult message)
 {
     _lastAccessed = _timeProvider.Now;
     if (_state >= ManagedProjectionState.Stopped)
     {
         _getResultDispatcher.Publish(
             new CoreProjectionManagementMessage.GetResult(
                 new PublishEnvelope(_inputQueue), Guid.NewGuid(), Id, message.Partition),
             m =>
             message.Envelope.ReplyWith(
                 new ProjectionManagementMessage.ProjectionResult(_name, m.Partition, m.Result, m.Position)));
     }
     else
     {
         message.Envelope.ReplyWith(
             new ProjectionManagementMessage.ProjectionResult(
                 message.Name, message.Partition, "*** UNKNOWN ***", position: null));
     }
 }