Пример #1
0
        /// <summary>
        /// Parses the input entered by the user over console
        /// Calls WcsCliCmProxy class for processing the input
        /// </summary>
        private static void ContinuousConsoleUserInputCapture()
        {
            String inputString = null;
            bool _tobreak = false;
            //autoComplete = new AutoComplete("");
            consoleObj = new ConsoleOperations();

            while (true)
            {
                //inputString = autoComplete.Edit(WcsCliConstants.consoleString + " ", "");
                inputString = consoleObj.ProcessInput();

                if (inputString == null)
                        continue;

                if (inputString.Equals("exit", StringComparison.InvariantCultureIgnoreCase) ||
                        inputString.Equals("quit", StringComparison.InvariantCultureIgnoreCase))
                {
                    inputString = "wcscli";
                    inputString += " ";
                    inputString += "-" + WcsCliConstants.terminateCmConnection;
                    _tobreak = true;
                }

                WcsCliCmProxy.InteractiveParseUserCommandGetCmResponse(false,inputString);

                if (_tobreak)
                    break;
            } // While loop ends
            return;
        }
Пример #2
0
        /// <summary>
        /// Parses the input entered by the user over console
        /// Calls WcsCliCmProxy class for processing the input
        /// </summary>
        private static void ContinuousConsoleUserInputCapture()
        {
            String inputString = null;
            bool   _tobreak    = false;

            consoleObj = new ConsoleOperations();

            while (true)
            {
                inputString = consoleObj.ProcessInput();

                if (inputString == null)
                {
                    continue;
                }

                if (inputString.Equals("exit", StringComparison.InvariantCultureIgnoreCase) ||
                    inputString.Equals("quit", StringComparison.InvariantCultureIgnoreCase))
                {
                    inputString  = "wcscli";
                    inputString += " ";
                    inputString += "-" + WcsCliConstants.terminateCmConnection;
                    _tobreak     = true;
                }
                if (inputString.ToLower().Contains(" -v"))
                {
                    inputString  = "wcscli ";
                    inputString += "-" + WcsCliConstants.establishCmConnection;
                    inputString += " -v";
                }

                WcsCliCmProxy.InteractiveParseUserCommandGetCmResponse(false, inputString);

                if (_tobreak)
                {
                    break;
                }
            } // While loop ends
            return;
        }