private static void TestOwnerIsNull(QueueMessage message)
        {
            // Act
            Guid?owner = QueueCausalityManager.GetOwner(message);

            // Assert
            Assert.Null(owner);
        }
예제 #2
0
        public async Task <bool> ExecuteAsync(IStorageQueueMessage value, CancellationToken cancellationToken)
        {
            Guid?parentId = QueueCausalityManager.GetOwner(value);
            IFunctionInstance instance  = _instanceFactory.Create(value, parentId);
            IDelayedException exception = await _innerExecutor.TryExecuteAsync(instance, cancellationToken);

            return(exception == null);
        }
예제 #3
0
        public async Task <FunctionResult> ExecuteAsync(CloudQueueMessage value, CancellationToken cancellationToken)
        {
            Guid?parentId = QueueCausalityManager.GetOwner(value);
            TriggeredFunctionData input = new TriggeredFunctionData
            {
                ParentId     = parentId,
                TriggerValue = value
            };

            return(await _innerExecutor.TryExecuteAsync(input, cancellationToken));
        }
예제 #4
0
        public async Task <FunctionResult> ExecuteAsync(QueueMessage value, CancellationToken cancellationToken)
        {
            Guid?parentId = QueueCausalityManager.GetOwner(value);
            TriggeredFunctionData input = new TriggeredFunctionData
            {
                ParentId       = parentId,
                TriggerValue   = value,
                TriggerDetails = PopulateTriggerDetails(value)
            };

            return(await _innerExecutor.TryExecuteAsync(input, cancellationToken).ConfigureAwait(false));
        }
 private static Guid?GetOwner(string message)
 {
     return(QueueCausalityManager.GetOwner(CreateMessage(message)));
 }