public virtual VisitorAction Leave( EnumValueNode node, ISyntaxNode parent, IReadOnlyList <object> path, IReadOnlyList <ISyntaxNode> ancestors) { return(GetDefaultAction(node.Kind)); }
/// <summary> /// Determines whether the specified <see cref="EnumValueNode"/> /// is equal to the current <see cref="EnumValueNode"/>. /// </summary> /// <param name="other"> /// The <see cref="EnumValueNode"/> to compare with the current /// <see cref="EnumValueNode"/>. /// </param> /// <returns> /// <c>true</c> if the specified <see cref="EnumValueNode"/> is equal /// to the current <see cref="EnumValueNode"/>; /// otherwise, <c>false</c>. /// </returns> public bool Equals(EnumValueNode other) { if (other is null) { return(false); } if (ReferenceEquals(other, this)) { return(true); } return(other.Value.Equals(Value, StringComparison.Ordinal)); }
public void EnumArg(string arg) { // arrange byte[] sourceText = Encoding.UTF8.GetBytes( "{ a(b:" + arg + ") }"); // acts var parser = new Utf8GraphQLParser( sourceText, ParserOptions.Default); DocumentNode document = parser.Parse(); // assert EnumValueNode value = Assert.IsType <EnumValueNode>( document.Definitions.OfType <OperationDefinitionNode>().First() .SelectionSet.Selections.OfType <FieldNode>().First() .Arguments.First().Value); Assert.Equal(arg, value.Value); }
protected virtual EnumValueNode RewriteEnumValue( EnumValueNode node, TContext context) { return(node); }
protected override void VisitEnumValue(EnumValueNode node) { _writer.Write(node.Value); }
protected virtual void VisitEnumValue(EnumValueNode node) { }
public static void WriteEnumValue( this DocumentWriter writer, EnumValueNode node) { writer.Write(node.Value); }
protected virtual void VisitEnumValue( EnumValueNode node, TContext context) { }