Пример #1
0
            private bool TryGetDiagnosticsQueue(DiagnosticAnalyzer analyzer, Dictionary<DiagnosticAnalyzer, SimpleDiagnosticQueue> diagnosticsMap, out SimpleDiagnosticQueue queue)
            {
                queue = null;

                lock (_gate)
                {
                    return diagnosticsMap != null && diagnosticsMap.TryGetValue(analyzer, out queue);
                }
            }
Пример #2
0
            private bool TryGetDiagnosticsQueue(DiagnosticAnalyzer analyzer, Dictionary <DiagnosticAnalyzer, SimpleDiagnosticQueue> diagnosticsMap, out SimpleDiagnosticQueue queue)
            {
                queue = null;

                lock (_gate)
                {
                    return(diagnosticsMap != null && diagnosticsMap.TryGetValue(analyzer, out queue));
                }
            }
Пример #3
0
 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);
     }
 }