Exemplo n.º 1
0
        public Task DeviceImportWorkflow(
            [OrchestrationTrigger] IDurableOrchestrationContext orchestrationContext)
        {
            var input = orchestrationContext.GetInput <StartDeviceManagementMessage>();
            var tasks = new List <Task>();

            tasks.AddRange(vendorClient.StartDeviceImportJobs(orchestrationContext, input.UserId, input.ConnectedDevices));
            tasks.AddRange(vendorClient.StartDeviceDeletionJobs(orchestrationContext, input.UserId, input.DisconnectedDevices));

            return(Task.WhenAll(tasks));
        }