Browse Source

fix An attribute argument must be a constant expression, typeof expression or array creation expression of an attribute parameter type

pull/2066/head
MysticBoy 5 years ago
parent
commit
3edc8860c8
  1. 6
      ILSpy/Commands/GeneratePdbContextMenuEntry.cs
  2. 18
      ILSpy/Properties/Resources.Designer.cs
  3. 6
      ILSpy/Properties/Resources.resx
  4. 6
      ILSpy/Properties/Resources.zh-Hans.resx

6
ILSpy/Commands/GeneratePdbContextMenuEntry.cs

@ -74,12 +74,12 @@ namespace ICSharpCode.ILSpy @@ -74,12 +74,12 @@ namespace ICSharpCode.ILSpy
PortablePdbWriter.WritePdb(file, decompiler, options.DecompilerSettings, stream);
} catch (OperationCanceledException) {
output.WriteLine();
output.WriteLine("Generation was cancelled.");
output.WriteLine(Resources.GenerationWasCancelled);
throw;
}
}
stopwatch.Stop();
output.WriteLine("Generation complete in " + stopwatch.Elapsed.TotalSeconds.ToString("F1") + " seconds.");
output.WriteLine(string.Format(Resources.GenerationCompleteInSeconds, stopwatch.Elapsed.TotalSeconds.ToString("F1")));
output.WriteLine();
output.AddButton(null, Resources.OpenExplorer, delegate { Process.Start("explorer", "/select,\"" + fileName + "\""); });
output.WriteLine();
@ -88,7 +88,7 @@ namespace ICSharpCode.ILSpy @@ -88,7 +88,7 @@ namespace ICSharpCode.ILSpy
}
}
[ExportMainMenuCommand(Menu = nameof(Resources._File), Header = nameof(Resources.GeneratePortable), MenuCategory = Resources.Save)]
[ExportMainMenuCommand(Menu = nameof(Resources._File), Header = nameof(Resources.GeneratePortable), MenuCategory = nameof(Resources.Save))]
class GeneratePdbMainMenuEntry : SimpleCommand
{
public override bool CanExecute(object parameter)

18
ILSpy/Properties/Resources.Designer.cs generated

@ -1406,6 +1406,24 @@ namespace ICSharpCode.ILSpy.Properties { @@ -1406,6 +1406,24 @@ namespace ICSharpCode.ILSpy.Properties {
}
}
/// <summary>
/// 查找类似 Generation complete in {0} seconds. 的本地化字符串。
/// </summary>
public static string GenerationCompleteInSeconds {
get {
return ResourceManager.GetString("GenerationCompleteInSeconds", resourceCulture);
}
}
/// <summary>
/// 查找类似 Generation was cancelled. 的本地化字符串。
/// </summary>
public static string GenerationWasCancelled {
get {
return ResourceManager.GetString("GenerationWasCancelled", resourceCulture);
}
}
/// <summary>
/// 查找类似 Go to token 的本地化字符串。
/// </summary>

6
ILSpy/Properties/Resources.resx

@ -903,4 +903,10 @@ Do you want to continue?</value> @@ -903,4 +903,10 @@ Do you want to continue?</value>
<data name="VisualStudioSolutionFileSlnAllFiles" xml:space="preserve">
<value>Visual Studio Solution file|*.sln|All files|*.*</value>
</data>
<data name="GenerationCompleteInSeconds" xml:space="preserve">
<value>Generation complete in {0} seconds.</value>
</data>
<data name="GenerationWasCancelled" xml:space="preserve">
<value>Generation was cancelled.</value>
</data>
</root>

6
ILSpy/Properties/Resources.zh-Hans.resx

@ -903,4 +903,10 @@ @@ -903,4 +903,10 @@
<data name="SelectPDB" xml:space="preserve">
<value>选择 PDB...</value>
</data>
<data name="GenerationWasCancelled" xml:space="preserve">
<value>生成已取消。</value>
</data>
<data name="GenerationCompleteInSeconds" xml:space="preserve">
<value>生成完成,耗时 {0} 秒.</value>
</data>
</root>
Loading…
Cancel
Save