Browse Source

#3486: Remove XML serialization from DecompilerSettings in ILSpy

pull/3490/head
Siegfried Pammer 2 months ago
parent
commit
49d5bb8227
  1. 10
      ILSpy/Options/DecompilerSettings.cs
  2. 2
      ILSpy/Search/SearchPane.xaml.cs

10
ILSpy/Options/DecompilerSettings.cs

@ -56,15 +56,5 @@ namespace ICSharpCode.ILSpy.Options
p.SetValue(this, value.Value); p.SetValue(this, value.Value);
} }
} }
public new DecompilerSettings Clone()
{
var section = SaveToXml();
var newSettings = new DecompilerSettings();
newSettings.LoadFromXml(section);
return newSettings;
}
} }
} }

2
ILSpy/Search/SearchPane.xaml.cs

@ -478,7 +478,7 @@ namespace ICSharpCode.ILSpy.Search
if (!Enum.TryParse(this.languageVersion?.Version, out Decompiler.CSharp.LanguageVersion languageVersion)) if (!Enum.TryParse(this.languageVersion?.Version, out Decompiler.CSharp.LanguageVersion languageVersion))
languageVersion = Decompiler.CSharp.LanguageVersion.Latest; languageVersion = Decompiler.CSharp.LanguageVersion.Latest;
decompilerSettings.SetLanguageVersion(languageVersion); decompilerSettings.SetLanguageVersion(languageVersion);
request.DecompilerSettings = settingsService.DecompilerSettings.Clone(); request.DecompilerSettings = decompilerSettings;
return request; return request;
} }

Loading…
Cancel
Save