Exemple #1
0
        public Task <ContinueRoutineResult> ContinueAsync(
            MethodContinuationData data,
            InvocationPreferences preferences)
        {
            var message = new Message
            {
                Type      = MessageType.Response,
                DeliverAt = data.ContinueAt
            };

            MethodContinuationDataTransformer.Write(message, data, _serializer);

            var result = new ContinueRoutineResult();

            if (preferences.LockMessage)
            {
                result.MessageHandle = new MessageHandle(message, _messageHub);
            }
            else
            {
                _messageHub.Schedule(message);
            }

            return(Task.FromResult(result));
        }
Exemple #2
0
 private async Task HandleResponse(Message message)
 {
     var continuationData     = MethodContinuationDataTransformer.Read(message, _serializerProvider);
     var communicationMessage = new CommunicationMessage(message);
     await _localTransitionRunner.ContinueAsync(continuationData, communicationMessage);
 }