public void SubmitComboResult(string combo, ResultType resultType, CaptureDictionary captures = null, bool outputResult = true, string file = null, string directory = null) { if (resultType == ResultType.Free || resultType == ResultType.Hit) { Interlocked.Increment(ref _runInformations.Hits); if (resultType == ResultType.Free) { Interlocked.Increment(ref _runInformations.Free); } if (outputResult) { string output = _formatUtils.FormatOutput(combo, captures != null ? _formatUtils.CaptureDictionaryToString(captures) : null); _fileUtils.WriteLine(output, $"{file ?? (resultType == ResultType.Free ? "Free" : "Hits")}.txt", directory ?? $"Results/{_runInformations.RunStartFormattedDate}"); _consoleUtils.WriteLine(output, resultType == ResultType.Free ? ConsoleColor.Cyan : ConsoleColor.Green); } } Interlocked.Increment(ref _runInformations.Ran); }