/// <summary> /// Self-explanatory /// </summary> /// <param name="arg"></param> /// <returns></returns> private bool HandleTextFile(string arg) { if (!arg.Equals(textFile)) { return(false); } if (Report != null) { throw new ArgumentException("Multiple reports requested, this is not allowed."); } ExpectReadyForNewState(arg); Report = new TextReport(); ParseState = ProcessorState.Default; return(true); }
/// <summary> /// Self-explanatory /// </summary> private void VerifyArgState() { if (Report == null) { Report = new TextReport(); } if (Paths.Count == 0 && PathFiles.Count == 0) { throw new ArgumentException("No input files specified."); } if (ParseState != ProcessorState.Default && ParseState != ProcessorState.WasInputFile) { throw new ArgumentException("Expecting more arguments based on last switch"); } }
/// <summary> /// Self-explanatory /// </summary> private void VerifyArgState() { if (Report == null) Report = new TextReport(); if (Paths.Count == 0 && PathFiles.Count == 0) throw new ArgumentException("No input files specified."); if (ParseState != ProcessorState.Default && ParseState != ProcessorState.WasInputFile) throw new ArgumentException("Expecting more arguments based on last switch"); }
/// <summary> /// Self-explanatory /// </summary> /// <param name="arg"></param> /// <returns></returns> private bool HandleTextFile(string arg) { if (!arg.Equals(textFile)) return false; if (Report != null) throw new ArgumentException("Multiple reports requested, this is not allowed."); ExpectReadyForNewState(arg); Report = new TextReport(); ParseState = ProcessorState.Default; return true; }