private void AttemptToAppendText(IFileSystemService fsSvc, object lockObject, string filename, string text) { //$PERF: a better approach would be to queue up these requests for a worker to dispatch, // but it's overkill for this debugging facility. lock (lockObject) { fsSvc.AppendAllText(filename, text); } }
void LogMessageToFile(string message) { _fileSystemService.AppendAllText(_logFileService.GetLogFileName(), $"{message}{Environment.NewLine}"); }