diff --git a/src/GraphQLParser/AST/Definitions/GraphQLArgumentsDefinition.cs b/src/GraphQLParser/AST/Definitions/GraphQLArgumentsDefinition.cs index 0c4fddda..51a7da8f 100644 --- a/src/GraphQLParser/AST/Definitions/GraphQLArgumentsDefinition.cs +++ b/src/GraphQLParser/AST/Definitions/GraphQLArgumentsDefinition.cs @@ -23,40 +23,17 @@ public GraphQLArgumentsDefinition(List items) internal sealed class GraphQLArgumentsDefinitionWithLocation : GraphQLArgumentsDefinition { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLArgumentsDefinitionWithComment : GraphQLArgumentsDefinition { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLArgumentsDefinitionFull : GraphQLArgumentsDefinition { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/Definitions/GraphQLDirectiveDefinition.cs b/src/GraphQLParser/AST/Definitions/GraphQLDirectiveDefinition.cs index ce9fcca6..9d99ff62 100644 --- a/src/GraphQLParser/AST/Definitions/GraphQLDirectiveDefinition.cs +++ b/src/GraphQLParser/AST/Definitions/GraphQLDirectiveDefinition.cs @@ -48,40 +48,17 @@ public GraphQLDirectiveDefinition(GraphQLName name, GraphQLDirectiveLocations lo internal sealed class GraphQLDirectiveDefinitionWithLocation : GraphQLDirectiveDefinition { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLDirectiveDefinitionWithComment : GraphQLDirectiveDefinition { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLDirectiveDefinitionFull : GraphQLDirectiveDefinition { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/Definitions/GraphQLEnumTypeDefinition.cs b/src/GraphQLParser/AST/Definitions/GraphQLEnumTypeDefinition.cs index c6120bcf..5d7b18b0 100644 --- a/src/GraphQLParser/AST/Definitions/GraphQLEnumTypeDefinition.cs +++ b/src/GraphQLParser/AST/Definitions/GraphQLEnumTypeDefinition.cs @@ -34,40 +34,17 @@ public GraphQLEnumTypeDefinition(GraphQLName name) internal sealed class GraphQLEnumTypeDefinitionWithLocation : GraphQLEnumTypeDefinition { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLEnumTypeDefinitionWithComment : GraphQLEnumTypeDefinition { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLEnumTypeDefinitionFull : GraphQLEnumTypeDefinition { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/Definitions/GraphQLEnumValueDefinition.cs b/src/GraphQLParser/AST/Definitions/GraphQLEnumValueDefinition.cs index d10d53bd..bdb4406f 100644 --- a/src/GraphQLParser/AST/Definitions/GraphQLEnumValueDefinition.cs +++ b/src/GraphQLParser/AST/Definitions/GraphQLEnumValueDefinition.cs @@ -41,40 +41,17 @@ public GraphQLEnumValueDefinition(GraphQLName name, GraphQLEnumValue enumValue) internal sealed class GraphQLEnumValueDefinitionWithLocation : GraphQLEnumValueDefinition { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLEnumValueDefinitionWithComment : GraphQLEnumValueDefinition { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLEnumValueDefinitionFull : GraphQLEnumValueDefinition { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/Definitions/GraphQLEnumValuesDefinition.cs b/src/GraphQLParser/AST/Definitions/GraphQLEnumValuesDefinition.cs index ebdcf667..bfbc9028 100644 --- a/src/GraphQLParser/AST/Definitions/GraphQLEnumValuesDefinition.cs +++ b/src/GraphQLParser/AST/Definitions/GraphQLEnumValuesDefinition.cs @@ -23,40 +23,17 @@ public GraphQLEnumValuesDefinition(List items) internal sealed class GraphQLEnumValuesDefinitionWithLocation : GraphQLEnumValuesDefinition { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLEnumValuesDefinitionWithComment : GraphQLEnumValuesDefinition { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLEnumValuesDefinitionFull : GraphQLEnumValuesDefinition { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/Definitions/GraphQLFieldDefinition.cs b/src/GraphQLParser/AST/Definitions/GraphQLFieldDefinition.cs index 25e7b8e5..06025ccb 100644 --- a/src/GraphQLParser/AST/Definitions/GraphQLFieldDefinition.cs +++ b/src/GraphQLParser/AST/Definitions/GraphQLFieldDefinition.cs @@ -44,40 +44,17 @@ public GraphQLFieldDefinition(GraphQLName name, GraphQLType type) internal sealed class GraphQLFieldDefinitionWithLocation : GraphQLFieldDefinition { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLFieldDefinitionWithComment : GraphQLFieldDefinition { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLFieldDefinitionFull : GraphQLFieldDefinition { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/Definitions/GraphQLFieldsDefinition.cs b/src/GraphQLParser/AST/Definitions/GraphQLFieldsDefinition.cs index 8062b376..7f61d7e6 100644 --- a/src/GraphQLParser/AST/Definitions/GraphQLFieldsDefinition.cs +++ b/src/GraphQLParser/AST/Definitions/GraphQLFieldsDefinition.cs @@ -23,40 +23,17 @@ public GraphQLFieldsDefinition(List items) internal sealed class GraphQLFieldsDefinitionWithLocation : GraphQLFieldsDefinition { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLFieldsDefinitionWithComment : GraphQLFieldsDefinition { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLFieldsDefinitionFull : GraphQLFieldsDefinition { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/Definitions/GraphQLFragmentDefinition.cs b/src/GraphQLParser/AST/Definitions/GraphQLFragmentDefinition.cs index 1c146884..697b6a69 100644 --- a/src/GraphQLParser/AST/Definitions/GraphQLFragmentDefinition.cs +++ b/src/GraphQLParser/AST/Definitions/GraphQLFragmentDefinition.cs @@ -40,39 +40,16 @@ public GraphQLFragmentDefinition(GraphQLFragmentName name, GraphQLTypeCondition internal sealed class GraphQLFragmentDefinitionWithLocation : GraphQLFragmentDefinition { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLFragmentDefinitionWithComment : GraphQLFragmentDefinition { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLFragmentDefinitionFull : GraphQLFragmentDefinition { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/Definitions/GraphQLInputFieldsDefinition.cs b/src/GraphQLParser/AST/Definitions/GraphQLInputFieldsDefinition.cs index 39e57bc2..d4bbea38 100644 --- a/src/GraphQLParser/AST/Definitions/GraphQLInputFieldsDefinition.cs +++ b/src/GraphQLParser/AST/Definitions/GraphQLInputFieldsDefinition.cs @@ -23,40 +23,17 @@ public GraphQLInputFieldsDefinition(List items) internal sealed class GraphQLInputFieldsDefinitionWithLocation : GraphQLInputFieldsDefinition { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLInputFieldsDefinitionWithComment : GraphQLInputFieldsDefinition { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLInputFieldsDefinitionFull : GraphQLInputFieldsDefinition { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/Definitions/GraphQLInputObjectTypeDefinition.cs b/src/GraphQLParser/AST/Definitions/GraphQLInputObjectTypeDefinition.cs index 7692ba2f..100cdee0 100644 --- a/src/GraphQLParser/AST/Definitions/GraphQLInputObjectTypeDefinition.cs +++ b/src/GraphQLParser/AST/Definitions/GraphQLInputObjectTypeDefinition.cs @@ -34,40 +34,17 @@ public GraphQLInputObjectTypeDefinition(GraphQLName name) internal sealed class GraphQLInputObjectTypeDefinitionWithLocation : GraphQLInputObjectTypeDefinition { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLInputObjectTypeDefinitionWithComment : GraphQLInputObjectTypeDefinition { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLInputObjectTypeDefinitionFull : GraphQLInputObjectTypeDefinition { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/Definitions/GraphQLInputValueDefinition.cs b/src/GraphQLParser/AST/Definitions/GraphQLInputValueDefinition.cs index 2db5e360..a98b1d2b 100644 --- a/src/GraphQLParser/AST/Definitions/GraphQLInputValueDefinition.cs +++ b/src/GraphQLParser/AST/Definitions/GraphQLInputValueDefinition.cs @@ -43,42 +43,19 @@ public GraphQLInputValueDefinition(GraphQLName name, GraphQLType type) internal sealed class GraphQLInputValueDefinitionWithLocation : GraphQLInputValueDefinition { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLInputValueDefinitionWithComment : GraphQLInputValueDefinition { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLInputValueDefinitionFull : GraphQLInputValueDefinition { - private GraphQLLocation _location; - private List? _comments; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } /// @@ -100,42 +77,19 @@ public GraphQLArgumentDefinition(GraphQLName name, GraphQLType type) internal sealed class GraphQLArgumentDefinitionWithLocation : GraphQLArgumentDefinition { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLArgumentDefinitionWithComment : GraphQLArgumentDefinition { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLArgumentDefinitionFull : GraphQLArgumentDefinition { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } /// @@ -157,40 +111,17 @@ public GraphQLInputFieldDefinition(GraphQLName name, GraphQLType type) internal sealed class GraphQLInputFieldDefinitionWithLocation : GraphQLInputFieldDefinition { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLInputFieldDefinitionWithComment : GraphQLInputFieldDefinition { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLInputFieldDefinitionFull : GraphQLInputFieldDefinition { - private GraphQLLocation _location; - private List? _comments; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/Definitions/GraphQLInterfaceTypeDefinition.cs b/src/GraphQLParser/AST/Definitions/GraphQLInterfaceTypeDefinition.cs index 0a91cdda..4a45280a 100644 --- a/src/GraphQLParser/AST/Definitions/GraphQLInterfaceTypeDefinition.cs +++ b/src/GraphQLParser/AST/Definitions/GraphQLInterfaceTypeDefinition.cs @@ -35,40 +35,17 @@ public GraphQLInterfaceTypeDefinition(GraphQLName name) internal sealed class GraphQLInterfaceTypeDefinitionWithLocation : GraphQLInterfaceTypeDefinition { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLInterfaceTypeDefinitionWithComment : GraphQLInterfaceTypeDefinition { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLInterfaceTypeDefinitionFull : GraphQLInterfaceTypeDefinition { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/Definitions/GraphQLObjectTypeDefinition.cs b/src/GraphQLParser/AST/Definitions/GraphQLObjectTypeDefinition.cs index 34144dbd..b508ef52 100644 --- a/src/GraphQLParser/AST/Definitions/GraphQLObjectTypeDefinition.cs +++ b/src/GraphQLParser/AST/Definitions/GraphQLObjectTypeDefinition.cs @@ -35,40 +35,17 @@ public GraphQLObjectTypeDefinition(GraphQLName name) internal sealed class GraphQLObjectTypeDefinitionWithLocation : GraphQLObjectTypeDefinition { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLObjectTypeDefinitionWithComment : GraphQLObjectTypeDefinition { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLObjectTypeDefinitionFull : GraphQLObjectTypeDefinition { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/Definitions/GraphQLOperationDefinition.cs b/src/GraphQLParser/AST/Definitions/GraphQLOperationDefinition.cs index 2a55d493..8d5ab32f 100644 --- a/src/GraphQLParser/AST/Definitions/GraphQLOperationDefinition.cs +++ b/src/GraphQLParser/AST/Definitions/GraphQLOperationDefinition.cs @@ -46,40 +46,17 @@ public GraphQLOperationDefinition(GraphQLSelectionSet selectionSet) internal sealed class GraphQLOperationDefinitionWithLocation : GraphQLOperationDefinition { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLOperationDefinitionWithComment : GraphQLOperationDefinition { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLOperationDefinitionFull : GraphQLOperationDefinition { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/Definitions/GraphQLRootOperationTypeDefinition.cs b/src/GraphQLParser/AST/Definitions/GraphQLRootOperationTypeDefinition.cs index 0569431b..ac85ea68 100644 --- a/src/GraphQLParser/AST/Definitions/GraphQLRootOperationTypeDefinition.cs +++ b/src/GraphQLParser/AST/Definitions/GraphQLRootOperationTypeDefinition.cs @@ -21,40 +21,17 @@ public class GraphQLRootOperationTypeDefinition : ASTNode internal sealed class GraphQLRootOperationTypeDefinitionWithLocation : GraphQLRootOperationTypeDefinition { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLRootOperationTypeDefinitionWithComment : GraphQLRootOperationTypeDefinition { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLRootOperationTypeDefinitionFull : GraphQLRootOperationTypeDefinition { - private GraphQLLocation _location; - private List? _comments; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/Definitions/GraphQLScalarTypeDefinition.cs b/src/GraphQLParser/AST/Definitions/GraphQLScalarTypeDefinition.cs index 938fb3f7..db37b657 100644 --- a/src/GraphQLParser/AST/Definitions/GraphQLScalarTypeDefinition.cs +++ b/src/GraphQLParser/AST/Definitions/GraphQLScalarTypeDefinition.cs @@ -29,40 +29,17 @@ public GraphQLScalarTypeDefinition(GraphQLName name) internal sealed class GraphQLScalarTypeDefinitionWithLocation : GraphQLScalarTypeDefinition { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLScalarTypeDefinitionWithComment : GraphQLScalarTypeDefinition { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLScalarTypeDefinitionFull : GraphQLScalarTypeDefinition { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/Definitions/GraphQLSchemaDefinition.cs b/src/GraphQLParser/AST/Definitions/GraphQLSchemaDefinition.cs index 02062517..262410b7 100644 --- a/src/GraphQLParser/AST/Definitions/GraphQLSchemaDefinition.cs +++ b/src/GraphQLParser/AST/Definitions/GraphQLSchemaDefinition.cs @@ -36,40 +36,17 @@ public GraphQLSchemaDefinition(List operatio internal sealed class GraphQLSchemaDefinitionWithLocation : GraphQLSchemaDefinition { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLSchemaDefinitionWithComment : GraphQLSchemaDefinition { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLSchemaDefinitionFull : GraphQLSchemaDefinition { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/Definitions/GraphQLUnionTypeDefinition.cs b/src/GraphQLParser/AST/Definitions/GraphQLUnionTypeDefinition.cs index 6426d6b3..f1abf1d8 100644 --- a/src/GraphQLParser/AST/Definitions/GraphQLUnionTypeDefinition.cs +++ b/src/GraphQLParser/AST/Definitions/GraphQLUnionTypeDefinition.cs @@ -34,40 +34,17 @@ public GraphQLUnionTypeDefinition(GraphQLName name) internal sealed class GraphQLUnionTypeDefinitionWithLocation : GraphQLUnionTypeDefinition { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLUnionTypeDefinitionWithComment : GraphQLUnionTypeDefinition { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLUnionTypeDefinitionFull : GraphQLUnionTypeDefinition { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/Definitions/GraphQLVariableDefinition.cs b/src/GraphQLParser/AST/Definitions/GraphQLVariableDefinition.cs index d1ace0aa..a1122ec0 100644 --- a/src/GraphQLParser/AST/Definitions/GraphQLVariableDefinition.cs +++ b/src/GraphQLParser/AST/Definitions/GraphQLVariableDefinition.cs @@ -45,39 +45,16 @@ public GraphQLVariableDefinition(GraphQLVariable variable, GraphQLType type) internal sealed class GraphQLVariableDefinitionWithLocation : GraphQLVariableDefinition { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLVariableDefinitionWithComment : GraphQLVariableDefinition { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLVariableDefinitionFull : GraphQLVariableDefinition { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/Definitions/GraphQLVariablesDefinition.cs b/src/GraphQLParser/AST/Definitions/GraphQLVariablesDefinition.cs index 20b7410e..98ae56d9 100644 --- a/src/GraphQLParser/AST/Definitions/GraphQLVariablesDefinition.cs +++ b/src/GraphQLParser/AST/Definitions/GraphQLVariablesDefinition.cs @@ -23,40 +23,17 @@ public GraphQLVariablesDefinition(List items) internal sealed class GraphQLVariablesDefinitionWithLocation : GraphQLVariablesDefinition { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLVariablesDefinitionWithComment : GraphQLVariablesDefinition { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLVariablesDefinitionFull : GraphQLVariablesDefinition { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/Extensions/GraphQLEnumTypeExtension.cs b/src/GraphQLParser/AST/Extensions/GraphQLEnumTypeExtension.cs index 304a1791..7a98bfe4 100644 --- a/src/GraphQLParser/AST/Extensions/GraphQLEnumTypeExtension.cs +++ b/src/GraphQLParser/AST/Extensions/GraphQLEnumTypeExtension.cs @@ -31,40 +31,17 @@ public GraphQLEnumTypeExtension(GraphQLName name) internal sealed class GraphQLEnumTypeExtensionWithLocation : GraphQLEnumTypeExtension { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLEnumTypeExtensionWithComment : GraphQLEnumTypeExtension { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLEnumTypeExtensionFull : GraphQLEnumTypeExtension { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/Extensions/GraphQLInputObjectTypeExtension.cs b/src/GraphQLParser/AST/Extensions/GraphQLInputObjectTypeExtension.cs index 6a27ee9a..53a1b294 100644 --- a/src/GraphQLParser/AST/Extensions/GraphQLInputObjectTypeExtension.cs +++ b/src/GraphQLParser/AST/Extensions/GraphQLInputObjectTypeExtension.cs @@ -31,40 +31,17 @@ public GraphQLInputObjectTypeExtension(GraphQLName name) internal sealed class GraphQLInputObjectTypeExtensionWithLocation : GraphQLInputObjectTypeExtension { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLInputObjectTypeExtensionWithComment : GraphQLInputObjectTypeExtension { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLInputObjectTypeExtensionFull : GraphQLInputObjectTypeExtension { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/Extensions/GraphQLInterfaceTypeExtension.cs b/src/GraphQLParser/AST/Extensions/GraphQLInterfaceTypeExtension.cs index 9da4bf87..a548e279 100644 --- a/src/GraphQLParser/AST/Extensions/GraphQLInterfaceTypeExtension.cs +++ b/src/GraphQLParser/AST/Extensions/GraphQLInterfaceTypeExtension.cs @@ -32,40 +32,17 @@ public GraphQLInterfaceTypeExtension(GraphQLName name) internal sealed class GraphQLInterfaceTypeExtensionWithLocation : GraphQLInterfaceTypeExtension { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLInterfaceTypeExtensionWithComment : GraphQLInterfaceTypeExtension { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLInterfaceTypeExtensionFull : GraphQLInterfaceTypeExtension { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/Extensions/GraphQLObjectTypeExtension.cs b/src/GraphQLParser/AST/Extensions/GraphQLObjectTypeExtension.cs index 42a6dd53..59057489 100644 --- a/src/GraphQLParser/AST/Extensions/GraphQLObjectTypeExtension.cs +++ b/src/GraphQLParser/AST/Extensions/GraphQLObjectTypeExtension.cs @@ -32,40 +32,17 @@ public GraphQLObjectTypeExtension(GraphQLName name) internal sealed class GraphQLObjectTypeExtensionWithLocation : GraphQLObjectTypeExtension { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLObjectTypeExtensionWithComment : GraphQLObjectTypeExtension { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLObjectTypeExtensionFull : GraphQLObjectTypeExtension { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/Extensions/GraphQLScalarTypeExtension.cs b/src/GraphQLParser/AST/Extensions/GraphQLScalarTypeExtension.cs index 837c124a..3759810f 100644 --- a/src/GraphQLParser/AST/Extensions/GraphQLScalarTypeExtension.cs +++ b/src/GraphQLParser/AST/Extensions/GraphQLScalarTypeExtension.cs @@ -26,40 +26,17 @@ public GraphQLScalarTypeExtension(GraphQLName name) internal sealed class GraphQLScalarTypeExtensionWithLocation : GraphQLScalarTypeExtension { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLScalarTypeExtensionWithComment : GraphQLScalarTypeExtension { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLScalarTypeExtensionFull : GraphQLScalarTypeExtension { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/Extensions/GraphQLSchemaExtension.cs b/src/GraphQLParser/AST/Extensions/GraphQLSchemaExtension.cs index 61c74e34..91daf903 100644 --- a/src/GraphQLParser/AST/Extensions/GraphQLSchemaExtension.cs +++ b/src/GraphQLParser/AST/Extensions/GraphQLSchemaExtension.cs @@ -19,40 +19,17 @@ public class GraphQLSchemaExtension : ASTNode, IHasDirectivesNode internal sealed class GraphQLSchemaExtensionWithLocation : GraphQLSchemaExtension { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLSchemaExtensionWithComment : GraphQLSchemaExtension { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLSchemaExtensionFull : GraphQLSchemaExtension { - private GraphQLLocation _location; - private List? _comments; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/Extensions/GraphQLUnionTypeExtension.cs b/src/GraphQLParser/AST/Extensions/GraphQLUnionTypeExtension.cs index f5518a4c..05b4ea6d 100644 --- a/src/GraphQLParser/AST/Extensions/GraphQLUnionTypeExtension.cs +++ b/src/GraphQLParser/AST/Extensions/GraphQLUnionTypeExtension.cs @@ -31,40 +31,17 @@ public GraphQLUnionTypeExtension(GraphQLName name) internal sealed class GraphQLUnionTypeExtensionWithLocation : GraphQLUnionTypeExtension { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLUnionTypeExtensionWithComment : GraphQLUnionTypeExtension { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLUnionTypeExtensionFull : GraphQLUnionTypeExtension { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/GraphQLAlias.cs b/src/GraphQLParser/AST/GraphQLAlias.cs index ec4c4af8..d2fb2f2c 100644 --- a/src/GraphQLParser/AST/GraphQLAlias.cs +++ b/src/GraphQLParser/AST/GraphQLAlias.cs @@ -27,40 +27,17 @@ public GraphQLAlias(GraphQLName name) internal sealed class GraphQLAliasWithLocation : GraphQLAlias { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLAliasWithComment : GraphQLAlias { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLAliasFull : GraphQLAlias { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/GraphQLArgument.cs b/src/GraphQLParser/AST/GraphQLArgument.cs index 74b1130e..80af8742 100644 --- a/src/GraphQLParser/AST/GraphQLArgument.cs +++ b/src/GraphQLParser/AST/GraphQLArgument.cs @@ -34,40 +34,17 @@ public GraphQLArgument(GraphQLName name, GraphQLValue value) internal sealed class GraphQLArgumentWithLocation : GraphQLArgument { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLArgumentWithComment : GraphQLArgument { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLArgumentFull : GraphQLArgument { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/GraphQLArguments.cs b/src/GraphQLParser/AST/GraphQLArguments.cs index 3652a531..f1eaaf69 100644 --- a/src/GraphQLParser/AST/GraphQLArguments.cs +++ b/src/GraphQLParser/AST/GraphQLArguments.cs @@ -41,40 +41,17 @@ public GraphQLArguments(List items) internal sealed class GraphQLArgumentsWithLocation : GraphQLArguments { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLArgumentsWithComment : GraphQLArguments { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLArgumentsFull : GraphQLArguments { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/GraphQLComment.cs b/src/GraphQLParser/AST/GraphQLComment.cs index a760b385..b53469d8 100644 --- a/src/GraphQLParser/AST/GraphQLComment.cs +++ b/src/GraphQLParser/AST/GraphQLComment.cs @@ -25,15 +25,9 @@ public GraphQLComment(ROM value) public ROM Value { get; internal set; } } -internal class GraphQLCommentWithLocation : GraphQLComment +internal sealed class GraphQLCommentWithLocation : GraphQLComment { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } /// public GraphQLCommentWithLocation(ROM value) diff --git a/src/GraphQLParser/AST/GraphQLDescription.cs b/src/GraphQLParser/AST/GraphQLDescription.cs index ac406eef..634c2074 100644 --- a/src/GraphQLParser/AST/GraphQLDescription.cs +++ b/src/GraphQLParser/AST/GraphQLDescription.cs @@ -27,13 +27,7 @@ public GraphQLDescription(ROM value) internal sealed class GraphQLDescriptionWithLocation : GraphQLDescription { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } /// public GraphQLDescriptionWithLocation(ROM value) diff --git a/src/GraphQLParser/AST/GraphQLDirective.cs b/src/GraphQLParser/AST/GraphQLDirective.cs index 24ea1b40..abc66841 100644 --- a/src/GraphQLParser/AST/GraphQLDirective.cs +++ b/src/GraphQLParser/AST/GraphQLDirective.cs @@ -35,40 +35,17 @@ public GraphQLDirective(GraphQLName name) internal sealed class GraphQLDirectiveWithLocation : GraphQLDirective { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLDirectiveWithComment : GraphQLDirective { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLDirectiveFull : GraphQLDirective { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/GraphQLDirectiveLocations.cs b/src/GraphQLParser/AST/GraphQLDirectiveLocations.cs index 3991a890..ca797425 100644 --- a/src/GraphQLParser/AST/GraphQLDirectiveLocations.cs +++ b/src/GraphQLParser/AST/GraphQLDirectiveLocations.cs @@ -29,40 +29,17 @@ public GraphQLDirectiveLocations(List items) internal sealed class GraphQLDirectiveLocationsWithLocation : GraphQLDirectiveLocations { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLDirectiveLocationsWithComment : GraphQLDirectiveLocations { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLDirectiveLocationsFull : GraphQLDirectiveLocations { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/GraphQLDirectives.cs b/src/GraphQLParser/AST/GraphQLDirectives.cs index bdfb4473..cb6e4e9b 100644 --- a/src/GraphQLParser/AST/GraphQLDirectives.cs +++ b/src/GraphQLParser/AST/GraphQLDirectives.cs @@ -23,11 +23,5 @@ public GraphQLDirectives(List items) internal sealed class GraphQLDirectivesWithLocation : GraphQLDirectives { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } diff --git a/src/GraphQLParser/AST/GraphQLDocument.cs b/src/GraphQLParser/AST/GraphQLDocument.cs index bc469ba2..322a47d0 100644 --- a/src/GraphQLParser/AST/GraphQLDocument.cs +++ b/src/GraphQLParser/AST/GraphQLDocument.cs @@ -39,11 +39,5 @@ public GraphQLDocument(List definitions) internal sealed class GraphQLDocumentWithLocation : GraphQLDocument { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } diff --git a/src/GraphQLParser/AST/GraphQLField.cs b/src/GraphQLParser/AST/GraphQLField.cs index a4085e44..a97609ad 100644 --- a/src/GraphQLParser/AST/GraphQLField.cs +++ b/src/GraphQLParser/AST/GraphQLField.cs @@ -43,40 +43,17 @@ public GraphQLField(GraphQLName name) internal sealed class GraphQLFieldWithLocation : GraphQLField { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLFieldWithComment : GraphQLField { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLFieldFull : GraphQLField { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/GraphQLFragmentName.cs b/src/GraphQLParser/AST/GraphQLFragmentName.cs index 77253ecd..666f29f7 100644 --- a/src/GraphQLParser/AST/GraphQLFragmentName.cs +++ b/src/GraphQLParser/AST/GraphQLFragmentName.cs @@ -27,40 +27,17 @@ public GraphQLFragmentName(GraphQLName name) internal sealed class GraphQLFragmentNameWithLocation : GraphQLFragmentName { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLFragmentNameWithComment : GraphQLFragmentName { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLFragmentNameFull : GraphQLFragmentName { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/GraphQLFragmentSpread.cs b/src/GraphQLParser/AST/GraphQLFragmentSpread.cs index be62094d..efa3fad3 100644 --- a/src/GraphQLParser/AST/GraphQLFragmentSpread.cs +++ b/src/GraphQLParser/AST/GraphQLFragmentSpread.cs @@ -32,40 +32,17 @@ public GraphQLFragmentSpread(GraphQLFragmentName name) internal sealed class GraphQLFragmentSpreadWithLocation : GraphQLFragmentSpread { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLFragmentSpreadWithComment : GraphQLFragmentSpread { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLFragmentSpreadFull : GraphQLFragmentSpread { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/GraphQLImplementsInterfaces.cs b/src/GraphQLParser/AST/GraphQLImplementsInterfaces.cs index ad1f9a74..3046cda5 100644 --- a/src/GraphQLParser/AST/GraphQLImplementsInterfaces.cs +++ b/src/GraphQLParser/AST/GraphQLImplementsInterfaces.cs @@ -23,40 +23,17 @@ public GraphQLImplementsInterfaces(List items) internal sealed class GraphQLImplementsInterfacesWithLocation : GraphQLImplementsInterfaces { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLImplementsInterfacesWithComment : GraphQLImplementsInterfaces { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLImplementsInterfacesFull : GraphQLImplementsInterfaces { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/GraphQLInlineFragment.cs b/src/GraphQLParser/AST/GraphQLInlineFragment.cs index 667ca735..c76aa0f7 100644 --- a/src/GraphQLParser/AST/GraphQLInlineFragment.cs +++ b/src/GraphQLParser/AST/GraphQLInlineFragment.cs @@ -38,40 +38,17 @@ public GraphQLInlineFragment(GraphQLSelectionSet selectionSet) internal sealed class GraphQLInlineFragmentWithLocation : GraphQLInlineFragment { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLInlineFragmentWithComment : GraphQLInlineFragment { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLInlineFragmentFull : GraphQLInlineFragment { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/GraphQLName.cs b/src/GraphQLParser/AST/GraphQLName.cs index 54c5e69c..3ebe512a 100644 --- a/src/GraphQLParser/AST/GraphQLName.cs +++ b/src/GraphQLParser/AST/GraphQLName.cs @@ -121,13 +121,7 @@ private static bool Equals(GraphQLName? name1, string? name2) internal sealed class GraphQLNameWithLocation : GraphQLName { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } /// public GraphQLNameWithLocation(ROM value) @@ -138,13 +132,7 @@ public GraphQLNameWithLocation(ROM value) internal sealed class GraphQLNameWithComment : GraphQLName { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } /// public GraphQLNameWithComment(ROM value) @@ -155,20 +143,9 @@ public GraphQLNameWithComment(ROM value) internal sealed class GraphQLNameFull : GraphQLName { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } /// public GraphQLNameFull(ROM value) diff --git a/src/GraphQLParser/AST/GraphQLObjectField.cs b/src/GraphQLParser/AST/GraphQLObjectField.cs index 9750342e..21a5c54b 100644 --- a/src/GraphQLParser/AST/GraphQLObjectField.cs +++ b/src/GraphQLParser/AST/GraphQLObjectField.cs @@ -34,40 +34,17 @@ public GraphQLObjectField(GraphQLName name, GraphQLValue value) internal sealed class GraphQLObjectFieldWithLocation : GraphQLObjectField { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLObjectFieldWithComment : GraphQLObjectField { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLObjectFieldFull : GraphQLObjectField { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/GraphQLSelectionSet.cs b/src/GraphQLParser/AST/GraphQLSelectionSet.cs index 61c38b8c..f43e925f 100644 --- a/src/GraphQLParser/AST/GraphQLSelectionSet.cs +++ b/src/GraphQLParser/AST/GraphQLSelectionSet.cs @@ -36,40 +36,17 @@ public GraphQLSelectionSet(List selections) internal sealed class GraphQLSelectionSetWithLocation : GraphQLSelectionSet { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLSelectionSetWithComment : GraphQLSelectionSet { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLSelectionSetFull : GraphQLSelectionSet { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/GraphQLTypeCondition.cs b/src/GraphQLParser/AST/GraphQLTypeCondition.cs index 764e5888..6dfcac57 100644 --- a/src/GraphQLParser/AST/GraphQLTypeCondition.cs +++ b/src/GraphQLParser/AST/GraphQLTypeCondition.cs @@ -29,40 +29,17 @@ public GraphQLTypeCondition(GraphQLNamedType type) internal sealed class GraphQLTypeConditionWithLocation : GraphQLTypeCondition { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLTypeConditionWithComment : GraphQLTypeCondition { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLTypeConditionFull : GraphQLTypeCondition { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/GraphQLUnionMemberTypes.cs b/src/GraphQLParser/AST/GraphQLUnionMemberTypes.cs index 2c8a9c04..63896f73 100644 --- a/src/GraphQLParser/AST/GraphQLUnionMemberTypes.cs +++ b/src/GraphQLParser/AST/GraphQLUnionMemberTypes.cs @@ -23,40 +23,17 @@ public GraphQLUnionMemberTypes(List items) internal sealed class GraphQLUnionMemberTypesWithLocation : GraphQLUnionMemberTypes { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLUnionMemberTypesWithComment : GraphQLUnionMemberTypes { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLUnionMemberTypesFull : GraphQLUnionMemberTypes { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/Types/GraphQLListType.cs b/src/GraphQLParser/AST/Types/GraphQLListType.cs index c4aa3899..4bc382b8 100644 --- a/src/GraphQLParser/AST/Types/GraphQLListType.cs +++ b/src/GraphQLParser/AST/Types/GraphQLListType.cs @@ -32,40 +32,17 @@ public GraphQLListType(GraphQLType type) internal sealed class GraphQLListTypeWithLocation : GraphQLListType { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLListTypeWithComment : GraphQLListType { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLListTypeFull : GraphQLListType { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/Types/GraphQLNamedType.cs b/src/GraphQLParser/AST/Types/GraphQLNamedType.cs index 35d3f165..9268b85b 100644 --- a/src/GraphQLParser/AST/Types/GraphQLNamedType.cs +++ b/src/GraphQLParser/AST/Types/GraphQLNamedType.cs @@ -30,40 +30,17 @@ public GraphQLNamedType(GraphQLName name) internal sealed class GraphQLNamedTypeWithLocation : GraphQLNamedType { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLNamedTypeWithComment : GraphQLNamedType { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLNamedTypeFull : GraphQLNamedType { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/Types/GraphQLNonNullType.cs b/src/GraphQLParser/AST/Types/GraphQLNonNullType.cs index 095adac8..ccf352ff 100644 --- a/src/GraphQLParser/AST/Types/GraphQLNonNullType.cs +++ b/src/GraphQLParser/AST/Types/GraphQLNonNullType.cs @@ -32,40 +32,17 @@ public GraphQLNonNullType(GraphQLType type) internal sealed class GraphQLNonNullTypeWithLocation : GraphQLNonNullType { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLNonNullTypeWithComment : GraphQLNonNullType { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLNonNullTypeFull : GraphQLNonNullType { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/Values/GraphQLBooleanValue.cs b/src/GraphQLParser/AST/Values/GraphQLBooleanValue.cs index 1516814e..3e6dad56 100644 --- a/src/GraphQLParser/AST/Values/GraphQLBooleanValue.cs +++ b/src/GraphQLParser/AST/Values/GraphQLBooleanValue.cs @@ -42,80 +42,34 @@ public class GraphQLFalseBooleanValue : GraphQLBooleanValue internal sealed class GraphQLTrueBooleanValueWithLocation : GraphQLTrueBooleanValue { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLTrueBooleanValueWithComment : GraphQLTrueBooleanValue { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLTrueBooleanValueFull : GraphQLTrueBooleanValue { - private GraphQLLocation _location; - private List? _comments; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLFalseBooleanValueWithLocation : GraphQLFalseBooleanValue { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLFalseBooleanValueWithComment : GraphQLFalseBooleanValue { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLFalseBooleanValueFull : GraphQLFalseBooleanValue { - private GraphQLLocation _location; - private List? _comments; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/Values/GraphQLEnumValue.cs b/src/GraphQLParser/AST/Values/GraphQLEnumValue.cs index 236c7b8b..2b45343c 100644 --- a/src/GraphQLParser/AST/Values/GraphQLEnumValue.cs +++ b/src/GraphQLParser/AST/Values/GraphQLEnumValue.cs @@ -30,40 +30,17 @@ public GraphQLEnumValue(GraphQLName name) internal sealed class GraphQLEnumValueWithLocation : GraphQLEnumValue { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLEnumValueWithComment : GraphQLEnumValue { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLEnumValueFull : GraphQLEnumValue { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/Values/GraphQLFloatValue.cs b/src/GraphQLParser/AST/Values/GraphQLFloatValue.cs index 13499c1c..5f05dd63 100644 --- a/src/GraphQLParser/AST/Values/GraphQLFloatValue.cs +++ b/src/GraphQLParser/AST/Values/GraphQLFloatValue.cs @@ -68,13 +68,7 @@ public GraphQLFloatValue(decimal value) internal sealed class GraphQLFloatValueWithLocation : GraphQLFloatValue { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } /// public GraphQLFloatValueWithLocation(ROM value) @@ -85,13 +79,7 @@ public GraphQLFloatValueWithLocation(ROM value) internal sealed class GraphQLFloatValueWithComment : GraphQLFloatValue { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } /// public GraphQLFloatValueWithComment(ROM value) @@ -102,20 +90,9 @@ public GraphQLFloatValueWithComment(ROM value) internal sealed class GraphQLFloatValueFull : GraphQLFloatValue { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } /// public GraphQLFloatValueFull(ROM value) diff --git a/src/GraphQLParser/AST/Values/GraphQLIntValue.cs b/src/GraphQLParser/AST/Values/GraphQLIntValue.cs index d496a7e2..143d1557 100644 --- a/src/GraphQLParser/AST/Values/GraphQLIntValue.cs +++ b/src/GraphQLParser/AST/Values/GraphQLIntValue.cs @@ -61,13 +61,7 @@ public GraphQLIntValue(BigInteger value) internal sealed class GraphQLIntValueWithLocation : GraphQLIntValue { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } /// public GraphQLIntValueWithLocation(ROM value) @@ -78,13 +72,7 @@ public GraphQLIntValueWithLocation(ROM value) internal sealed class GraphQLIntValueWithComment : GraphQLIntValue { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } /// public GraphQLIntValueWithComment(ROM value) @@ -95,20 +83,9 @@ public GraphQLIntValueWithComment(ROM value) internal sealed class GraphQLIntValueFull : GraphQLIntValue { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } /// public GraphQLIntValueFull(ROM value) diff --git a/src/GraphQLParser/AST/Values/GraphQLListValue.cs b/src/GraphQLParser/AST/Values/GraphQLListValue.cs index 4c6dc342..dcf8527e 100644 --- a/src/GraphQLParser/AST/Values/GraphQLListValue.cs +++ b/src/GraphQLParser/AST/Values/GraphQLListValue.cs @@ -19,40 +19,17 @@ public class GraphQLListValue : GraphQLValue internal sealed class GraphQLListValueWithLocation : GraphQLListValue { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLListValueWithComment : GraphQLListValue { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLListValueFull : GraphQLListValue { - private GraphQLLocation _location; - private List? _comments; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/Values/GraphQLNullValue.cs b/src/GraphQLParser/AST/Values/GraphQLNullValue.cs index 6568af32..0f09fbdf 100644 --- a/src/GraphQLParser/AST/Values/GraphQLNullValue.cs +++ b/src/GraphQLParser/AST/Values/GraphQLNullValue.cs @@ -19,40 +19,17 @@ public class GraphQLNullValue : GraphQLValue, IHasValueNode internal sealed class GraphQLNullValueWithLocation : GraphQLNullValue { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLNullValueWithComment : GraphQLNullValue { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLNullValueFull : GraphQLNullValue { - private GraphQLLocation _location; - private List? _comments; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/Values/GraphQLObjectValue.cs b/src/GraphQLParser/AST/Values/GraphQLObjectValue.cs index d8f554c0..3e84a419 100644 --- a/src/GraphQLParser/AST/Values/GraphQLObjectValue.cs +++ b/src/GraphQLParser/AST/Values/GraphQLObjectValue.cs @@ -35,40 +35,17 @@ public class GraphQLObjectValue : GraphQLValue internal sealed class GraphQLObjectValueWithLocation : GraphQLObjectValue { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLObjectValueWithComment : GraphQLObjectValue { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLObjectValueFull : GraphQLObjectValue { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/AST/Values/GraphQLStringValue.cs b/src/GraphQLParser/AST/Values/GraphQLStringValue.cs index 3ac6e2b1..0a72dd5e 100644 --- a/src/GraphQLParser/AST/Values/GraphQLStringValue.cs +++ b/src/GraphQLParser/AST/Values/GraphQLStringValue.cs @@ -35,13 +35,7 @@ public GraphQLStringValue(string value) internal sealed class GraphQLStringValueWithLocation : GraphQLStringValue { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } /// public GraphQLStringValueWithLocation(ROM value) @@ -52,13 +46,7 @@ public GraphQLStringValueWithLocation(ROM value) internal sealed class GraphQLStringValueWithComment : GraphQLStringValue { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } /// public GraphQLStringValueWithComment(ROM value) @@ -69,20 +57,9 @@ public GraphQLStringValueWithComment(ROM value) internal sealed class GraphQLStringValueFull : GraphQLStringValue { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } /// public GraphQLStringValueFull(ROM value) diff --git a/src/GraphQLParser/AST/Values/GraphQLVariable.cs b/src/GraphQLParser/AST/Values/GraphQLVariable.cs index 59d4a52b..3c376217 100644 --- a/src/GraphQLParser/AST/Values/GraphQLVariable.cs +++ b/src/GraphQLParser/AST/Values/GraphQLVariable.cs @@ -30,40 +30,17 @@ public GraphQLVariable(GraphQLName name) internal sealed class GraphQLVariableWithLocation : GraphQLVariable { - private GraphQLLocation _location; - - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } + public override GraphQLLocation Location { get; set; } } internal sealed class GraphQLVariableWithComment : GraphQLVariable { - private List? _comments; - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } internal sealed class GraphQLVariableFull : GraphQLVariable { - private GraphQLLocation _location; - private List? _comments; + public override GraphQLLocation Location { get; set; } - public override GraphQLLocation Location - { - get => _location; - set => _location = value; - } - - public override List? Comments - { - get => _comments; - set => _comments = value; - } + public override List? Comments { get; set; } } diff --git a/src/GraphQLParser/Exceptions/GraphQLParserException.cs b/src/GraphQLParser/Exceptions/GraphQLParserException.cs index 720b6c29..2e523106 100644 --- a/src/GraphQLParser/Exceptions/GraphQLParserException.cs +++ b/src/GraphQLParser/Exceptions/GraphQLParserException.cs @@ -8,6 +8,10 @@ namespace GraphQLParser.Exceptions; /// public class GraphQLParserException : Exception { +#if NETSTANDARD2_0 + private static readonly char[] _newlineSeparator = ['\n']; +#endif + /// /// Error description. /// @@ -49,7 +53,11 @@ private static string HighlightSourceAtLocation(ReadOnlySpan source, Locat int padLen = nextLineNum.Length; string[] lines = source .ToString() - .Split(new string[] { "\n" }, StringSplitOptions.None) +#if NETSTANDARD2_0 + .Split(_newlineSeparator, StringSplitOptions.None) +#else + .Split('\n', StringSplitOptions.None) +#endif .Select(e => ReplaceWithUnicodeRepresentation(e)) .ToArray(); diff --git a/src/GraphQLParser/ParserContext.Parse.cs b/src/GraphQLParser/ParserContext.Parse.cs index 3282ce84..d5bb71f3 100644 --- a/src/GraphQLParser/ParserContext.Parse.cs +++ b/src/GraphQLParser/ParserContext.Parse.cs @@ -819,7 +819,7 @@ private GraphQLInterfaceTypeExtension ParseInterfaceTypeExtension(int start, Lis } // http://spec.graphql.org/October2021/#ListValue - private GraphQLValue ParseListValue(bool isConstant) + private GraphQLListValue ParseListValue(bool isConstant) { IncreaseDepth(); @@ -939,7 +939,7 @@ private GraphQLValue ParseNameValue() } // http://spec.graphql.org/October2021/#ObjectValue - private GraphQLValue ParseObjectValue(bool isConstant) + private GraphQLObjectValue ParseObjectValue(bool isConstant) { IncreaseDepth(); @@ -960,7 +960,7 @@ private GraphQLValue ParseObjectValue(bool isConstant) } // http://spec.graphql.org/October2021/#NullValue - private GraphQLValue ParseNullValue() + private GraphQLNullValue ParseNullValue() { IncreaseDepth(); diff --git a/src/GraphQLParser/ParserContext.cs b/src/GraphQLParser/ParserContext.cs index 55da33d6..db8d4a3c 100644 --- a/src/GraphQLParser/ParserContext.cs +++ b/src/GraphQLParser/ParserContext.cs @@ -9,7 +9,7 @@ namespace GraphQLParser; internal ref partial struct ParserContext { - private static string[] TopLevelKeywordOneOf { get; set; } = + private static string[] TopLevelKeywordOneOf { get; } = [ "query", "mutation", @@ -26,7 +26,7 @@ internal ref partial struct ParserContext "directive", ]; - private static string[] TypeExtensionOneOf { get; set; } = + private static string[] TypeExtensionOneOf { get; } = [ "schema", "scalar", @@ -37,14 +37,14 @@ internal ref partial struct ParserContext "input", ]; - private static string[] OperationTypeOneOf { get; set; } = + private static string[] OperationTypeOneOf { get; } = [ "query", "mutation", "subscription", ]; - private static string[] DirectiveLocationOneOf { get; set; } = + private static string[] DirectiveLocationOneOf { get; } = [ // http://spec.graphql.org/October2021/#ExecutableDirectiveLocation "QUERY", diff --git a/src/GraphQLParser/Visitors/ASTVisitor.cs b/src/GraphQLParser/Visitors/ASTVisitor.cs index 2b6103f8..b2c774a4 100644 --- a/src/GraphQLParser/Visitors/ASTVisitor.cs +++ b/src/GraphQLParser/Visitors/ASTVisitor.cs @@ -76,9 +76,9 @@ protected virtual async ValueTask VisitOperationDefinitionAsync(GraphQLOperation /// /// Visits node. /// - protected virtual async ValueTask VisitNameAsync(GraphQLName name, TContext context) + protected virtual ValueTask VisitNameAsync(GraphQLName name, TContext context) { - await VisitAsync(name.Comments, context).ConfigureAwait(false); + return VisitAsync(name.Comments, context); } /// @@ -207,33 +207,33 @@ protected virtual async ValueTask VisitFragmentDefinitionAsync(GraphQLFragmentDe /// /// Visits node. /// - protected virtual async ValueTask VisitIntValueAsync(GraphQLIntValue intValue, TContext context) + protected virtual ValueTask VisitIntValueAsync(GraphQLIntValue intValue, TContext context) { - await VisitAsync(intValue.Comments, context).ConfigureAwait(false); + return VisitAsync(intValue.Comments, context); } /// /// Visits node. /// - protected virtual async ValueTask VisitFloatValueAsync(GraphQLFloatValue floatValue, TContext context) + protected virtual ValueTask VisitFloatValueAsync(GraphQLFloatValue floatValue, TContext context) { - await VisitAsync(floatValue.Comments, context).ConfigureAwait(false); + return VisitAsync(floatValue.Comments, context); } /// /// Visits node. /// - protected virtual async ValueTask VisitStringValueAsync(GraphQLStringValue stringValue, TContext context) + protected virtual ValueTask VisitStringValueAsync(GraphQLStringValue stringValue, TContext context) { - await VisitAsync(stringValue.Comments, context).ConfigureAwait(false); + return VisitAsync(stringValue.Comments, context); } /// /// Visits node. /// - protected virtual async ValueTask VisitBooleanValueAsync(GraphQLBooleanValue booleanValue, TContext context) + protected virtual ValueTask VisitBooleanValueAsync(GraphQLBooleanValue booleanValue, TContext context) { - await VisitAsync(booleanValue.Comments, context).ConfigureAwait(false); + return VisitAsync(booleanValue.Comments, context); } /// @@ -322,9 +322,9 @@ protected virtual async ValueTask VisitNonNullTypeAsync(GraphQLNonNullType nonNu /// /// Visits node. /// - protected virtual async ValueTask VisitNullValueAsync(GraphQLNullValue nullValue, TContext context) + protected virtual ValueTask VisitNullValueAsync(GraphQLNullValue nullValue, TContext context) { - await VisitAsync(nullValue.Comments, context).ConfigureAwait(false); + return VisitAsync(nullValue.Comments, context); } /// @@ -508,9 +508,9 @@ protected virtual async ValueTask VisitDirectiveDefinitionAsync(GraphQLDirective /// /// Visits node. /// - protected virtual async ValueTask VisitDirectiveLocationsAsync(GraphQLDirectiveLocations directiveLocations, TContext context) + protected virtual ValueTask VisitDirectiveLocationsAsync(GraphQLDirectiveLocations directiveLocations, TContext context) { - await VisitAsync(directiveLocations.Comments, context).ConfigureAwait(false); + return VisitAsync(directiveLocations.Comments, context); } /// diff --git a/src/GraphQLParser/Visitors/SDLPrinter.cs b/src/GraphQLParser/Visitors/SDLPrinter.cs index 0b8b46c7..62749916 100644 --- a/src/GraphQLParser/Visitors/SDLPrinter.cs +++ b/src/GraphQLParser/Visitors/SDLPrinter.cs @@ -1217,7 +1217,7 @@ public class SDLPrinterOptions /// for indentation purposes. Any literal printed first after optional comment or description nodes in /// any VisitXXX method should be wrapped into for proper indentation. /// -internal class LiteralNode : ASTNode +internal sealed class LiteralNode : ASTNode { [ThreadStatic] internal static LiteralNode? _shared; diff --git a/src/GraphQLParser/Visitors/SDLSorter.cs b/src/GraphQLParser/Visitors/SDLSorter.cs index cd107fdb..fa8742b8 100644 --- a/src/GraphQLParser/Visitors/SDLSorter.cs +++ b/src/GraphQLParser/Visitors/SDLSorter.cs @@ -45,6 +45,7 @@ protected override ValueTask VisitDirectiveLocationsAsync(GraphQLDirectiveLocati /// otherwise uses LINQ to sort, which is a much faster algorithm when /// there are a greater quantity of items, at the cost of higher memory requirements. /// +#pragma warning disable CA1859 // Change type of parameter 'comparer' from 'System.Collections.Generic.IComparer' to 'GraphQLParser.Visitors.SDLSorterOptions' for improved performance private static void StableSort(List list, IComparer comparer) { var n = list.Count; @@ -63,11 +64,10 @@ private static void StableSort(List list, IComparer comparer) { if (comparer.Compare(list[j], list[j + 1]) > 0) { - var temp = list[j]; - list[j] = list[j + 1]; - list[j + 1] = temp; + (list[j], list[j + 1]) = (list[j + 1], list[j]); } } } } +#pragma warning restore CA1859 }