Exemplo n.º 1
0
        public static void Write(this GenericNameSyntax syntax, IIndentedTextWriterWrapper textWriter, IContext context)
        {
            var hasInvocationExpressionParent = syntax.Ancestors().OfType <InvocationExpressionSyntax>().Any();

            if (hasInvocationExpressionParent)
            {
                textWriter.Write(syntax.Identifier.Text);
                return;
            }

            textWriter.Write(syntax.Identifier.Text);
            textWriter.Write("[");
            syntax.TypeArgumentList.Write(textWriter, context);
            textWriter.Write("]");
        }