Ejemplo n.º 1
0
        /// <summary>
        /// Standard way to get the display name from a SyntaxNode. If the display
        /// name is null, returns false. Otherwise uses <see cref="TypeNameMatchesDocumentName(Document, string)"/>
        /// </summary>
        public static bool TypeNameMatchesDocumentName(
            Document document,
            SyntaxNode typeDeclaration,
            ISyntaxFacts syntaxFacts
            )
        {
            var name = syntaxFacts.GetDisplayName(typeDeclaration, DisplayNameOptions.None);

            return(name != null && TypeNameMatchesDocumentName(document, name));
        }