Example #1
0
        /// <summary>
        /// execute all pending commands - create the equivalent local commands and invoke its' execute method
        /// </summary>
        /// <param name="sendingInstruction"></param>
        /// <param name="sessionStage"></param>
        /// <param name="res"></param>
        internal override void Execute(SendingInstruction sendingInstruction, SessionStage sessionStage, IResultValue res)
        {
            MGDataCollection mgDataTab = MGDataCollection.Instance;

            // loop on all MGData
            for (int i = 0; i < mgDataTab.getSize(); i++)
            {
                MGData mgd = mgDataTab.getMGData(i);
                if (mgd != null && !mgd.IsAborting)
                {
                    CommandsTable commands = mgd.CmdsToServer;

                    // go over all commands
                    while (commands.getSize() > 0)
                    {
                        // extract command from CmdsToServer
                        IClientCommand          command             = commands.ExtractCommand(0);
                        LocalRunTimeCommandBase localRunTimeCommand = _localRunTimeCommandFactory.CreateLocalRunTimeCommand(command);
                        localRunTimeCommand.Execute();
                    }

                    Debug.Assert(mgd.CmdsToClient.getSize() == 0, "Not all commands were executed");
                }
            }
        }
Example #2
0
 /// <summary>build the xml request; send it to the runtime-engine</summary>
 /// <param name="sendingInstruction">instruction what to send during execution - NO_TASKS_OR_COMMANDS / ONLY_COMMANDS / TASKS_AND_COMMANDS.</param>
 internal void Execute(SendingInstruction sendingInstruction)
 {
     Execute(sendingInstruction, SessionStage.NORMAL, null);
 }
Example #3
0
 /// <summary>build the xml request; send it to the runtime-engine; receive a response</summary>
 /// <param name="sendingInstruction">instruction what to send during execution - NO_TASKS_OR_COMMANDS / ONLY_COMMANDS / TASKS_AND_COMMANDS.</param>
 /// <param name="sessionStage">HANDSHAKE / INITIAL / NORMAL.</param>
 /// <param name="res">result ot be  read after parsing the response from the server.</param>
 internal abstract void Execute(SendingInstruction sendingInstruction, SessionStage sessionStage, IResultValue res);