Exemple #1
0
        private AbstractCLIOption CreateNewOption(string _Name, SourceSpan _Span)
        {
            AbstractCLIOption _ACLIOption = new AbstractCLIOption(_Name);
            _ACLIOption.Column = _Span.Start.Column;
            _ACLIOption.EndPos = _Span.EndPos;
            _ACLIOption.Line = _Span.Start.Line;
            _ACLIOption.Pos = _Span.Start.Position;

            return _ACLIOption;
        }
Exemple #2
0
 private void Reset()
 {
     Parameters.Clear();
     CurrentCommand = "";
     CurrentOption = null;
     InputString = "";
     ConsoleCursorLeft = 0;
     currentCursorPosWithinCommand = 0;
 }
Exemple #3
0
        private void AddOptionToParameters(AbstractCLIOption aCLIoption)
        {
            CurrentOption = aCLIoption;

            if (!Parameters.ContainsKey(aCLIoption.Option))
            {
                List<AbstractCLIOption> NewParameterList = new List<AbstractCLIOption>();
                NewParameterList.Add(aCLIoption);
                Parameters.Add(aCLIoption.Option, NewParameterList);
            }//new Option?
            else
            {
                Parameters[aCLIoption.Option].Add(aCLIoption);
            }//no new Option
        }