コード例 #1
0
        public static async Task UnleaseStock([ActivityTrigger] UnleaseStockCommand command, ILogger logger)
        {
            logger.LogWarning("Unleasing stock");

            // Simulate a hard work ordering the item
            await Task.Delay(100);
        }
コード例 #2
0
        private static async Task <StockUnleasedEvent> UnleaseStock(IDurableOrchestrationContext context, UnleaseStockCommand command)
        {
            // Start Activity CreateOrder
            await context.CallActivityAsync("Example2-Events-UnleaseStock", command);

            // Wait for completion
            return(await context.WaitForExternalEvent <StockUnleasedEvent>($"stock-unleased"));
        }