diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/DocumentationReference.cs b/ICSharpCode.Decompiler/CSharp/Syntax/DocumentationReference.cs index b9418a490..33fcdb731 100644 --- a/ICSharpCode.Decompiler/CSharp/Syntax/DocumentationReference.cs +++ b/ICSharpCode.Decompiler/CSharp/Syntax/DocumentationReference.cs @@ -35,9 +35,6 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax public partial class DocumentationReference : AstNode { - SymbolKind symbolKind; - OperatorType operatorType; - bool hasParameterList; /// /// Gets/Sets the entity type. @@ -47,33 +44,18 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax /// SymbolKind.TypeDefinition for references to primitive types, /// and SymbolKind.None for everything else. /// - public SymbolKind SymbolKind { - get { return symbolKind; } - set { - symbolKind = value; - } - } + public SymbolKind SymbolKind { get; set; } /// /// Gets/Sets the operator type. /// This property is only used when SymbolKind==Operator. /// - public OperatorType OperatorType { - get { return operatorType; } - set { - operatorType = value; - } - } + public OperatorType OperatorType { get; set; } /// /// Gets/Sets whether a parameter list was provided. /// - public bool HasParameterList { - get { return hasParameterList; } - set { - hasParameterList = value; - } - } + public bool HasParameterList { get; set; } /// /// Gets/Sets the declaring type. diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AnonymousMethodExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AnonymousMethodExpression.cs index c7a1928f1..ae9b53220 100644 --- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AnonymousMethodExpression.cs +++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AnonymousMethodExpression.cs @@ -38,12 +38,8 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax public const string DelegateKeyword = "delegate"; public const string AsyncModifier = LambdaExpression.AsyncModifier; - bool isAsync; - public bool IsAsync { - get { return isAsync; } - set { isAsync = value; } - } + public bool IsAsync { get; set; } // used to tell the difference between delegate {} and delegate () {} bool hasParameterList; diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AssignmentExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AssignmentExpression.cs index f4f95f517..1d064f190 100644 --- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AssignmentExpression.cs +++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AssignmentExpression.cs @@ -62,10 +62,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax [Slot("LeftRole")] public partial Expression Left { get; set; } - public AssignmentOperatorType Operator { - get; - set; - } + public AssignmentOperatorType Operator { get; set; } [Slot("RightRole")] public partial Expression Right { get; set; } diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/BinaryOperatorExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/BinaryOperatorExpression.cs index 0a0c52bf9..a5704abe6 100644 --- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/BinaryOperatorExpression.cs +++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/BinaryOperatorExpression.cs @@ -66,10 +66,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax [Slot("LeftRole")] public partial Expression? Left { get; set; } - public BinaryOperatorType Operator { - get; - set; - } + public BinaryOperatorType Operator { get; set; } [Slot("RightRole")] public partial Expression? Right { get; set; } diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/DirectionExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/DirectionExpression.cs index e70310848..46c0f1ba2 100644 --- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/DirectionExpression.cs +++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/DirectionExpression.cs @@ -44,10 +44,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax public const string OutKeyword = "out"; public const string InKeyword = "in"; - public FieldDirection FieldDirection { - get; - set; - } + public FieldDirection FieldDirection { get; set; } [Slot("Roles.Expression")] public partial Expression Expression { get; set; } diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/LambdaExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/LambdaExpression.cs index 6856dfeeb..529de2098 100644 --- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/LambdaExpression.cs +++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/LambdaExpression.cs @@ -34,15 +34,11 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax { public const string AsyncModifier = "async"; - bool isAsync; [Slot("AttributeRole")] public partial AstNodeCollection Attributes { get; } - public bool IsAsync { - get { return isAsync; } - set { isAsync = value; } - } + public bool IsAsync { get; set; } [Slot("Roles.Parameter")] public partial AstNodeCollection Parameters { get; } diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/PrimitiveExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/PrimitiveExpression.cs index a0ffd0c6f..7078914dc 100644 --- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/PrimitiveExpression.cs +++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/PrimitiveExpression.cs @@ -73,7 +73,6 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax } object value; - LiteralFormat format; public object Value { get { return this.value; } @@ -82,12 +81,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax } } - public LiteralFormat Format { - get { return format; } - set { - format = value; - } - } + public LiteralFormat Format { get; set; } public PrimitiveExpression(object value) { @@ -97,7 +91,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax public PrimitiveExpression(object value, LiteralFormat format) { this.Value = value; - this.format = format; + this.Format = format; } protected internal override bool DoMatch(AstNode other, PatternMatching.Match match) diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/QueryExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/QueryExpression.cs index 705cb47f6..429b0ca80 100644 --- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/QueryExpression.cs +++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/QueryExpression.cs @@ -167,10 +167,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax [Slot("Roles.Expression")] public partial Expression Expression { get; set; } - public QueryOrderingDirection Direction { - get; - set; - } + public QueryOrderingDirection Direction { get; set; } } public enum QueryOrderingDirection diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/UnaryOperatorExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/UnaryOperatorExpression.cs index c5c0c514b..98c026bf3 100644 --- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/UnaryOperatorExpression.cs +++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/UnaryOperatorExpression.cs @@ -56,10 +56,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax public const string SuppressNullableWarningToken = "!"; public const string IndexFromEndToken = "^"; public const string PatternNotKeyword = "not"; - public UnaryOperatorType Operator { - get; - set; - } + public UnaryOperatorType Operator { get; set; } [Slot("Roles.Expression")] public partial Expression Expression { get; set; } diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/Attribute.cs b/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/Attribute.cs index c1adf3650..74a13a554 100644 --- a/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/Attribute.cs +++ b/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/Attribute.cs @@ -42,10 +42,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax public partial AstNodeCollection Arguments { get; } // HasArgumentList == false: [Empty] - public bool HasArgumentList { - get; - set; - } + public bool HasArgumentList { get; set; } public override string ToString(CSharpFormattingOptions formattingOptions) { diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/Comment.cs b/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/Comment.cs index 66c13afb9..398c13fd8 100644 --- a/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/Comment.cs +++ b/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/Comment.cs @@ -57,19 +57,11 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax public partial class Comment : Trivia { - CommentType commentType; - public CommentType CommentType { - get { return commentType; } - set { commentType = value; } - } + public CommentType CommentType { get; set; } - string content; - public string Content { - get { return content; } - set { content = value; } - } + public string Content { get; set; } public Comment(string content, CommentType type = CommentType.SingleLine) { diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/PreProcessorDirective.cs b/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/PreProcessorDirective.cs index 77ccf8b70..b79c0adde 100644 --- a/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/PreProcessorDirective.cs +++ b/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/PreProcessorDirective.cs @@ -102,15 +102,9 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax public partial class PreProcessorDirective : Trivia { - public PreProcessorDirectiveType Type { - get; - set; - } + public PreProcessorDirectiveType Type { get; set; } - public string Argument { - get; - set; - } + public string Argument { get; set; } public PreProcessorDirective(PreProcessorDirectiveType type, TextLocation startLocation, TextLocation endLocation) : base(startLocation, endLocation) { diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/TypeDeclaration.cs b/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/TypeDeclaration.cs index de9ad3b97..665c5cfd8 100644 --- a/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/TypeDeclaration.cs +++ b/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/TypeDeclaration.cs @@ -55,14 +55,8 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax get { return SymbolKind.TypeDefinition; } } - ClassType classType; - public ClassType ClassType { - get { return classType; } - set { - classType = value; - } - } + public ClassType ClassType { get; set; } [Slot("AttributeRole")] public override partial AstNodeCollection Attributes { get; } diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/TypeParameterDeclaration.cs b/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/TypeParameterDeclaration.cs index 815d946ef..a5cd8c5a0 100644 --- a/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/TypeParameterDeclaration.cs +++ b/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/TypeParameterDeclaration.cs @@ -35,12 +35,8 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax [Slot("AttributeRole")] public partial AstNodeCollection Attributes { get; } - VarianceModifier variance; - public VarianceModifier Variance { - get { return variance; } - set { variance = value; } - } + public VarianceModifier Variance { get; set; } [NameSlot("Roles.Identifier")] public partial string Name { get; set; } diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/MemberType.cs b/ICSharpCode.Decompiler/CSharp/Syntax/MemberType.cs index 65acc3071..8df2aaf47 100644 --- a/ICSharpCode.Decompiler/CSharp/Syntax/MemberType.cs +++ b/ICSharpCode.Decompiler/CSharp/Syntax/MemberType.cs @@ -35,14 +35,8 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax public partial class MemberType : AstType { - bool isDoubleColon; - - public bool IsDoubleColon { - get { return isDoubleColon; } - set { - isDoubleColon = value; - } - } + + public bool IsDoubleColon { get; set; } [Slot("TargetRole")] public partial AstType Target { get; set; } diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/EmptyStatement.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/EmptyStatement.cs index ea00eb9a7..72f35376c 100644 --- a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/EmptyStatement.cs +++ b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/EmptyStatement.cs @@ -32,10 +32,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax [DecompilerAstNode(hasNullNode: false)] public partial class EmptyStatement : Statement { - public TextLocation Location { - get; - set; - } + public TextLocation Location { get; set; } public override TextLocation StartLocation { get { diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/ConstructorDeclaration.cs b/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/ConstructorDeclaration.cs index 1acd029c0..0831e8941 100644 --- a/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/ConstructorDeclaration.cs +++ b/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/ConstructorDeclaration.cs @@ -75,10 +75,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax public const string BaseKeyword = "base"; public const string ThisKeyword = "this"; - public ConstructorInitializerType ConstructorInitializerType { - get; - set; - } + public ConstructorInitializerType ConstructorInitializerType { get; set; } [Slot("Roles.Argument")] public partial AstNodeCollection Arguments { get; } diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/OperatorDeclaration.cs b/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/OperatorDeclaration.cs index c373c3273..29bc8ad86 100644 --- a/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/OperatorDeclaration.cs +++ b/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/OperatorDeclaration.cs @@ -155,14 +155,8 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax [Slot("PrivateImplementationTypeRole")] public partial AstType? PrivateImplementationType { get; set; } - OperatorType operatorType; - public OperatorType OperatorType { - get { return operatorType; } - set { - operatorType = value; - } - } + public OperatorType OperatorType { get; set; } [Slot("Roles.Parameter")] public partial AstNodeCollection Parameters { get; } diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/ParameterDeclaration.cs b/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/ParameterDeclaration.cs index 932d46f20..1c755ed99 100644 --- a/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/ParameterDeclaration.cs +++ b/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/ParameterDeclaration.cs @@ -48,39 +48,15 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax [Slot("AttributeRole")] public partial AstNodeCollection Attributes { get; } - bool hasThisModifier; - bool isParams; - bool isScopedRef; - public bool HasThisModifier { - get { return hasThisModifier; } - set { - hasThisModifier = value; - } - } + public bool HasThisModifier { get; set; } - public bool IsParams { - get { return isParams; } - set { - isParams = value; - } - } + public bool IsParams { get; set; } - public bool IsScopedRef { - get { return isScopedRef; } - set { - isScopedRef = value; - } - } + public bool IsScopedRef { get; set; } - ReferenceKind parameterModifier; - public ReferenceKind ParameterModifier { - get { return parameterModifier; } - set { - parameterModifier = value; - } - } + public ReferenceKind ParameterModifier { get; set; } [Slot("Roles.Type")] public partial AstType? Type { get; set; }