private bool TryGetDiagnosticsQueue(DiagnosticAnalyzer analyzer, Dictionary<DiagnosticAnalyzer, SimpleDiagnosticQueue> diagnosticsMap, out SimpleDiagnosticQueue queue) { queue = null; lock (_gate) { return diagnosticsMap != null && diagnosticsMap.TryGetValue(analyzer, out queue); } }
private bool TryGetDiagnosticsQueue(DiagnosticAnalyzer analyzer, Dictionary <DiagnosticAnalyzer, SimpleDiagnosticQueue> diagnosticsMap, out SimpleDiagnosticQueue queue) { queue = null; lock (_gate) { return(diagnosticsMap != null && diagnosticsMap.TryGetValue(analyzer, out queue)); } }
private static void EnqueueCore_NoLock(Dictionary<DiagnosticAnalyzer, SimpleDiagnosticQueue> diagnosticsMap, Diagnostic diagnostic, DiagnosticAnalyzer analyzer) { SimpleDiagnosticQueue queue; if (diagnosticsMap.TryGetValue(analyzer, out queue)) { queue.Enqueue(diagnostic); } else { diagnosticsMap[analyzer] = new SimpleDiagnosticQueue(diagnostic); } }