Пример #1
0
 protected override void VisitEnumValueDefinition(
     EnumValueDefinitionNode node,
     TypeDefinitionItem context)
 {
     context.Fields.Add(new TypeDefinitionField {
         Name = node.Name.ToString()
     });
 }
Пример #2
0
 protected sealed override ISyntaxVisitorAction Enter(
     ISyntaxNode node,
     ISyntaxVisitorContext context)
 {
     return(node switch
     {
         DocumentNode n => Enter(n, context),
         OperationDefinitionNode n => Enter(n, context),
         VariableDefinitionNode n => Enter(n, context),
         VariableNode n => Enter(n, context),
         SelectionSetNode n => Enter(n, context),
         FieldNode n => Enter(n, context),
         ArgumentNode n => Enter(n, context),
         FragmentSpreadNode n => Enter(n, context),
         InlineFragmentNode n => Enter(n, context),
         FragmentDefinitionNode n => Enter(n, context),
         DirectiveNode n => Enter(n, context),
         NamedTypeNode n => Enter(n, context),
         ListTypeNode n => Enter(n, context),
         NonNullTypeNode n => Enter(n, context),
         ListValueNode n => Enter(n, context),
         ObjectValueNode n => Enter(n, context),
         ObjectFieldNode n => Enter(n, context),
         IValueNode n => Enter(n, context),
         SchemaDefinitionNode n => Enter(n, context),
         OperationTypeDefinitionNode n => Enter(n, context),
         ScalarTypeDefinitionNode n => Enter(n, context),
         ObjectTypeDefinitionNode n => Enter(n, context),
         FieldDefinitionNode n => Enter(n, context),
         InputValueDefinitionNode n => Enter(n, context),
         InterfaceTypeDefinitionNode n => Enter(n, context),
         UnionTypeDefinitionNode n => Enter(n, context),
         EnumTypeDefinitionNode n => Enter(n, context),
         EnumValueDefinitionNode n => Enter(n, context),
         InputObjectTypeDefinitionNode n => Enter(n, context),
         DirectiveDefinitionNode n => Enter(n, context),
         SchemaExtensionNode n => Enter(n, context),
         ScalarTypeExtensionNode n => Enter(n, context),
         ObjectTypeExtensionNode n => Enter(n, context),
         InterfaceTypeExtensionNode n => Enter(n, context),
         UnionTypeExtensionNode n => Enter(n, context),
         EnumTypeExtensionNode n => Enter(n, context),
         InputObjectTypeExtensionNode n => Enter(n, context),
         _ => throw new NotSupportedException()
     });
 IEnumValueDescriptor IEnumValueDescriptor.SyntaxNode(
     EnumValueDefinitionNode syntaxNode)
 {
     SyntaxNode(syntaxNode);
     return(this);
 }
 protected void SyntaxNode(EnumValueDefinitionNode syntaxNode)
 {
     ValueDescription.SyntaxNode = syntaxNode;
 }
Пример #5
0
 protected virtual ISyntaxVisitorAction Enter(
     EnumValueDefinitionNode node,
     ISyntaxVisitorContext context) =>
 DefaultAction;
 public IEnumValueDescriptor SyntaxNode(
     EnumValueDefinitionNode enumValueDefinition)
 {
     Definition.SyntaxNode = enumValueDefinition;
     return(this);
 }
 protected virtual ISyntaxVisitorAction Leave(
     EnumValueDefinitionNode node,
     TContext context) =>
 DefaultAction;
 public new ISortEnumValueDescriptor SyntaxNode(
     EnumValueDefinitionNode enumValueDefinition)
 {
     base.SyntaxNode(enumValueDefinition);
     return(this);
 }
Пример #9
0
 protected virtual void VisitEnumValueDefinition(EnumValueDefinitionNode node)
 {
 }