Browse Source

Emit property in project file

pull/3484/head
ds5678 1 week ago
parent
commit
4e21aedce7
  1. 4
      ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj
  2. 5
      ICSharpCode.Decompiler/CSharp/ProjectDecompiler/IProjectInfoProvider.cs
  3. 1
      ICSharpCode.Decompiler/CSharp/ProjectDecompiler/ProjectFileWriterDefault.cs
  4. 1
      ICSharpCode.Decompiler/CSharp/ProjectDecompiler/ProjectFileWriterSdkStyle.cs
  5. 2
      ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs

4
ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj

@ -141,10 +141,10 @@ @@ -141,10 +141,10 @@
<Compile Include="TestCases\Pretty\Comparisons.cs" />
<Compile Include="TestCases\Pretty\GloballyQualifiedTypeInStringInterpolation.cs" />
<Compile Include="TestCases\Pretty\Issue3406.cs" />
<Compile Include="TestCases\Pretty\Issue3483.cs" />
<Compile Include="TestCases\Pretty\PointerArithmetic.cs" />
<Compile Include="TestCases\Pretty\Issue3439.cs" />
<Compile Include="TestCases\Pretty\Issue3442.cs" />
<Compile Include="TestCases\Pretty\Issue3483.cs" />
<Compile Include="TestCases\Pretty\PointerArithmetic.cs" />
<None Include="TestCases\VBPretty\VBAutomaticEvents.vb" />
<Compile Include="TestCases\VBPretty\VBAutomaticEvents.cs" />
<Compile Include="TestCases\VBPretty\VBNonGenericForEach.cs" />

5
ICSharpCode.Decompiler/CSharp/ProjectDecompiler/IProjectInfoProvider.cs

@ -39,6 +39,11 @@ namespace ICSharpCode.Decompiler.CSharp.ProjectDecompiler @@ -39,6 +39,11 @@ namespace ICSharpCode.Decompiler.CSharp.ProjectDecompiler
/// </summary>
LanguageVersion LanguageVersion { get; }
/// <summary>
/// Check for overflow and underflow in operators.
/// </summary>
bool CheckForOverflowUnderflow { get; }
/// <summary>
/// Gets the unique ID of the project.
/// </summary>

1
ICSharpCode.Decompiler/CSharp/ProjectDecompiler/ProjectFileWriterDefault.cs

@ -98,6 +98,7 @@ namespace ICSharpCode.Decompiler.CSharp.ProjectDecompiler @@ -98,6 +98,7 @@ namespace ICSharpCode.Decompiler.CSharp.ProjectDecompiler
w.WriteElementString("OutputType", outputType);
w.WriteElementString("LangVersion", project.LanguageVersion.ToString().Replace("CSharp", "").Replace('_', '.'));
w.WriteElementString("CheckForOverflowUnderflow", project.CheckForOverflowUnderflow ? "true" : "false");
w.WriteElementString("AssemblyName", module.Name);
if (targetFramework.Identifier != null)

1
ICSharpCode.Decompiler/CSharp/ProjectDecompiler/ProjectFileWriterSdkStyle.cs

@ -192,6 +192,7 @@ namespace ICSharpCode.Decompiler.CSharp.ProjectDecompiler @@ -192,6 +192,7 @@ namespace ICSharpCode.Decompiler.CSharp.ProjectDecompiler
{
xml.WriteElementString("LangVersion", project.LanguageVersion.ToString().Replace("CSharp", "").Replace('_', '.'));
xml.WriteElementString("AllowUnsafeBlocks", TrueString);
xml.WriteElementString("CheckForOverflowUnderflow", project.CheckForOverflowUnderflow ? TrueString : FalseString);
if (project.StrongNameKeyFile != null)
{

2
ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs

@ -68,6 +68,8 @@ namespace ICSharpCode.Decompiler.CSharp.ProjectDecompiler @@ -68,6 +68,8 @@ namespace ICSharpCode.Decompiler.CSharp.ProjectDecompiler
}
}
bool IProjectInfoProvider.CheckForOverflowUnderflow => Settings.CheckForOverflowUnderflow;
public IAssemblyResolver AssemblyResolver { get; }
public AssemblyReferenceClassifier AssemblyReferenceClassifier { get; }

Loading…
Cancel
Save