예제 #1
0
        public void RemoveCommand(IBatchOperationHandle batchOperationHandle, ICommandQueueMessage message)
        {
            DummyBatchOperationHandle dummyBatch = batchOperationHandle as DummyBatchOperationHandle;

            dummyBatch.QueuedOperations.Add(() =>
            {
                DummyDeployReinforcementsQueue.RemoveAll(queuedMessage => message.OperationId == queuedMessage.OperationId);
                DummyOrderAttackQueue.RemoveAll(queuedMessage => message.OperationId == queuedMessage.OperationId);
                DummyRedeployQueue.RemoveAll(queuedMessage => message.OperationId == queuedMessage.OperationId);
            });
        }
예제 #2
0
        public Task <Guid> Redeploy(Guid sessionId, Guid phaseId, String nationEtag, Guid sourceRegion, Guid targetRegion, UInt32 numberOfTroops)
        {
            Guid operationId = Guid.NewGuid();

            DummyRedeployQueue.Add(new DummyRedeploy
            {
                OperationId    = operationId,
                PhaseId        = phaseId,
                SourceRegion   = sourceRegion,
                TargetRegion   = targetRegion,
                NumberOfTroops = numberOfTroops
            });
            return(Task.FromResult(operationId));
        }