Пример #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), " | ");
        }
Пример #2
0
        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)
 {
 }