EncogCmd.ParseCommand.ParseCommand C# (CSharp) Méthode

ParseCommand() public méthode

public ParseCommand ( IEnumerable args ) : System
args IEnumerable
Résultat System
        public ParseCommand(IEnumerable<string> args)
        {
            _args = new List<String>();
            _settings = new Dictionary<string, string>();

            foreach (string t1 in args)
            {
                String t = t1.Trim();

                if (t[0] == '-')
                {
                    int idx = t.IndexOf(':');

                    if (idx != -1)
                    {
                        String name = t.Substring(1, idx-1).Trim().ToLower();
                        String value = t.Substring(idx +1).Trim();
                        _settings[name] = value;
                    }
                    else
                    {
                        String name = t.Substring(1).Trim();
                        _settings[name] = "t";
                    }
                }
                else
                {
                    if (_command == null)
                    {
                        _command = t.ToLower();
                    }
                    else
                    {
                        _args.Add(t);
                    }
                }
            }
        }