public string PrintLog(string entry, string user, string subjectId, ClassifierViewEnum state, string context, string peer, string answer, string time) { string stateString = null; if (state == ClassifierViewEnum.SubjectView) { stateString = "Classifier"; } else if (state == ClassifierViewEnum.SummaryView) { stateString = "Summary"; } return($"{time},{entry},{user ?? ""},{subjectId ?? ""},{stateString ?? ""},{context ?? ""},{peer ?? ""},{answer ?? ""}"); }
public void AddEntry(string entry, string user = null, string subjectId = null, ClassifierViewEnum state = ClassifierViewEnum.None, string context = null, string peer = null, string answer = null) { lock (gate) { String entryString = PrintLog(entry, user, subjectId, state, context, peer, answer, DateTime.Now.ToString("HH:mm:ss.ffff")); activeEntryBuffer.Add(entryString); if (EnableDebugOutput) { System.Diagnostics.Debug.WriteLine(entryString); } } CheckActiveBuffer(); }