예제 #1
0
            private void RecordBindingDiagnostics(BindingDiagnosticBag bindingDiagnostics, Location sourceLocation)
            {
                if (((SyntaxTree)sourceLocation.SourceTree).ReportDocumentationCommentDiagnostics())
                {
                    if (bindingDiagnostics.DiagnosticBag?.IsEmptyWithoutResolution == false)
                    {
                        foreach (Diagnostic diagnostic in bindingDiagnostics.DiagnosticBag.AsEnumerable())
                        {
                            // CONSIDER: Dev11 actually uses the originating location plus the offset into the cref/name
                            _diagnostics.Add(diagnostic.WithLocation(sourceLocation));
                        }
                    }
                }

                _diagnostics.AddDependencies(bindingDiagnostics);
            }