Exemplo n.º 1
0
        public SymbolReference(FileReferenceInfo file, SyntaxNode node)
        {
            Identifier = NameResolver.GetFullName(node);
            File       = file;

            // Get line span
            var loc = node.GetLocation().GetLineSpan();

            StartLine = loc.StartLinePosition.Line;
            EndLine   = loc.EndLinePosition.Line;

            // Expand line span to include xml doc
            while (
                StartLine > 0 &&
                StartLine - 1 < file.Lines.Length &&
                Regex.IsMatch(file.Lines[StartLine - 1], "\\s*///")
                )
            {
                StartLine--;
            }

            // Determine whether the symbol is visible to external assemblies
            IsExported = IsExportedCore(node);
        }