diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/IdentifierExpressionBackreference.cs b/ICSharpCode.Decompiler/CSharp/Syntax/PatternMatching/IdentifierExpressionBackreference.cs similarity index 84% rename from ICSharpCode.Decompiler/CSharp/Syntax/IdentifierExpressionBackreference.cs rename to ICSharpCode.Decompiler/CSharp/Syntax/PatternMatching/IdentifierExpressionBackreference.cs index 78ee9359d..0975b686a 100644 --- a/ICSharpCode.Decompiler/CSharp/Syntax/IdentifierExpressionBackreference.cs +++ b/ICSharpCode.Decompiler/CSharp/Syntax/PatternMatching/IdentifierExpressionBackreference.cs @@ -19,12 +19,12 @@ using System; using System.Linq; -namespace ICSharpCode.Decompiler.CSharp.Syntax +namespace ICSharpCode.Decompiler.CSharp.Syntax.PatternMatching { /// /// Matches identifier expressions that have the same identifier as the referenced variable/type definition/method definition. /// - public class IdentifierExpressionBackreference : PatternMatching.Pattern + public class IdentifierExpressionBackreference : Pattern { readonly string referencedGroupName; @@ -39,12 +39,12 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax this.referencedGroupName = referencedGroupName; } - public override bool DoMatch(PatternMatching.INode other, PatternMatching.Match match) + public override bool DoMatch(INode other, Match match) { - IdentifierExpression ident = other as IdentifierExpression; + var ident = other as IdentifierExpression; if (ident == null || ident.TypeArguments.Any()) return false; - AstNode referenced = (AstNode)match.Get(referencedGroupName).Last(); + var referenced = (AstNode)match.Get(referencedGroupName).Last(); if (referenced == null) return false; return ident.Identifier == referenced.GetChildByRole(Roles.Identifier).Name; diff --git a/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj b/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj index 23a46a09a..07b13a6d1 100644 --- a/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj +++ b/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj @@ -28,7 +28,7 @@ False false - 11 + preview true True ICSharpCode.Decompiler.snk @@ -99,6 +99,11 @@ + + + + + @@ -108,6 +113,11 @@ + + True + True + Instructions.tt + @@ -227,7 +237,7 @@ - + @@ -505,11 +515,6 @@ - - True - True - Instructions.tt -