Beispiel #1
0
        public async Task <IJob> Create(IReadOnlyCollection <ICommandWrapper> wrappedCommands)
        {
            var job = new Job {
                Id = Guid.NewGuid(),
                CommandInformations = wrappedCommands
                                      .Select(wc => new CommandInformation(wc.Id))
                                      .ToList()
            };

            foreach (var wrappedCommand in wrappedCommands)
            {
                wrappedCommand.LinkToJob(job);
            }
            await _jobHandler.Initialize(job, wrappedCommands);

            return(job);
        }