示例#1
0
        protected override void VisitUnionTypeDefinition(
            UnionTypeDefinitionNode node,
            DocumentWriter writer)
        {
            WriteDescription(node.Description, writer);

            writer.Write(Keywords.Union);
            writer.WriteSpace();
            writer.WriteName(node.Name);

            WriteDirectives(node.Directives, writer);

            writer.WriteSpace();
            writer.Write('=');
            writer.WriteSpace();

            writer.WriteMany(node.Types, (n, _) => writer.WriteNamedType(n), " | ");
        }
        protected virtual UnionTypeDefinitionNode RewriteUnionTypeDefinition(
            UnionTypeDefinitionNode node,
            TContext context)
        {
            UnionTypeDefinitionNode current = node;

            current = RewriteDirectives(current, current.Directives,
                                        context, current.WithDirectives);

            current = Rewrite(current, current.Name, context,
                              RewriteName, current.WithName);

            current = Rewrite(current, current.Description, context,
                              RewriteStringValue, current.WithDescription);

            current = RewriteMany(current, current.Types, context,
                                  RewriteNamedType, current.WithTypes);

            return(current);
        }
示例#3
0
        protected virtual void ResolveChildren(
            UnionTypeDefinitionNode node,
            IList <SyntaxNodeInfo> children)
        {
            ResolveChildren(
                nameof(node.Description),
                node.Description,
                children);

            ResolveChildren(
                nameof(node.Name),
                node.Name,
                children);

            ResolveChildren(
                nameof(node.Directives),
                node.Directives,
                children);

            ResolveChildren(
                nameof(node.Types),
                node.Types,
                children);
        }
示例#4
0
 protected virtual void VisitUnionTypeDefinition(
     UnionTypeDefinitionNode node)
 {
 }
 protected override void VisitUnionTypeDefinition(
     UnionTypeDefinitionNode node)
 {
     _visited.Add(nameof(VisitUnionTypeDefinition));
     base.VisitUnionTypeDefinition(node);
 }
示例#6
0
 protected virtual void VisitUnionTypeDefinition(
     UnionTypeDefinitionNode node,
     TContext context)
 {
 }