Exemplo n.º 1
0
        public Task MultiGrainAdd(ITransactionCommitterTestGrain committer, ITransactionCommitOperation <IRemoteCommitService> operation, List <ITransactionTestGrain> grains, int numberToAdd)
        {
            List <Task> tasks = new List <Task>();

            tasks.AddRange(grains.Select(g => g.Add(numberToAdd)));
            tasks.Add(committer.Commit(operation));
            return(Task.WhenAll(tasks));
        }
        public Task MultiGrainAdd(ITransactionCommitterTestGrain committer, string commitArg, List <ITransactionTestGrain> grains, int numberToAdd)
        {
            List <Task> tasks = new List <Task>();

            tasks.AddRange(grains.Select(g => g.Add(numberToAdd)));
            tasks.Add(committer.Commit(commitArg));
            return(Task.WhenAll(tasks));
        }