// ReSharper restore UnusedMember.Local, UnusedParameter.Local public override void Run(out int errorLevel) { /* We are here because we Parsed. We could potentially allow for Parse extensibility, * but this will suffice as a workaround for the time being. We do this here because * we want to have evaluated the Arguments, regardless of their sourcing, in front of * evaluating any error levels. */ // Allowing for a Response File as input instead of the direct Command Line Arguments. bool TryEvaluateResponseFile(out int responseLevel) { responseLevel = DefaultErrorLevel; // TODO: TBD: we might otherwise throw on this one... return(!ResponseFile.HasValue() || TryLoadResponseFile(ResponseFile.Value)); } if (!TryEvaluateResponseFile(out errorLevel)) { return; } // From this point, we should have arguments parsed, where ever we sourced them. base.Run(out errorLevel); // Version trumps Reporting any Error Levels. if (VersionSwitch.Enabled || TryReportErrorLevel(errorLevel)) { return; } /* Kind of a roundabout way of doing it, except to underscore the control flow. * The focus is on Invoking the Operation. Which, this should also be demonstrable * regardless of the caller context. */ PrivateOperation.InvokeOperation(this, errorLevel); }