AppendArg() public method

public AppendArg ( string text ) : void
text string
return void
Example #1
0
		private void ParseCommandLine(string[] args)
		{
			List<idCmdArgs> argList = new List<idCmdArgs>();
			idCmdArgs current = null;

			foreach(string arg in args)
			{
				if(arg.StartsWith("+") == true)
				{
					current = new idCmdArgs();
					current.AppendArg(arg.Substring(1));

					argList.Add(current);
				}
				else
				{
					if(current == null)
					{
						current = new idCmdArgs();
						argList.Add(current);
					}

					current.AppendArg(arg);
				}
			}

			_commandLineArguments = argList.ToArray();
		}