Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="Words"></param>
        /// <param name="Text"></param>
        /// <param name="Data"></param>
        /// <returns></returns>
        protected static ChatCommandTempSafe ParseTempSafe(string[] Words, string Text, DataController Data)
        {
            ChatCommandTempSafe command = null;

            if (Words == null || Words.Length < 2)
            {
                return(command);
            }

            string text = String.Join(DELIMITER.ToString(), Words, 1, Words.Length - 1);

            if (text != null)
            {
                text = text.Trim();
            }

            switch (text)
            {
            case ON:
                command = new ChatCommandTempSafe(true);
                break;

            case OFF:
                command = new ChatCommandTempSafe(false);
                break;
            }

            return(command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="Words"></param>
        /// <param name="Text"></param>
        /// <param name="Data"></param>
        /// <returns></returns>
        protected static ChatCommandTempSafe ParseTempSafe(string[] Words, string Text, DataController Data)
        {
            ChatCommandTempSafe command = null;

            if (Words == null || Words.Length < 2)
                return command;

            string text = String.Join(DELIMITER.ToString(), Words, 1, Words.Length - 1);

            if (text != null)
                text = text.Trim();

            switch (text)
            {
                case ON:
                    command = new ChatCommandTempSafe(true);
                    break;

                case OFF:
                    command = new ChatCommandTempSafe(false);
                    break;
            }

            return command;
        }