Пример #1
0
 public bool Equals(AttributeArgument compareNode)
 {
     return
         (compareNode != null &&
          ArgumentName?.Equals(compareNode.ArgumentName) != false &&
          ArgumentExpression?.Equals(compareNode.ArgumentExpression) != false &&
          base.Equals(compareNode));
 }
        private FieldDefinitionNode RewriteArgument(
            NameString schemaName,
            FieldDefinitionNode field)
        {
            var renamedArguments = new List <InputValueDefinitionNode>();

            foreach (InputValueDefinitionNode argument in field.Arguments)
            {
                if (ArgumentName.Equals(argument.Name.Value))
                {
                    renamedArguments.Add(argument.Rename(
                                             NewArgumentName, schemaName));
                }
                else
                {
                    renamedArguments.Add(argument);
                }
            }

            return(field.WithArguments(renamedArguments));
        }