Skip to content

Commit 4e21aed

Browse files
committed
Emit property in project file
1 parent 361bb17 commit 4e21aed

File tree

5 files changed

+11
-2
lines changed

5 files changed

+11
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,10 @@
141141
<Compile Include="TestCases\Pretty\Comparisons.cs" />
142142
<Compile Include="TestCases\Pretty\GloballyQualifiedTypeInStringInterpolation.cs" />
143143
<Compile Include="TestCases\Pretty\Issue3406.cs" />
144-
<Compile Include="TestCases\Pretty\Issue3483.cs" />
145-
<Compile Include="TestCases\Pretty\PointerArithmetic.cs" />
146144
<Compile Include="TestCases\Pretty\Issue3439.cs" />
147145
<Compile Include="TestCases\Pretty\Issue3442.cs" />
146+
<Compile Include="TestCases\Pretty\Issue3483.cs" />
147+
<Compile Include="TestCases\Pretty\PointerArithmetic.cs" />
148148
<None Include="TestCases\VBPretty\VBAutomaticEvents.vb" />
149149
<Compile Include="TestCases\VBPretty\VBAutomaticEvents.cs" />
150150
<Compile Include="TestCases\VBPretty\VBNonGenericForEach.cs" />

ICSharpCode.Decompiler/CSharp/ProjectDecompiler/IProjectInfoProvider.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ public interface IProjectInfoProvider
3939
/// </summary>
4040
LanguageVersion LanguageVersion { get; }
4141

42+
/// <summary>
43+
/// Check for overflow and underflow in operators.
44+
/// </summary>
45+
bool CheckForOverflowUnderflow { get; }
46+
4247
/// <summary>
4348
/// Gets the unique ID of the project.
4449
/// </summary>

ICSharpCode.Decompiler/CSharp/ProjectDecompiler/ProjectFileWriterDefault.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ public void Write(
9898

9999
w.WriteElementString("OutputType", outputType);
100100
w.WriteElementString("LangVersion", project.LanguageVersion.ToString().Replace("CSharp", "").Replace('_', '.'));
101+
w.WriteElementString("CheckForOverflowUnderflow", project.CheckForOverflowUnderflow ? "true" : "false");
101102

102103
w.WriteElementString("AssemblyName", module.Name);
103104
if (targetFramework.Identifier != null)

ICSharpCode.Decompiler/CSharp/ProjectDecompiler/ProjectFileWriterSdkStyle.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ static void WriteProjectInfo(XmlTextWriter xml, IProjectInfoProvider project)
192192
{
193193
xml.WriteElementString("LangVersion", project.LanguageVersion.ToString().Replace("CSharp", "").Replace('_', '.'));
194194
xml.WriteElementString("AllowUnsafeBlocks", TrueString);
195+
xml.WriteElementString("CheckForOverflowUnderflow", project.CheckForOverflowUnderflow ? TrueString : FalseString);
195196

196197
if (project.StrongNameKeyFile != null)
197198
{

ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ public LanguageVersion LanguageVersion {
6868
}
6969
}
7070

71+
bool IProjectInfoProvider.CheckForOverflowUnderflow => Settings.CheckForOverflowUnderflow;
72+
7173
public IAssemblyResolver AssemblyResolver { get; }
7274

7375
public AssemblyReferenceClassifier AssemblyReferenceClassifier { get; }

0 commit comments

Comments
 (0)