Browse Source

Fix regex for dotted property names.

pull/2126/head
Siegfried Pammer 5 years ago
parent
commit
3535e01482
  1. 4
      ICSharpCode.Decompiler/CSharp/Transforms/PatternStatementTransform.cs

4
ICSharpCode.Decompiler/CSharp/Transforms/PatternStatementTransform.cs

@ -650,8 +650,6 @@ namespace ICSharpCode.Decompiler.CSharp.Transforms
return base.VisitIdentifier(identifier); return base.VisitIdentifier(identifier);
} }
internal static bool IsBackingFieldOfAutomaticProperty(IField field, out IProperty property) internal static bool IsBackingFieldOfAutomaticProperty(IField field, out IProperty property)
{ {
property = null; property = null;
@ -673,7 +671,7 @@ namespace ICSharpCode.Decompiler.CSharp.Transforms
/// </list> /// </list>
/// </summary> /// </summary>
static readonly System.Text.RegularExpressions.Regex automaticPropertyBackingFieldNameRegex static readonly System.Text.RegularExpressions.Regex automaticPropertyBackingFieldNameRegex
= new System.Text.RegularExpressions.Regex(@"^(<(?<name>\w+)>k__BackingField|_(?<name>\w+))$"); = new System.Text.RegularExpressions.Regex(@"^(<(?<name>.+)>k__BackingField|_(?<name>.+))$");
static bool NameCouldBeBackingFieldOfAutomaticProperty(string name, out string propertyName) static bool NameCouldBeBackingFieldOfAutomaticProperty(string name, out string propertyName)
{ {

Loading…
Cancel
Save