Browse Source

Merge pull request #3282 from dodexahedron/v2_3275_basic_stuff_before_I_go_to_town

Pre-work for #3275 - csproj & R# tweaks, and separating some code
Tig 1 year ago
parent
commit
0b8ffb45de

+ 22 - 24
Terminal.Gui/Terminal.Gui.csproj

@@ -15,17 +15,22 @@
     <LangVersion>12</LangVersion>
     <RootNamespace>Terminal.Gui</RootNamespace>
     <AssemblyName>Terminal.Gui</AssemblyName>
-    <SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+    <DefineTrace>True</DefineTrace>
+    <DebugType>portable</DebugType>
     <DefineConstants>$(DefineConstants);JETBRAINS_ANNOTATIONS;CONTRACTS_FULL</DefineConstants>
+    <ImplicitUsings>enable</ImplicitUsings>
+    <NoLogo>True</NoLogo>
+    <SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DefineDebug>True</DefineDebug>
+    <DefineConstants>$(DefineConstants);DEBUG_IDISPOSABLE</DefineConstants>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>portable</DebugType>
+    <Optimize>True</Optimize>
     <VersionSuffix></VersionSuffix>
   </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DefineConstants>TRACE;DEBUG_IDISPOSABLE</DefineConstants>
-    <DebugType>portable</DebugType>
-  </PropertyGroup>
   <!-- =================================================================== -->
   <!-- Configuration Manager -->
   <!-- =================================================================== -->
@@ -40,7 +45,6 @@
   <!-- =================================================================== -->
   <ItemGroup>
     <PackageReference Include="JetBrains.Annotations" Version="2023.3.0" />
-    <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="all" />
     <!-- Enable Nuget Source Link for github -->
     <PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
     <PackageReference Include="System.IO.Abstractions" Version="20.0.15" />
@@ -48,16 +52,20 @@
     <PackageReference Include="Wcwidth" Version="2.0.0" />
   </ItemGroup>
   <!-- =================================================================== -->
+  <!-- Global Usings and Type Aliases -->
+  <!-- =================================================================== -->
+  <ItemGroup>
+    <Using Include="JetBrains.Annotations" />
+    <Using Include="System.Diagnostics.Contracts.PureAttribute" Alias="PureAttribute" />
+    <Using Include="System.Drawing" />
+    <Using Include="System.Text" />
+  </ItemGroup>
+  <!-- =================================================================== -->
   <!-- Namespaces for which internal items are visible -->
   <!-- =================================================================== -->
   <ItemGroup>
     <InternalsVisibleTo Include="UnitTests" />
   </ItemGroup>
-  <PropertyGroup>
-    <!-- Uncomment the RestoreSources element to have dotnet restore pull NStack from a local dir for testing -->
-    <!-- See https://stackoverflow.com/a/44463578/297526 -->
-    <!--<RestoreSources>$(RestoreSources);..\..\NStack\NStack\bin\Debug;https://api.nuget.org/v3/index.json</RestoreSources>-->
-  </PropertyGroup>
   <!-- =================================================================== -->
   <!-- API Documentation -->
   <!-- =================================================================== -->
@@ -87,13 +95,6 @@
       <LastGenOutput>Strings.Designer.cs</LastGenOutput>
     </EmbeddedResource>
   </ItemGroup>
-  <ItemGroup>
-    <Using Include="JetBrains.Annotations" />
-    <Using Include="System.Diagnostics.Contracts.PureAttribute" Alias="PureAttribute" />
-    <Using Include="System.Drawing" />
-    <Using Include="System.Text" />
-    <Using Include="JetBrains.Annotations" />
-  </ItemGroup>
   <!-- =================================================================== -->
   <!-- Nuget  -->
   <!-- =================================================================== -->
@@ -111,7 +112,7 @@
     <PackageReleaseNotes>
       See: https://github.com/gui-cs/Terminal.Gui/releases
     </PackageReleaseNotes>
-    <DocumentationFile>bin\Release\Terminal.Gui.xml</DocumentationFile>
+    <DocumentationFile>bin\$(Configuration)\Terminal.Gui.xml</DocumentationFile>
     <GeneratePackageOnBuild Condition=" '$(Configuration)' == 'Debug' ">true</GeneratePackageOnBuild>
     <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
     <RepositoryUrl>https://github.com/gui-cs/Terminal.Gui.git</RepositoryUrl>
@@ -124,9 +125,6 @@
     <GitRepositoryRemoteName>upstream</GitRepositoryRemoteName>
     <EmbedUntrackedSources>true</EmbedUntrackedSources>
     <EnableSourceLink>true</EnableSourceLink>
-    <!--<DebugType>Embedded</DebugType>-->
     <Authors>Miguel de Icaza, Tig Kindel (@tig), @BDisp</Authors>
-    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
-    <ImplicitUsings>enable</ImplicitUsings>
   </PropertyGroup>
-</Project>
+</Project>

+ 20 - 0
Terminal.Gui/Text/TextAlignment.cs

@@ -0,0 +1,20 @@
+namespace Terminal.Gui;
+
+/// <summary>Text alignment enumeration, controls how text is displayed.</summary>
+public enum TextAlignment
+{
+    /// <summary>The text will be left-aligned.</summary>
+    Left,
+
+    /// <summary>The text will be right-aligned.</summary>
+    Right,
+
+    /// <summary>The text will be centered horizontally.</summary>
+    Centered,
+
+    /// <summary>
+    ///     The text will be justified (spaces will be added to existing spaces such that the text fills the container
+    ///     horizontally).
+    /// </summary>
+    Justified
+}

+ 61 - 0
Terminal.Gui/Text/TextDirection.cs

@@ -0,0 +1,61 @@
+namespace Terminal.Gui;
+
+/// <summary>Text direction enumeration, controls how text is displayed.</summary>
+/// <remarks>
+///     <para>TextDirection  [H] = Horizontal  [V] = Vertical</para>
+///     <table>
+///         <tr>
+///             <th>TextDirection</th> <th>Description</th>
+///         </tr>
+///         <tr>
+///             <td>LeftRight_TopBottom [H]</td> <td>Normal</td>
+///         </tr>
+///         <tr>
+///             <td>TopBottom_LeftRight [V]</td> <td>Normal</td>
+///         </tr>
+///         <tr>
+///             <td>RightLeft_TopBottom [H]</td> <td>Invert Text</td>
+///         </tr>
+///         <tr>
+///             <td>TopBottom_RightLeft [V]</td> <td>Invert Lines</td>
+///         </tr>
+///         <tr>
+///             <td>LeftRight_BottomTop [H]</td> <td>Invert Lines</td>
+///         </tr>
+///         <tr>
+///             <td>BottomTop_LeftRight [V]</td> <td>Invert Text</td>
+///         </tr>
+///         <tr>
+///             <td>RightLeft_BottomTop [H]</td> <td>Invert Text + Invert Lines</td>
+///         </tr>
+///         <tr>
+///             <td>BottomTop_RightLeft [V]</td> <td>Invert Text + Invert Lines</td>
+///         </tr>
+///     </table>
+/// </remarks>
+public enum TextDirection
+{
+    /// <summary>Normal horizontal direction. <code>HELLO<br/>WORLD</code></summary>
+    LeftRight_TopBottom,
+
+    /// <summary>Normal vertical direction. <code>H W<br/>E O<br/>L R<br/>L L<br/>O D</code></summary>
+    TopBottom_LeftRight,
+
+    /// <summary>This is a horizontal direction. <br/> RTL <code>OLLEH<br/>DLROW</code></summary>
+    RightLeft_TopBottom,
+
+    /// <summary>This is a vertical direction. <code>W H<br/>O E<br/>R L<br/>L L<br/>D O</code></summary>
+    TopBottom_RightLeft,
+
+    /// <summary>This is a horizontal direction. <code>WORLD<br/>HELLO</code></summary>
+    LeftRight_BottomTop,
+
+    /// <summary>This is a vertical direction. <code>O D<br/>L L<br/>L R<br/>E O<br/>H W</code></summary>
+    BottomTop_LeftRight,
+
+    /// <summary>This is a horizontal direction. <code>DLROW<br/>OLLEH</code></summary>
+    RightLeft_BottomTop,
+
+    /// <summary>This is a vertical direction. <code>D O<br/>L L<br/>R L<br/>O E<br/>W H</code></summary>
+    BottomTop_RightLeft
+}

+ 0 - 98
Terminal.Gui/Text/TextFormatter.cs

@@ -1,103 +1,5 @@
 namespace Terminal.Gui;
 
-/// <summary>Text alignment enumeration, controls how text is displayed.</summary>
-public enum TextAlignment
-{
-    /// <summary>The text will be left-aligned.</summary>
-    Left,
-
-    /// <summary>The text will be right-aligned.</summary>
-    Right,
-
-    /// <summary>The text will be centered horizontally.</summary>
-    Centered,
-
-    /// <summary>
-    ///     The text will be justified (spaces will be added to existing spaces such that the text fills the container
-    ///     horizontally).
-    /// </summary>
-    Justified
-}
-
-/// <summary>Vertical text alignment enumeration, controls how text is displayed.</summary>
-public enum VerticalTextAlignment
-{
-    /// <summary>The text will be top-aligned.</summary>
-    Top,
-
-    /// <summary>The text will be bottom-aligned.</summary>
-    Bottom,
-
-    /// <summary>The text will centered vertically.</summary>
-    Middle,
-
-    /// <summary>
-    ///     The text will be justified (spaces will be added to existing spaces such that the text fills the container
-    ///     vertically).
-    /// </summary>
-    Justified
-}
-
-/// <summary>Text direction enumeration, controls how text is displayed.</summary>
-/// <remarks>
-///     <para>TextDirection  [H] = Horizontal  [V] = Vertical</para>
-///     <table>
-///         <tr>
-///             <th>TextDirection</th> <th>Description</th>
-///         </tr>
-///         <tr>
-///             <td>LeftRight_TopBottom [H]</td> <td>Normal</td>
-///         </tr>
-///         <tr>
-///             <td>TopBottom_LeftRight [V]</td> <td>Normal</td>
-///         </tr>
-///         <tr>
-///             <td>RightLeft_TopBottom [H]</td> <td>Invert Text</td>
-///         </tr>
-///         <tr>
-///             <td>TopBottom_RightLeft [V]</td> <td>Invert Lines</td>
-///         </tr>
-///         <tr>
-///             <td>LeftRight_BottomTop [H]</td> <td>Invert Lines</td>
-///         </tr>
-///         <tr>
-///             <td>BottomTop_LeftRight [V]</td> <td>Invert Text</td>
-///         </tr>
-///         <tr>
-///             <td>RightLeft_BottomTop [H]</td> <td>Invert Text + Invert Lines</td>
-///         </tr>
-///         <tr>
-///             <td>BottomTop_RightLeft [V]</td> <td>Invert Text + Invert Lines</td>
-///         </tr>
-///     </table>
-/// </remarks>
-public enum TextDirection
-{
-    /// <summary>Normal horizontal direction. <code>HELLO<br/>WORLD</code></summary>
-    LeftRight_TopBottom,
-
-    /// <summary>Normal vertical direction. <code>H W<br/>E O<br/>L R<br/>L L<br/>O D</code></summary>
-    TopBottom_LeftRight,
-
-    /// <summary>This is a horizontal direction. <br/> RTL <code>OLLEH<br/>DLROW</code></summary>
-    RightLeft_TopBottom,
-
-    /// <summary>This is a vertical direction. <code>W H<br/>O E<br/>R L<br/>L L<br/>D O</code></summary>
-    TopBottom_RightLeft,
-
-    /// <summary>This is a horizontal direction. <code>WORLD<br/>HELLO</code></summary>
-    LeftRight_BottomTop,
-
-    /// <summary>This is a vertical direction. <code>O D<br/>L L<br/>L R<br/>E O<br/>H W</code></summary>
-    BottomTop_LeftRight,
-
-    /// <summary>This is a horizontal direction. <code>DLROW<br/>OLLEH</code></summary>
-    RightLeft_BottomTop,
-
-    /// <summary>This is a vertical direction. <code>D O<br/>L L<br/>R L<br/>O E<br/>W H</code></summary>
-    BottomTop_RightLeft
-}
-
 /// <summary>
 ///     Provides text formatting. Supports <see cref="View.HotKey"/>s, horizontal alignment, vertical alignment,
 ///     multiple lines, and word-based line wrap.

+ 20 - 0
Terminal.Gui/Text/VerticalTextAlignment.cs

@@ -0,0 +1,20 @@
+namespace Terminal.Gui;
+
+/// <summary>Vertical text alignment enumeration, controls how text is displayed.</summary>
+public enum VerticalTextAlignment
+{
+    /// <summary>The text will be top-aligned.</summary>
+    Top,
+
+    /// <summary>The text will be bottom-aligned.</summary>
+    Bottom,
+
+    /// <summary>The text will centered vertically.</summary>
+    Middle,
+
+    /// <summary>
+    ///     The text will be justified (spaces will be added to existing spaces such that the text fills the container
+    ///     vertically).
+    /// </summary>
+    Justified
+}

+ 15 - 3
Terminal.sln.DotSettings

@@ -396,11 +396,19 @@
 	<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
 	<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpUseContinuousIndentInsideBracesMigration/@EntryIndexedValue">True</s:Boolean>
 	<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
+	<s:Boolean x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=1BE867097E5CBD4A911FDC0FC0E0BAAC/@KeyIndexDefined">True</s:Boolean>
+	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=1BE867097E5CBD4A911FDC0FC0E0BAAC/Color/@EntryValue">#FFCF9D32</s:String>
+	<s:Boolean x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=1BE867097E5CBD4A911FDC0FC0E0BAAC/MatchComments/@EntryValue">True</s:Boolean>
+	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=1BE867097E5CBD4A911FDC0FC0E0BAAC/Name/@EntryValue">Suggestion</s:String>
+	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=1BE867097E5CBD4A911FDC0FC0E0BAAC/Pattern/@EntryValue">(?&lt;=\W|^)(?&lt;TAG&gt;SUGGESTION:)(\W|$)(.*)</s:String>
+	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=1BE867097E5CBD4A911FDC0FC0E0BAAC/TodoIconStyle/@EntryValue">Question</s:String>
+	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=4386F01B791C56499C7EA059B55FFB54/Pattern/@EntryValue">(?&lt;=\W|^)(?&lt;TAG&gt;BUG:|BUGBUG:)(\W|$)(.*)</s:String>
 	<s:Boolean x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=49F9F595ACF81E45B2F33CA1F1532FCD/@KeyIndexDefined">True</s:Boolean>
+	<s:Boolean x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=49F9F595ACF81E45B2F33CA1F1532FCD/CaseSensitive/@EntryValue">True</s:Boolean>
 	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=49F9F595ACF81E45B2F33CA1F1532FCD/Color/@EntryValue">#FFCF9D32</s:String>
 	<s:Boolean x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=49F9F595ACF81E45B2F33CA1F1532FCD/MatchComments/@EntryValue">True</s:Boolean>
 	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=49F9F595ACF81E45B2F33CA1F1532FCD/Name/@EntryValue">Performance</s:String>
-	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=49F9F595ACF81E45B2F33CA1F1532FCD/Pattern/@EntryValue">(?&lt;=\W|^)(?&lt;TAG&gt;PERF)(\W|$)(.*)</s:String>
+	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=49F9F595ACF81E45B2F33CA1F1532FCD/Pattern/@EntryValue">(?&lt;=\W|^)(?&lt;TAG&gt;PERF:)(\W|$)(.*)</s:String>
 	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=49F9F595ACF81E45B2F33CA1F1532FCD/TodoIconStyle/@EntryValue">Warning</s:String>
 	<s:Boolean x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=712534BA80FF50429CC407A77A052F63/@KeyIndexDefined">True</s:Boolean>
 	<s:Boolean x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=712534BA80FF50429CC407A77A052F63/CaseSensitive/@EntryValue">True</s:Boolean>
@@ -410,22 +418,26 @@
 	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=712534BA80FF50429CC407A77A052F63/Pattern/@EntryValue">(?&lt;=\W|^)(?&lt;TAG&gt;NOTE:)(\W|$)(.*)</s:String>
 	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=712534BA80FF50429CC407A77A052F63/TodoIconStyle/@EntryValue">Normal</s:String>
 	<s:Boolean x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=90214AE24C7BA34FA45434C0B221453E/@KeyIndexDefined">True</s:Boolean>
+	<s:Boolean x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=90214AE24C7BA34FA45434C0B221453E/CaseSensitive/@EntryValue">True</s:Boolean>
 	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=90214AE24C7BA34FA45434C0B221453E/Color/@EntryValue">#FFCF9D32</s:String>
 	<s:Boolean x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=90214AE24C7BA34FA45434C0B221453E/MatchComments/@EntryValue">True</s:Boolean>
 	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=90214AE24C7BA34FA45434C0B221453E/Name/@EntryValue">Question</s:String>
 	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=90214AE24C7BA34FA45434C0B221453E/Pattern/@EntryValue">(?&lt;=\W|^)(?&lt;TAG&gt;QUESTION:)(\W|$)(.*)</s:String>
 	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=90214AE24C7BA34FA45434C0B221453E/TodoIconStyle/@EntryValue">Question</s:String>
+	<s:Boolean x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=961894CCC510410ABE2B99132B253C80/CaseSensitive/@EntryValue">True</s:Boolean>
+	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=961894CCC510410ABE2B99132B253C80/Pattern/@EntryValue">(?&lt;=\W|^)(?&lt;TAG&gt;TODO:)(\W|$)(.*)</s:String>
 	<s:Boolean x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=AAF58D8E48F4F648BB088E649A89FF54/@KeyIndexDefined">True</s:Boolean>
+	<s:Boolean x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=AAF58D8E48F4F648BB088E649A89FF54/CaseSensitive/@EntryValue">True</s:Boolean>
 	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=AAF58D8E48F4F648BB088E649A89FF54/Color/@EntryValue">#FFCF9D32</s:String>
 	<s:Boolean x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=AAF58D8E48F4F648BB088E649A89FF54/MatchComments/@EntryValue">True</s:Boolean>
 	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=AAF58D8E48F4F648BB088E649A89FF54/Name/@EntryValue">Unclear Intent</s:String>
-	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=AAF58D8E48F4F648BB088E649A89FF54/Pattern/@EntryValue">(?&lt;=\W|^)(?&lt;TAG&gt;UNCLEAR|INTENT)(\W|$)(.*)</s:String>
+	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=AAF58D8E48F4F648BB088E649A89FF54/Pattern/@EntryValue">(?&lt;=\W|^)(?&lt;TAG&gt;UNCLEAR:|INTENT:)(\W|$)(.*)</s:String>
 	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=AAF58D8E48F4F648BB088E649A89FF54/TodoIconStyle/@EntryValue">Warning</s:String>
 	<s:Boolean x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=B0C2F2A1AF61DA42BBF270980E3DCEF7/@KeyIndexDefined">True</s:Boolean>
 	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=B0C2F2A1AF61DA42BBF270980E3DCEF7/Color/@EntryValue">#FFCF9D32</s:String>
 	<s:Boolean x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=B0C2F2A1AF61DA42BBF270980E3DCEF7/MatchComments/@EntryValue">True</s:Boolean>
 	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=B0C2F2A1AF61DA42BBF270980E3DCEF7/Name/@EntryValue">Concurrency Issue</s:String>
-	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=B0C2F2A1AF61DA42BBF270980E3DCEF7/Pattern/@EntryValue">(?&lt;=\W|^)(?&lt;TAG&gt;CONCURRENCY)(\W|$)(.*)</s:String>
+	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=B0C2F2A1AF61DA42BBF270980E3DCEF7/Pattern/@EntryValue">(?&lt;=\W|^)(?&lt;TAG&gt;CONCURRENCY:)(\W|$)(.*)</s:String>
 	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=B0C2F2A1AF61DA42BBF270980E3DCEF7/TodoIconStyle/@EntryValue">Warning</s:String>
 	<s:Boolean x:Key="/Default/UserDictionary/Words/=unsynchronized/@EntryIndexedValue">True</s:Boolean>
 </wpf:ResourceDictionary>

+ 17 - 10
UnitTests/UnitTests.csproj

@@ -1,11 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <TargetFramework>net8.0</TargetFramework>
-    <!-- https://stackoverflow.com/questions/294216/why-does-c-sharp-forbid-generic-attribute-types -->
-    <!-- for AutoInitShutdown attribute -->
-    <LangVersion>Preview</LangVersion>
-    <IsPackable>false</IsPackable>
-    <UseDataCollector />
     <!-- Version numbers are automatically updated by gitversion when a release is released -->
     <!-- In the source tree the version will always be 2.0 for all projects. -->
     <!-- Do not modify these. -->
@@ -14,16 +8,29 @@
     <Version>2.0</Version>
     <InformationalVersion>2.0</InformationalVersion>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
-    <DefineConstants>TRACE</DefineConstants>
+  <PropertyGroup>
+    <TargetFramework>net8.0</TargetFramework>
+    <LangVersion>12</LangVersion>
+    <IsPackable>false</IsPackable>
+    <UseDataCollector />
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+    <DefineTrace>True</DefineTrace>
+    <DebugType>portable</DebugType>
+    <DefineConstants>$(DefineConstants);JETBRAINS_ANNOTATIONS;CONTRACTS_FULL</DefineConstants>
+    <ImplicitUsings>enable</ImplicitUsings>
+    <NoLogo>True</NoLogo>
+    <SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
-    <DefineConstants>TRACE;DEBUG_IDISPOSABLE</DefineConstants>
+    <DefineDebug>True</DefineDebug>
+    <DefineConstants>$(DefineConstants);DEBUG_IDISPOSABLE</DefineConstants>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
+    <Optimize>True</Optimize>
   </PropertyGroup>
   <ItemGroup>
     <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
     <PackageReference Include="ReportGenerator" Version="5.2.1" />
-    <PackageReference Include="System.Collections" Version="4.3.0" />
     <PackageReference Include="TestableIO.System.IO.Abstractions.TestingHelpers" Version="20.0.15" />
     <PackageReference Include="xunit" Version="2.7.0" />
     <PackageReference Include="Xunit.Combinatorial" Version="1.6.24" />