/// <summary> /// Check to see if files should be retained even when no violations are found /// </summary> /// <param name="parameters">The CommandParameters object to check</param> /// <returns>true iff files are always retained, even if no errors exist. /// Retention is our default behavior unless we're explicitly told to discard</returns> internal static bool RetainIfNoViolations(this CommandParameters parameters) { return(!(parameters.TryGetString(CommandConstStrings.NoViolationPolicy, out string policy) && policy.Equals(CommandConstStrings.Discard, StringComparison.OrdinalIgnoreCase))); }