示例#1
0
        public string GetAllRemainingParameter()
        {
            string[] strings = RawQuery.Split(new char[] { ' ' }, 2, System.StringSplitOptions.None);
            if (strings.Length > 1)
            {
                return(strings[1]);
            }

            return(string.Empty);
        }
示例#2
0
文件: Query.cs 项目: sdjc/Wox
        public string GetAllRemainingParameter()
        {
            string[] strings = RawQuery.Split(' ');
            if (strings.Length > 1)
            {
                return(RawQuery.Substring(RawQuery.IndexOf(' ') + 1));
            }

            return(string.Empty);
        }
示例#3
0
        internal string GetActionKeyword()
        {
            if (!string.IsNullOrEmpty(RawQuery))
            {
                var strings = RawQuery.Split(' ');
                if (strings.Length > 0)
                {
                    return(strings[0]);
                }
            }

            return(string.Empty);
        }
示例#4
0
        private void ParseQuery()
        {
            if (string.IsNullOrEmpty(RawQuery))
            {
                return;
            }

            string[] strings = RawQuery.Split(' ');
            //todo:not exactly correct. query that didn't containing a space should be a valid query
            if (strings.Length == 1)
            {
                return;                      //we consider a valid query must contain a space
            }
            ActionName = strings[0];
            for (int i = 1; i < strings.Length; i++)
            {
                if (!string.IsNullOrEmpty(strings[i]))
                {
                    ActionParameters.Add(strings[i]);
                }
            }
        }