Beispiel #1
0
        private bool ParseLine(string sLine, CmdReqBase req)
        {
            int iPos = sLine.IndexOf("=");

            if (iPos < 0)
            {
                return(false);
            }

            string Name = "", Value = "";

            Name = sLine.Substring(0, iPos);
            if (iPos < sLine.Length - 1)
            {
                Value = sLine.Substring(iPos + 1, sLine.Length - iPos - 1);
            }

            if (CommandToken.IsCommandToken(Name))
            {
                req.Command = Value;
            }
            else
            {
                req.AddParameter(Name, Value);
            }
            return(true);
        }