فهرست منبع

Merge pull request #3556 from dodexahedron/v2_dodex_solution_and_project_QoL_tweaks_1

Fixes #3557: Mostly non-impacting minor changes to the csproj, a fix for nuget.config, and some design-time QoL stuff
Tig 1 سال پیش
والد
کامیت
f24a0f8b85
38فایلهای تغییر یافته به همراه325 افزوده شده و 166 حذف شده
  1. 37 0
      .filenesting.json
  2. 47 13
      .gitignore
  3. 33 0
      .vsconfig
  4. 10 0
      Analyzers.slnf
  5. 2 2
      Analyzers/Directory.Build.props
  6. 4 2
      Analyzers/Terminal.Gui.Analyzers.Internal.Debugging/Program.cs
  7. 2 8
      Analyzers/Terminal.Gui.Analyzers.Internal.Tests/Generators/EnumExtensions/EnumDefinitions/EnumMemberValues.cs
  8. 2 0
      Analyzers/Terminal.Gui.Analyzers.Internal.Tests/Generators/EnumExtensions/EnumDefinitions/WithGenerator/BetterEnum.cs
  9. 2 0
      Analyzers/Terminal.Gui.Analyzers.Internal.Tests/Generators/EnumExtensions/EnumDefinitions/WithGenerator/BetterEnum_ExplicitInt.cs
  10. 2 0
      Analyzers/Terminal.Gui.Analyzers.Internal.Tests/Generators/EnumExtensions/EnumDefinitions/WithGenerator/BetterEnum_ExplicitInt_NoFastIsDefined.cs
  11. 2 0
      Analyzers/Terminal.Gui.Analyzers.Internal.Tests/Generators/EnumExtensions/EnumDefinitions/WithGenerator/BetterEnum_ExplicitUInt.cs
  12. 2 0
      Analyzers/Terminal.Gui.Analyzers.Internal.Tests/Generators/EnumExtensions/EnumDefinitions/WithGenerator/BetterEnum_ExplicitUInt_NoFastIsDefined.cs
  13. 2 0
      Analyzers/Terminal.Gui.Analyzers.Internal.Tests/Generators/EnumExtensions/EnumDefinitions/WithGenerator/BetterEnum_NoFastIsDefined.cs
  14. 2 0
      Analyzers/Terminal.Gui.Analyzers.Internal.Tests/Generators/EnumExtensions/EnumDefinitions/WithGenerator/BetterFlagsEnum.cs
  15. 2 0
      Analyzers/Terminal.Gui.Analyzers.Internal.Tests/Generators/EnumExtensions/EnumDefinitions/WithGenerator/BetterFlagsEnum_ExplicitInt.cs
  16. 2 0
      Analyzers/Terminal.Gui.Analyzers.Internal.Tests/Generators/EnumExtensions/EnumDefinitions/WithGenerator/BetterFlagsEnum_ExplicitUInt.cs
  17. 2 0
      Analyzers/Terminal.Gui.Analyzers.Internal.Tests/Generators/EnumExtensions/EnumDefinitions/WithoutGenerator/BasicEnum.cs
  18. 2 0
      Analyzers/Terminal.Gui.Analyzers.Internal.Tests/Generators/EnumExtensions/EnumDefinitions/WithoutGenerator/BasicEnum_ExplicitInt.cs
  19. 2 0
      Analyzers/Terminal.Gui.Analyzers.Internal.Tests/Generators/EnumExtensions/EnumDefinitions/WithoutGenerator/BasicEnum_ExplicitUint.cs
  20. 2 0
      Analyzers/Terminal.Gui.Analyzers.Internal.Tests/Generators/EnumExtensions/EnumDefinitions/WithoutGenerator/FlagsEnum.cs
  21. 2 0
      Analyzers/Terminal.Gui.Analyzers.Internal.Tests/Generators/EnumExtensions/EnumDefinitions/WithoutGenerator/FlagsEnum_ExplicitInt.cs
  22. 2 0
      Analyzers/Terminal.Gui.Analyzers.Internal.Tests/Generators/EnumExtensions/EnumDefinitions/WithoutGenerator/FlagsEnum_ExplicitUInt.cs
  23. 39 62
      Analyzers/Terminal.Gui.Analyzers.Internal.Tests/Generators/EnumExtensions/EnumExtensionMethodsIncrementalGeneratorTests.cs
  24. 3 0
      Analyzers/Terminal.Gui.Analyzers.Internal.Tests/GlobalSuppressions.cs
  25. 1 0
      Analyzers/Terminal.Gui.Analyzers.Internal.Tests/Terminal.Gui.Analyzers.Internal.Tests.csproj
  26. 3 0
      Analyzers/Terminal.Gui.Analyzers.Internal/GlobalSuppressions.cs
  27. 1 1
      Directory.Build.props
  28. 12 0
      NoSamples.slnf
  29. 11 0
      Release.slnf
  30. 3 0
      Terminal.Gui/Configuration/SettingsScope.cs
  31. 1 1
      Terminal.Gui/Resources/Strings.pt-PT.resx
  32. 30 26
      Terminal.Gui/Terminal.Gui.csproj
  33. 35 21
      Terminal.sln
  34. 3 1
      Terminal.sln.DotSettings
  35. 4 3
      UICatalog/UICatalog.csproj
  36. 0 15
      UnitTests/.filenesting.json
  37. 7 9
      UnitTests/UnitTests.csproj
  38. 7 2
      nuget.config

+ 37 - 0
.filenesting.json

@@ -0,0 +1,37 @@
+{
+  "help": "https://go.microsoft.com/fwlink/?linkid=866610",
+  "root": true,
+
+  "dependentFileProviders": {
+    "add": {
+      "addedExtension": {},
+      "pathSegment": {
+        "add": {
+          ".*": [
+            ".config",
+            ".cs",
+            ".json",
+            ".resx"
+          ]
+        }
+      },
+      "extensionToExtension": {
+        "add": {
+          ".designer.cs": [
+            ".resx"
+          ],
+          ".cs.d.ts": [
+            ".cs"
+          ]
+        }
+      },
+      "fileToFile": {
+        "add": {
+          "package-lock.json": [
+            "package.json"
+          ]
+        }
+      }
+    }
+  }
+}

+ 47 - 13
.gitignore

@@ -1,29 +1,63 @@
-bin
-obj
-~$*
+# Build artifacts
+[Bb]in/
+[Oo]bj/
+[Rr]elease/
+[Dd]ebug/
+[Xx]64/
+[Aa][Rr][Mm]/
+[Aa][Rr][Mm]64/
+
+# User-local settings and caches
+*.rsuser
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
 *.userprefs
 *.userprefs
+_ReSharper.**
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+.devcontainer/
+.vscode/
+.vs/
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!?*.[Cc]ache/
+
+# Roslyn generated cs files
+**.g.cs
+
+# Common temporary files
+~$*
 *~
 *~
-packages
-.vs
 
 
-# User-specific files
-*.user
+# NuGet Stuff
+*.nupkg
+*.snupkg
+# Exclude everything in packages directory except the packages/build directory
+**/[Pp]ackages/*
+!**/[Pp]ackages/build/
 
 
 # API Docs
 # API Docs
 docfx/api
 docfx/api
 docfx/_site
 docfx/_site
 
 
-# Unit Tests
+# Test Results
 UnitTests/TestResults
 UnitTests/TestResults
 TestResults
 TestResults
 
 
-#git merge files
-*.orig
-
-.vscode/
+# git merge files
+.orig
+.theirs
+.ours
 
 
 demo.*
 demo.*
 
 
 *.deb
 *.deb
 
 
-*.tui/
+*.tui/
+
+*.dotCover

+ 33 - 0
.vsconfig

@@ -0,0 +1,33 @@
+{
+  "version": "1.0",
+  "components": [
+    "Microsoft.VisualStudio.Component.DependencyValidation.Community",
+    "Microsoft.VisualStudio.Component.CoreEditor",
+    "Microsoft.VisualStudio.Workload.CoreEditor",
+    "Microsoft.Net.Component.4.8.SDK",
+    "Microsoft.Net.Component.4.7.2.TargetingPack",
+    "Microsoft.Net.ComponentGroup.DevelopmentPrerequisites",
+    "Microsoft.VisualStudio.Component.Roslyn.Compiler",
+    "Microsoft.Component.MSBuild",
+    "Microsoft.VisualStudio.Component.Roslyn.LanguageServices",
+    "Microsoft.VisualStudio.Component.TextTemplating",
+    "Microsoft.VisualStudio.Component.NuGet",
+    "Microsoft.VisualStudio.Component.ManagedDesktop.Core",
+    "Microsoft.NetCore.Component.Runtime.8.0",
+    "Microsoft.NetCore.Component.SDK",
+    "Microsoft.VisualStudio.Component.FSharp",
+    "Microsoft.NetCore.Component.DevelopmentTools",
+    "Microsoft.VisualStudio.Component.AppInsights.Tools",
+    "Microsoft.VisualStudio.Component.Debugger.JustInTime",
+    "Microsoft.Net.Component.4.6.2.TargetingPack",
+    "Microsoft.Net.Component.4.8.1.TargetingPack",
+    "Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites",
+    "Microsoft.VisualStudio.Component.NuGet.BuildTools",
+    "Microsoft.Net.Component.4.6.TargetingPack",
+    "Microsoft.VisualStudio.Component.VSSDK",
+    "Microsoft.VisualStudio.ComponentGroup.VisualStudioExtension.Prerequisites",
+    "Microsoft.Component.CodeAnalysis.SDK",
+    "Microsoft.VisualStudio.Workload.VisualStudioExtension"
+  ],
+  "extensions": []
+}

+ 10 - 0
Analyzers.slnf

@@ -0,0 +1,10 @@
+{
+  "solution": {
+    "path": "Terminal.sln",
+    "projects": [
+      "Analyzers\\Terminal.Gui.Analyzers.Internal.Debugging\\Terminal.Gui.Analyzers.Internal.Debugging.csproj",
+      "Analyzers\\Terminal.Gui.Analyzers.Internal.Tests\\Terminal.Gui.Analyzers.Internal.Tests.csproj",
+      "Analyzers\\Terminal.Gui.Analyzers.Internal\\Terminal.Gui.Analyzers.Internal.csproj",
+    ]
+  }
+}

+ 2 - 2
Analyzers/Directory.Build.props

@@ -2,7 +2,7 @@
   <PropertyGroup>
   <PropertyGroup>
     <Nullable>enable</Nullable>
     <Nullable>enable</Nullable>
     <AnalysisLevel>latest-recommended</AnalysisLevel>
     <AnalysisLevel>latest-recommended</AnalysisLevel>
-    <WarningLevel>7</WarningLevel>
+    <WarningLevel>8</WarningLevel>
     <CharacterSet>UTF-8</CharacterSet>
     <CharacterSet>UTF-8</CharacterSet>
     <Deterministic>true</Deterministic>
     <Deterministic>true</Deterministic>
     <UTF8OutPut>true</UTF8OutPut>
     <UTF8OutPut>true</UTF8OutPut>
@@ -12,7 +12,7 @@
   </PropertyGroup>
   </PropertyGroup>
   <ItemGroup>
   <ItemGroup>
     <PackageReference Include="JetBrains.Annotations" Version="2023.3.0" />
     <PackageReference Include="JetBrains.Annotations" Version="2023.3.0" />
-    <PackageReference Include="JetBrains.ExternalAnnotations" Version="10.2.147" />
+    <PackageReference Include="JetBrains.ExternalAnnotations" Version="10.2.149" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
       <Using Include="System.Buffers" />
       <Using Include="System.Buffers" />

+ 4 - 2
Analyzers/Terminal.Gui.Analyzers.Internal.Debugging/Program.cs

@@ -1,8 +1,9 @@
-using Terminal.Gui.Analyzers.Internal.Attributes;
+using System.Diagnostics.CodeAnalysis;
+using Terminal.Gui.Analyzers.Internal.Attributes;
 
 
 namespace Terminal.Gui.Analyzers.Internal.Debugging;
 namespace Terminal.Gui.Analyzers.Internal.Debugging;
 
 
-class Program
+static class Program
 {
 {
     static void Main (string [] args)
     static void Main (string [] args)
     {
     {
@@ -11,6 +12,7 @@ class Program
 }
 }
 
 
 [GenerateEnumExtensionMethods]
 [GenerateEnumExtensionMethods]
+[SuppressMessage ("Naming", "CA1711:Identifiers should not have incorrect suffix", Justification = "It's not that deep")]
 public enum TestEnum
 public enum TestEnum
 {
 {
     Zero = 0,
     Zero = 0,

+ 2 - 8
Analyzers/Terminal.Gui.Analyzers.Internal.Tests/Generators/EnumExtensions/EnumDefinitions/EnumMemberValues.cs

@@ -1,11 +1,5 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Terminal.Gui.Analyzers.Internal.Tests.Generators.EnumExtensions.EnumDefinitions;
-internal class SignedEnumMemberValues
+namespace Terminal.Gui.Analyzers.Internal.Tests.Generators.EnumExtensions.EnumDefinitions;
+internal sealed class SignedEnumMemberValues
 {
 {
     internal const int Bit31 = ~0b_01111111_11111111_11111111_11111111;
     internal const int Bit31 = ~0b_01111111_11111111_11111111_11111111;
     internal const int Bit30 =  0b_01000000_00000000_00000000_00000000;
     internal const int Bit30 =  0b_01000000_00000000_00000000_00000000;

+ 2 - 0
Analyzers/Terminal.Gui.Analyzers.Internal.Tests/Generators/EnumExtensions/EnumDefinitions/WithGenerator/BetterEnum.cs

@@ -6,6 +6,8 @@ namespace Terminal.Gui.Analyzers.Internal.Tests.Generators.EnumExtensions.EnumDe
 ///     Same as <see cref="BasicEnum"/>, but with <see cref="GenerateEnumExtensionMethodsAttribute"/> applied.
 ///     Same as <see cref="BasicEnum"/>, but with <see cref="GenerateEnumExtensionMethodsAttribute"/> applied.
 /// </summary>
 /// </summary>
 [GenerateEnumExtensionMethods]
 [GenerateEnumExtensionMethods]
+[SuppressMessage ("Naming", "CA1711:Identifiers should not have incorrect suffix", Justification = "Naming is intentional.")]
+[SuppressMessage ("Roslynator", "RCS1154:Sort enum members", Justification = "Order is intentional.")]
 public enum BetterEnum
 public enum BetterEnum
 {
 {
     Bit31 = -0b_10000000_00000000_00000000_00000000,
     Bit31 = -0b_10000000_00000000_00000000_00000000,

+ 2 - 0
Analyzers/Terminal.Gui.Analyzers.Internal.Tests/Generators/EnumExtensions/EnumDefinitions/WithGenerator/BetterEnum_ExplicitInt.cs

@@ -6,6 +6,8 @@ namespace Terminal.Gui.Analyzers.Internal.Tests.Generators.EnumExtensions.EnumDe
 ///     Same as <see cref="BasicEnum_ExplicitInt"/>, but with <see cref="GenerateEnumExtensionMethodsAttribute"/> applied.
 ///     Same as <see cref="BasicEnum_ExplicitInt"/>, but with <see cref="GenerateEnumExtensionMethodsAttribute"/> applied.
 /// </summary>
 /// </summary>
 [GenerateEnumExtensionMethods]
 [GenerateEnumExtensionMethods]
+[SuppressMessage ("Naming", "CA1711:Identifiers should not have incorrect suffix", Justification = "Naming is intentional.")]
+[SuppressMessage ("Roslynator", "RCS1154:Sort enum members", Justification = "Order is intentional.")]
 public enum BetterEnum_ExplicitInt
 public enum BetterEnum_ExplicitInt
 {
 {
     Bit31 = BasicEnum_ExplicitInt.Bit31,
     Bit31 = BasicEnum_ExplicitInt.Bit31,

+ 2 - 0
Analyzers/Terminal.Gui.Analyzers.Internal.Tests/Generators/EnumExtensions/EnumDefinitions/WithGenerator/BetterEnum_ExplicitInt_NoFastIsDefined.cs

@@ -7,6 +7,8 @@ namespace Terminal.Gui.Analyzers.Internal.Tests.Generators.EnumExtensions.EnumDe
 ///     Same as <see cref="BetterEnum_ExplicitInt"/>, but with <see cref="GenerateEnumExtensionMethodsAttribute.FastIsDefined"/> = <see langword="false" />.
 ///     Same as <see cref="BetterEnum_ExplicitInt"/>, but with <see cref="GenerateEnumExtensionMethodsAttribute.FastIsDefined"/> = <see langword="false" />.
 /// </summary>
 /// </summary>
 [GenerateEnumExtensionMethods (FastIsDefined = false)]
 [GenerateEnumExtensionMethods (FastIsDefined = false)]
+[SuppressMessage ("Naming", "CA1711:Identifiers should not have incorrect suffix", Justification = "Naming is intentional.")]
+[SuppressMessage ("Roslynator", "RCS1154:Sort enum members", Justification = "Order is intentional.")]
 public enum BetterEnum_ExplicitInt_NoFastIsDefined : int
 public enum BetterEnum_ExplicitInt_NoFastIsDefined : int
 {
 {
     Bit31 = -0b_10000000_00000000_00000000_00000000,
     Bit31 = -0b_10000000_00000000_00000000_00000000,

+ 2 - 0
Analyzers/Terminal.Gui.Analyzers.Internal.Tests/Generators/EnumExtensions/EnumDefinitions/WithGenerator/BetterEnum_ExplicitUInt.cs

@@ -6,6 +6,8 @@ namespace Terminal.Gui.Analyzers.Internal.Tests.Generators.EnumExtensions.EnumDe
 ///     Same as <see cref="BasicEnum_ExplicitUInt"/>, but with <see cref="GenerateEnumExtensionMethodsAttribute"/> applied.
 ///     Same as <see cref="BasicEnum_ExplicitUInt"/>, but with <see cref="GenerateEnumExtensionMethodsAttribute"/> applied.
 /// </summary>
 /// </summary>
 [GenerateEnumExtensionMethods]
 [GenerateEnumExtensionMethods]
+[SuppressMessage ("Naming", "CA1711:Identifiers should not have incorrect suffix", Justification = "Naming is intentional.")]
+[SuppressMessage ("Roslynator", "RCS1154:Sort enum members", Justification = "Order is intentional.")]
 public enum BetterEnum_ExplicitUInt : uint
 public enum BetterEnum_ExplicitUInt : uint
 {
 {
     Bit31 = 0b_10000000_00000000_00000000_00000000u,
     Bit31 = 0b_10000000_00000000_00000000_00000000u,

+ 2 - 0
Analyzers/Terminal.Gui.Analyzers.Internal.Tests/Generators/EnumExtensions/EnumDefinitions/WithGenerator/BetterEnum_ExplicitUInt_NoFastIsDefined.cs

@@ -6,6 +6,8 @@ namespace Terminal.Gui.Analyzers.Internal.Tests.Generators.EnumExtensions.EnumDe
 ///     Same as <see cref="BetterEnum_ExplicitUInt"/>, but with <see cref="GenerateEnumExtensionMethodsAttribute.FastIsDefined"/> = <see langword="false" />.
 ///     Same as <see cref="BetterEnum_ExplicitUInt"/>, but with <see cref="GenerateEnumExtensionMethodsAttribute.FastIsDefined"/> = <see langword="false" />.
 /// </summary>
 /// </summary>
 [GenerateEnumExtensionMethods (FastIsDefined = false)]
 [GenerateEnumExtensionMethods (FastIsDefined = false)]
+[SuppressMessage ("Naming", "CA1711:Identifiers should not have incorrect suffix", Justification = "Naming is intentional.")]
+[SuppressMessage ("Roslynator", "RCS1154:Sort enum members", Justification = "Order is intentional.")]
 public enum BetterEnum_ExplicitUInt_NoFastIsDefined : uint
 public enum BetterEnum_ExplicitUInt_NoFastIsDefined : uint
 {
 {
     Bit31 = 0b_10000000_00000000_00000000_00000000u,
     Bit31 = 0b_10000000_00000000_00000000_00000000u,

+ 2 - 0
Analyzers/Terminal.Gui.Analyzers.Internal.Tests/Generators/EnumExtensions/EnumDefinitions/WithGenerator/BetterEnum_NoFastIsDefined.cs

@@ -6,6 +6,8 @@ namespace Terminal.Gui.Analyzers.Internal.Tests.Generators.EnumExtensions.EnumDe
 ///     Same as <see cref="BetterEnum"/>, but with <see cref="GenerateEnumExtensionMethodsAttribute.FastIsDefined"/> = <see langword="false" />.
 ///     Same as <see cref="BetterEnum"/>, but with <see cref="GenerateEnumExtensionMethodsAttribute.FastIsDefined"/> = <see langword="false" />.
 /// </summary>
 /// </summary>
 [GenerateEnumExtensionMethods (FastIsDefined = false)]
 [GenerateEnumExtensionMethods (FastIsDefined = false)]
+[SuppressMessage ("Naming", "CA1711:Identifiers should not have incorrect suffix", Justification = "Naming is intentional.")]
+[SuppressMessage ("Roslynator", "RCS1154:Sort enum members", Justification = "Order is intentional.")]
 public enum BetterEnum_NoFastIsDefined
 public enum BetterEnum_NoFastIsDefined
 {
 {
     Bit31 = -0b_10000000_00000000_00000000_00000000,
     Bit31 = -0b_10000000_00000000_00000000_00000000,

+ 2 - 0
Analyzers/Terminal.Gui.Analyzers.Internal.Tests/Generators/EnumExtensions/EnumDefinitions/WithGenerator/BetterFlagsEnum.cs

@@ -7,6 +7,8 @@ namespace Terminal.Gui.Analyzers.Internal.Tests.Generators.EnumExtensions.EnumDe
 /// </summary>
 /// </summary>
 [Flags]
 [Flags]
 [GenerateEnumExtensionMethods]
 [GenerateEnumExtensionMethods]
+[SuppressMessage ("Naming", "CA1711:Identifiers should not have incorrect suffix", Justification = "Naming is intentional.")]
+[SuppressMessage ("Roslynator", "RCS1154:Sort enum members", Justification = "Order is intentional.")]
 public enum BetterFlagsEnum
 public enum BetterFlagsEnum
 {
 {
     Bit31 = -0b_10000000_00000000_00000000_00000000,
     Bit31 = -0b_10000000_00000000_00000000_00000000,

+ 2 - 0
Analyzers/Terminal.Gui.Analyzers.Internal.Tests/Generators/EnumExtensions/EnumDefinitions/WithGenerator/BetterFlagsEnum_ExplicitInt.cs

@@ -8,6 +8,8 @@ namespace Terminal.Gui.Analyzers.Internal.Tests.Generators.EnumExtensions.EnumDe
 /// </summary>
 /// </summary>
 [Flags]
 [Flags]
 [GenerateEnumExtensionMethods]
 [GenerateEnumExtensionMethods]
+[SuppressMessage ("Naming", "CA1711:Identifiers should not have incorrect suffix", Justification = "Naming is intentional.")]
+[SuppressMessage ("Roslynator", "RCS1154:Sort enum members", Justification = "Order is intentional.")]
 public enum BetterFlagsEnum_ExplicitInt : int
 public enum BetterFlagsEnum_ExplicitInt : int
 {
 {
     Bit31 = -0b_10000000_00000000_00000000_00000000,
     Bit31 = -0b_10000000_00000000_00000000_00000000,

+ 2 - 0
Analyzers/Terminal.Gui.Analyzers.Internal.Tests/Generators/EnumExtensions/EnumDefinitions/WithGenerator/BetterFlagsEnum_ExplicitUInt.cs

@@ -7,6 +7,8 @@ namespace Terminal.Gui.Analyzers.Internal.Tests.Generators.EnumExtensions.EnumDe
 /// </summary>
 /// </summary>
 [Flags]
 [Flags]
 [GenerateEnumExtensionMethods]
 [GenerateEnumExtensionMethods]
+[SuppressMessage ("Naming", "CA1711:Identifiers should not have incorrect suffix", Justification = "Naming is intentional.")]
+[SuppressMessage ("Roslynator", "RCS1154:Sort enum members", Justification = "Order is intentional.")]
 public enum BetterFlagsEnum_ExplicitUInt : uint
 public enum BetterFlagsEnum_ExplicitUInt : uint
 {
 {
     Bit31 = 0b_10000000_00000000_00000000_00000000u,
     Bit31 = 0b_10000000_00000000_00000000_00000000u,

+ 2 - 0
Analyzers/Terminal.Gui.Analyzers.Internal.Tests/Generators/EnumExtensions/EnumDefinitions/WithoutGenerator/BasicEnum.cs

@@ -3,6 +3,8 @@
 /// <summary>
 /// <summary>
 ///     Basic enum without explicitly-defined backing type and no attributes on the enum or any of its members.
 ///     Basic enum without explicitly-defined backing type and no attributes on the enum or any of its members.
 /// </summary>
 /// </summary>
+[SuppressMessage ("Naming", "CA1707:Identifiers should not contain underscores", Justification = "Naming is intentional.")]
+[SuppressMessage ("Roslynator", "RCS1154:Sort enum members", Justification = "Order is intentional.")]
 public enum BasicEnum
 public enum BasicEnum
 {
 {
     Bit31 = -0b_10000000_00000000_00000000_00000000,
     Bit31 = -0b_10000000_00000000_00000000_00000000,

+ 2 - 0
Analyzers/Terminal.Gui.Analyzers.Internal.Tests/Generators/EnumExtensions/EnumDefinitions/WithoutGenerator/BasicEnum_ExplicitInt.cs

@@ -5,6 +5,8 @@ namespace Terminal.Gui.Analyzers.Internal.Tests.Generators.EnumExtensions.EnumDe
 /// <summary>
 /// <summary>
 ///     Basic enum with explicitly-defined backing type of int and no attributes on the enum or any of its members.
 ///     Basic enum with explicitly-defined backing type of int and no attributes on the enum or any of its members.
 /// </summary>
 /// </summary>
+[SuppressMessage ("Naming", "CA1707:Identifiers should not contain underscores", Justification = "Naming is intentional.")]
+[SuppressMessage ("Roslynator", "RCS1154:Sort enum members", Justification = "Order is intentional.")]
 public enum BasicEnum_ExplicitInt : int
 public enum BasicEnum_ExplicitInt : int
 {
 {
     Bit31 = -0b_10000000_00000000_00000000_00000000,
     Bit31 = -0b_10000000_00000000_00000000_00000000,

+ 2 - 0
Analyzers/Terminal.Gui.Analyzers.Internal.Tests/Generators/EnumExtensions/EnumDefinitions/WithoutGenerator/BasicEnum_ExplicitUint.cs

@@ -3,6 +3,8 @@
 /// <summary>
 /// <summary>
 ///     Basic enum with explicitly-defined backing type of uint and no attributes on the enum or any of its members.
 ///     Basic enum with explicitly-defined backing type of uint and no attributes on the enum or any of its members.
 /// </summary>
 /// </summary>
+[SuppressMessage ("Naming", "CA1707:Identifiers should not contain underscores", Justification = "Naming is intentional.")]
+[SuppressMessage ("Roslynator", "RCS1154:Sort enum members", Justification = "Order is intentional.")]
 public enum BasicEnum_ExplicitUInt : uint
 public enum BasicEnum_ExplicitUInt : uint
 {
 {
     Bit31 = 0b_10000000_00000000_00000000_00000000u,
     Bit31 = 0b_10000000_00000000_00000000_00000000u,

+ 2 - 0
Analyzers/Terminal.Gui.Analyzers.Internal.Tests/Generators/EnumExtensions/EnumDefinitions/WithoutGenerator/FlagsEnum.cs

@@ -4,6 +4,8 @@
 ///     Flags enum without explicitly-defined backing type and only a <see cref="FlagsAttribute"/> on the enum declaration No other attributes on the enum or its members..
 ///     Flags enum without explicitly-defined backing type and only a <see cref="FlagsAttribute"/> on the enum declaration No other attributes on the enum or its members..
 /// </summary>
 /// </summary>
 [Flags]
 [Flags]
+[SuppressMessage ("Naming", "CA1707:Identifiers should not contain underscores", Justification = "Naming is intentional.")]
+[SuppressMessage ("Roslynator", "RCS1154:Sort enum members", Justification = "Order is intentional.")]
 public enum FlagsEnum
 public enum FlagsEnum
 {
 {
     Bit31 = -0b_10000000_00000000_00000000_00000000,
     Bit31 = -0b_10000000_00000000_00000000_00000000,

+ 2 - 0
Analyzers/Terminal.Gui.Analyzers.Internal.Tests/Generators/EnumExtensions/EnumDefinitions/WithoutGenerator/FlagsEnum_ExplicitInt.cs

@@ -4,6 +4,8 @@
 ///     Flags enum with explicitly-defined backing type of int and only a <see cref="FlagsAttribute"/> on the enum declaration No other attributes on the enum or its members..
 ///     Flags enum with explicitly-defined backing type of int and only a <see cref="FlagsAttribute"/> on the enum declaration No other attributes on the enum or its members..
 /// </summary>
 /// </summary>
 [Flags]
 [Flags]
+[SuppressMessage ("Naming", "CA1707:Identifiers should not contain underscores", Justification = "Naming is intentional.")]
+[SuppressMessage ("Roslynator", "RCS1154:Sort enum members", Justification = "Order is intentional.")]
 public enum FlagsEnum_ExplicitInt : int
 public enum FlagsEnum_ExplicitInt : int
 {
 {
     Bit31 = -0b_10000000_00000000_00000000_00000000,
     Bit31 = -0b_10000000_00000000_00000000_00000000,

+ 2 - 0
Analyzers/Terminal.Gui.Analyzers.Internal.Tests/Generators/EnumExtensions/EnumDefinitions/WithoutGenerator/FlagsEnum_ExplicitUInt.cs

@@ -4,6 +4,8 @@
 ///     Flags enum with explicitly-defined backing type of uint and only a <see cref="FlagsAttribute"/> on the enum declaration No other attributes on the enum or its members..
 ///     Flags enum with explicitly-defined backing type of uint and only a <see cref="FlagsAttribute"/> on the enum declaration No other attributes on the enum or its members..
 /// </summary>
 /// </summary>
 [Flags]
 [Flags]
+[SuppressMessage ("Naming", "CA1707:Identifiers should not contain underscores", Justification = "Naming is intentional.")]
+[SuppressMessage ("Roslynator", "RCS1154:Sort enum members", Justification = "Order is intentional.")]
 public enum FlagsEnum_ExplicitUInt : uint
 public enum FlagsEnum_ExplicitUInt : uint
 {
 {
     Bit31 = 0b_10000000_00000000_00000000_00000000u,
     Bit31 = 0b_10000000_00000000_00000000_00000000u,

+ 39 - 62
Analyzers/Terminal.Gui.Analyzers.Internal.Tests/Generators/EnumExtensions/EnumExtensionMethodsIncrementalGeneratorTests.cs

@@ -1,12 +1,11 @@
-using System.Collections.Concurrent;
+using System.Collections.Concurrent;
 using System.Collections.ObjectModel;
 using System.Collections.ObjectModel;
-using System.Collections.Specialized;
 using System.Reflection;
 using System.Reflection;
-using System.Runtime.CompilerServices;
 using NUnit.Framework.Interfaces;
 using NUnit.Framework.Interfaces;
 using NUnit.Framework.Internal;
 using NUnit.Framework.Internal;
 using Terminal.Gui.Analyzers.Internal.Attributes;
 using Terminal.Gui.Analyzers.Internal.Attributes;
 using Terminal.Gui.Analyzers.Internal.Generators.EnumExtensions;
 using Terminal.Gui.Analyzers.Internal.Generators.EnumExtensions;
+// ReSharper disable InconsistentNaming
 
 
 namespace Terminal.Gui.Analyzers.Internal.Tests.Generators.EnumExtensions;
 namespace Terminal.Gui.Analyzers.Internal.Tests.Generators.EnumExtensions;
 
 
@@ -14,25 +13,26 @@ namespace Terminal.Gui.Analyzers.Internal.Tests.Generators.EnumExtensions;
 [Category ("Source Generators")]
 [Category ("Source Generators")]
 [TestOf (typeof (EnumExtensionMethodsIncrementalGenerator))]
 [TestOf (typeof (EnumExtensionMethodsIncrementalGenerator))]
 [Parallelizable (ParallelScope.Children)]
 [Parallelizable (ParallelScope.Children)]
+[SuppressMessage ("ReSharper", "ExceptionNotDocumented")]
 public class EnumExtensionMethodsIncrementalGeneratorTests
 public class EnumExtensionMethodsIncrementalGeneratorTests
 {
 {
     private static bool _isInitialized;
     private static bool _isInitialized;
 
 
     /// <summary>All enum types declared in the test assembly.</summary>
     /// <summary>All enum types declared in the test assembly.</summary>
-    private static readonly ObservableCollection<Type> AllEnumTypes = [];
+    private static readonly ObservableCollection<Type> _allEnumTypes = [];
 
 
     /// <summary>
     /// <summary>
-    ///     All enum types without a <see cref="GenerateEnumExtensionMethodsAttribute"/>, <see cref="AllEnumTypes"/>
+    ///     All enum types without a <see cref="GenerateEnumExtensionMethodsAttribute"/>, <see cref="_allEnumTypes"/>
     /// </summary>
     /// </summary>
-    private static readonly HashSet<Type> BoringEnumTypes = [];
+    private static readonly HashSet<Type> _boringEnumTypes = [];
 
 
     /// <summary>All extension classes generated for enums with our attribute.</summary>
     /// <summary>All extension classes generated for enums with our attribute.</summary>
-    private static readonly ObservableCollection<Type> EnumExtensionClasses = [];
+    private static readonly ObservableCollection<Type> _enumExtensionClasses = [];
 
 
-    private static readonly ConcurrentDictionary<Type, EnumData> ExtendedEnumTypeMappings = [];
-    private static IEnumerable<Type> ExtendedEnumTypes => ExtendedEnumTypeMappings.Keys;
+    private static readonly ConcurrentDictionary<Type, EnumData> _extendedEnumTypeMappings = [];
+    private static IEnumerable<Type> ExtendedEnumTypes => _extendedEnumTypeMappings.Keys;
 
 
-    private static readonly ReaderWriterLockSlim InitializationLock = new ();
+    private static readonly ReaderWriterLockSlim _initializationLock = new ();
 
 
     private static IEnumerable<AssemblyExtendedEnumTypeAttribute> GetAssemblyExtendedEnumTypeAttributes () =>
     private static IEnumerable<AssemblyExtendedEnumTypeAttribute> GetAssemblyExtendedEnumTypeAttributes () =>
         Assembly.GetExecutingAssembly ()
         Assembly.GetExecutingAssembly ()
@@ -57,22 +57,19 @@ public class EnumExtensionMethodsIncrementalGeneratorTests
     {
     {
         Assume.That (attr, Is.Not.Null);
         Assume.That (attr, Is.Not.Null);
         Assume.That (attr.EnumType, Is.Not.Null);
         Assume.That (attr.EnumType, Is.Not.Null);
-        Assume.That (attr.EnumType!.IsEnum);
+        Assume.That (attr.EnumType.IsEnum);
 
 
         return attr.EnumType.IsDefined (typeof (GenerateEnumExtensionMethodsAttribute));
         return attr.EnumType.IsDefined (typeof (GenerateEnumExtensionMethodsAttribute));
     }
     }
 
 
-    private const string AssemblyExtendedEnumTypeAttributeEnumPropertyName =
-        $"{nameof (AssemblyExtendedEnumTypeAttribute)}.{nameof (AssemblyExtendedEnumTypeAttribute.EnumType)}";
-
     [Test]
     [Test]
     [Category("Attributes")]
     [Category("Attributes")]
     public void AssemblyExtendedEnumTypeAttribute_ExtensionClassHasExpectedReverseMappingAttribute ([ValueSource(nameof(GetAssemblyExtendedEnumTypeAttributes))]AssemblyExtendedEnumTypeAttribute attr)
     public void AssemblyExtendedEnumTypeAttribute_ExtensionClassHasExpectedReverseMappingAttribute ([ValueSource(nameof(GetAssemblyExtendedEnumTypeAttributes))]AssemblyExtendedEnumTypeAttribute attr)
     {
     {
         Assume.That (attr, Is.Not.Null);
         Assume.That (attr, Is.Not.Null);
         Assume.That (attr.ExtensionClass, Is.Not.Null);
         Assume.That (attr.ExtensionClass, Is.Not.Null);
-        Assume.That (attr.ExtensionClass!.IsClass);
-        Assume.That (attr.ExtensionClass!.IsSealed);
+        Assume.That (attr.ExtensionClass.IsClass);
+        Assume.That (attr.ExtensionClass.IsSealed);
 
 
         Assert.That (attr.ExtensionClass.IsDefined (typeof (ExtensionsForEnumTypeAttribute<>)));
         Assert.That (attr.ExtensionClass.IsDefined (typeof (ExtensionsForEnumTypeAttribute<>)));
     }
     }
@@ -83,13 +80,13 @@ public class EnumExtensionMethodsIncrementalGeneratorTests
     {
     {
         Assume.That (enumData, Is.Not.Null);
         Assume.That (enumData, Is.Not.Null);
         Assume.That (enumData.EnumType, Is.Not.Null);
         Assume.That (enumData.EnumType, Is.Not.Null);
-        Assume.That (enumData.EnumType!.IsEnum);
+        Assume.That (enumData.EnumType.IsEnum);
 
 
         Assert.That (enumData.EnumType, Has.Attribute<GenerateEnumExtensionMethodsAttribute> ());
         Assert.That (enumData.EnumType, Has.Attribute<GenerateEnumExtensionMethodsAttribute> ());
     }
     }
 
 
     [Test]
     [Test]
-    public void BoringEnum_DoesNotHaveExtensions ([ValueSource (nameof (BoringEnumTypes))] Type enumType)
+    public void BoringEnum_DoesNotHaveExtensions ([ValueSource (nameof (_boringEnumTypes))] Type enumType)
     {
     {
         Assume.That (enumType.IsEnum);
         Assume.That (enumType.IsEnum);
 
 
@@ -114,7 +111,6 @@ public class EnumExtensionMethodsIncrementalGeneratorTests
     {
     {
         Assume.That (enumType.IsEnum);
         Assume.That (enumType.IsEnum);
         Assume.That (enumType, Has.Attribute<GenerateEnumExtensionMethodsAttribute> ());
         Assume.That (enumType, Has.Attribute<GenerateEnumExtensionMethodsAttribute> ());
-        ITypeInfo enumTypeInfo = new TypeWrapper (enumType);
         Assume.That (enumType, Has.Attribute<GenerateEnumExtensionMethodsAttribute> ());
         Assume.That (enumType, Has.Attribute<GenerateEnumExtensionMethodsAttribute> ());
     }
     }
 
 
@@ -125,7 +121,7 @@ public class EnumExtensionMethodsIncrementalGeneratorTests
         Assume.That (enumData.EnumType.IsEnum);
         Assume.That (enumData.EnumType.IsEnum);
         Assume.That (enumData.EnumType, Has.Attribute<GenerateEnumExtensionMethodsAttribute> ());
         Assume.That (enumData.EnumType, Has.Attribute<GenerateEnumExtensionMethodsAttribute> ());
         Assume.That (enumData.ExtensionClass, Is.Not.Null);
         Assume.That (enumData.ExtensionClass, Is.Not.Null);
-        ITypeInfo extensionClassTypeInfo = new TypeWrapper (enumData.ExtensionClass!);
+        TypeWrapper extensionClassTypeInfo = new(enumData.ExtensionClass!);
         Assume.That (extensionClassTypeInfo.IsStaticClass);
         Assume.That (extensionClassTypeInfo.IsStaticClass);
         Assume.That (enumData.GeneratorAttribute, Is.Not.Null);
         Assume.That (enumData.GeneratorAttribute, Is.Not.Null);
         Assume.That (enumData.GeneratorAttribute, Is.EqualTo (enumData.EnumType.GetCustomAttribute<GenerateEnumExtensionMethodsAttribute> ()));
         Assume.That (enumData.GeneratorAttribute, Is.EqualTo (enumData.EnumType.GetCustomAttribute<GenerateEnumExtensionMethodsAttribute> ()));
@@ -135,14 +131,14 @@ public class EnumExtensionMethodsIncrementalGeneratorTests
 
 
         Assert.That (fastIsDefinedMethod, Is.Not.Null);
         Assert.That (fastIsDefinedMethod, Is.Not.Null);
         Assert.That (fastIsDefinedMethod, Has.Attribute<ExtensionAttribute> ());
         Assert.That (fastIsDefinedMethod, Has.Attribute<ExtensionAttribute> ());
-        IMethodInfo[] extensionMethods = extensionClassTypeInfo.GetMethodsWithAttribute<ExtensionAttribute> (false);
+        extensionClassTypeInfo.GetMethodsWithAttribute<ExtensionAttribute> (false);
 
 
 
 
     }
     }
 
 
     private static IEnumerable<EnumData> GetExtendedEnum_EnumData ()
     private static IEnumerable<EnumData> GetExtendedEnum_EnumData ()
     {
     {
-        InitializationLock.EnterUpgradeableReadLock ();
+        _initializationLock.EnterUpgradeableReadLock ();
 
 
         try
         try
         {
         {
@@ -151,36 +147,17 @@ public class EnumExtensionMethodsIncrementalGeneratorTests
                 Initialize ();
                 Initialize ();
             }
             }
 
 
-            return ExtendedEnumTypeMappings.Values;
+            return _extendedEnumTypeMappings.Values;
         }
         }
         finally
         finally
         {
         {
-            InitializationLock.ExitUpgradeableReadLock ();
-        }
-    }
-
-    private static IEnumerable<Type> GetBoringEnumTypes ()
-    {
-        InitializationLock.EnterUpgradeableReadLock ();
-
-        try
-        {
-            if (!_isInitialized)
-            {
-                Initialize ();
-            }
-
-            return BoringEnumTypes;
-        }
-        finally
-        {
-            InitializationLock.ExitUpgradeableReadLock ();
+            _initializationLock.ExitUpgradeableReadLock ();
         }
         }
     }
     }
 
 
     private static IEnumerable<EnumData> GetExtendedEnumTypes_FastIsDefinedFalse ()
     private static IEnumerable<EnumData> GetExtendedEnumTypes_FastIsDefinedFalse ()
     {
     {
-        InitializationLock.EnterUpgradeableReadLock ();
+        _initializationLock.EnterUpgradeableReadLock ();
 
 
         try
         try
         {
         {
@@ -189,17 +166,17 @@ public class EnumExtensionMethodsIncrementalGeneratorTests
                 Initialize ();
                 Initialize ();
             }
             }
 
 
-            return ExtendedEnumTypeMappings.Values.Where (static t => t.GeneratorAttribute?.FastIsDefined is false);
+            return _extendedEnumTypeMappings.Values.Where (static t => t.GeneratorAttribute?.FastIsDefined is false);
         }
         }
         finally
         finally
         {
         {
-            InitializationLock.ExitUpgradeableReadLock ();
+            _initializationLock.ExitUpgradeableReadLock ();
         }
         }
     }
     }
 
 
     private static IEnumerable<EnumData> GetExtendedEnumTypes_FastIsDefinedTrue ()
     private static IEnumerable<EnumData> GetExtendedEnumTypes_FastIsDefinedTrue ()
     {
     {
-        InitializationLock.EnterUpgradeableReadLock ();
+        _initializationLock.EnterUpgradeableReadLock ();
 
 
         try
         try
         {
         {
@@ -208,17 +185,17 @@ public class EnumExtensionMethodsIncrementalGeneratorTests
                 Initialize ();
                 Initialize ();
             }
             }
 
 
-            return ExtendedEnumTypeMappings.Values.Where (static t => t.GeneratorAttribute?.FastIsDefined is true);
+            return _extendedEnumTypeMappings.Values.Where (static t => t.GeneratorAttribute?.FastIsDefined is true);
         }
         }
         finally
         finally
         {
         {
-            InitializationLock.ExitUpgradeableReadLock ();
+            _initializationLock.ExitUpgradeableReadLock ();
         }
         }
     }
     }
 
 
     private static void Initialize ()
     private static void Initialize ()
     {
     {
-        if (!InitializationLock.IsUpgradeableReadLockHeld || !InitializationLock.TryEnterWriteLock (5000))
+        if (!_initializationLock.IsUpgradeableReadLockHeld || !_initializationLock.TryEnterWriteLock (5000))
         {
         {
             return;
             return;
         }
         }
@@ -230,30 +207,28 @@ public class EnumExtensionMethodsIncrementalGeneratorTests
                 return;
                 return;
             }
             }
 
 
-            AllEnumTypes.CollectionChanged += AllEnumTypes_CollectionChanged;
-            EnumExtensionClasses.CollectionChanged += EnumExtensionClasses_OnCollectionChanged;
+            _allEnumTypes.CollectionChanged += AllEnumTypes_CollectionChanged;
+            _enumExtensionClasses.CollectionChanged += EnumExtensionClasses_OnCollectionChanged;
 
 
             Type [] allAssemblyTypes = Assembly
             Type [] allAssemblyTypes = Assembly
                                        .GetExecutingAssembly ()
                                        .GetExecutingAssembly ()
                                        .GetTypes ();
                                        .GetTypes ();
 
 
-            IEnumerable<Type> allEnumTypes = allAssemblyTypes.Where (IsDefinedEnum);
-
-            foreach (Type type in allEnumTypes)
+            foreach (Type type in allAssemblyTypes.Where (IsDefinedEnum))
             {
             {
-                AllEnumTypes.Add (type);
+                _allEnumTypes.Add (type);
             }
             }
 
 
-            foreach (Type type in allAssemblyTypes.Where (static t => t.IsClass && t.IsDefined (typeof (ExtensionsForEnumTypeAttribute<>))))
+            foreach (Type type in allAssemblyTypes.Where (HasExtensionForEnumTypeAttribute))
             {
             {
-                EnumExtensionClasses.Add (type);
+                _enumExtensionClasses.Add (type);
             }
             }
 
 
             _isInitialized = true;
             _isInitialized = true;
         }
         }
         finally
         finally
         {
         {
-            InitializationLock.ExitWriteLock ();
+            _initializationLock.ExitWriteLock ();
         }
         }
 
 
         return;
         return;
@@ -271,12 +246,12 @@ public class EnumExtensionMethodsIncrementalGeneratorTests
             {
             {
                 if (enumType.GetCustomAttribute<GenerateEnumExtensionMethodsAttribute> () is not { } generatorAttribute)
                 if (enumType.GetCustomAttribute<GenerateEnumExtensionMethodsAttribute> () is not { } generatorAttribute)
                 {
                 {
-                    BoringEnumTypes.Add (enumType);
+                    _boringEnumTypes.Add (enumType);
 
 
                     continue;
                     continue;
                 }
                 }
 
 
-                ExtendedEnumTypeMappings.AddOrUpdate (
+                _extendedEnumTypeMappings.AddOrUpdate (
                                                enumType,
                                                enumType,
                                                CreateNewEnumData,
                                                CreateNewEnumData,
                                                UpdateGeneratorAttributeProperty,
                                                UpdateGeneratorAttributeProperty,
@@ -310,11 +285,13 @@ public class EnumExtensionMethodsIncrementalGeneratorTests
                     continue;
                     continue;
                 }
                 }
 
 
-                ExtendedEnumTypeMappings [extensionForAttribute.EnumType].ExtensionClass ??= extensionClassType;
+                _extendedEnumTypeMappings [extensionForAttribute.EnumType].ExtensionClass ??= extensionClassType;
             }
             }
         }
         }
     }
     }
 
 
+    private static bool HasExtensionForEnumTypeAttribute (Type t) => t.IsClass && t.IsDefined (typeof (ExtensionsForEnumTypeAttribute<>));
+
     public sealed record EnumData (
     public sealed record EnumData (
         Type EnumType,
         Type EnumType,
         GenerateEnumExtensionMethodsAttribute? GeneratorAttribute = null,
         GenerateEnumExtensionMethodsAttribute? GeneratorAttribute = null,

+ 3 - 0
Analyzers/Terminal.Gui.Analyzers.Internal.Tests/GlobalSuppressions.cs

@@ -0,0 +1,3 @@
+[assembly: SuppressMessage ("Naming", "CA1707:Identifiers should not contain underscores", Scope = "module", Justification = "Naming is intentional.")]
+[assembly: SuppressMessage ("Roslynator", "RCS1154:Sort enum members", Scope = "module", Justification = "Order is intentional.")]
+[assembly: SuppressMessage ("Naming", "CA1711:Identifiers should not have incorrect suffix", Scope = "module", Justification = "Naming is intentional.")]

+ 1 - 0
Analyzers/Terminal.Gui.Analyzers.Internal.Tests/Terminal.Gui.Analyzers.Internal.Tests.csproj

@@ -42,6 +42,7 @@
     <Using Include="Terminal.Gui" />
     <Using Include="Terminal.Gui" />
     <Using Include="Terminal.Gui.Analyzers" />
     <Using Include="Terminal.Gui.Analyzers" />
     <Using Include="Terminal.Gui.Analyzers.Internal" />
     <Using Include="Terminal.Gui.Analyzers.Internal" />
+    <Using Include="System.Diagnostics.CodeAnalysis" />
   </ItemGroup>
   </ItemGroup>
 
 
 </Project>
 </Project>

+ 3 - 0
Analyzers/Terminal.Gui.Analyzers.Internal/GlobalSuppressions.cs

@@ -0,0 +1,3 @@
+using System.Diagnostics.CodeAnalysis;
+
+[assembly: SuppressMessage ("Naming", "CA1708:Names should differ by more than case", Scope = "module", Justification = "That's coming from an external generator.")]

+ 1 - 1
Directory.Build.props

@@ -1,6 +1,6 @@
 <Project>
 <Project>
   <ItemGroup>
   <ItemGroup>
     <PackageReference Include="JetBrains.Annotations" Version="2023.3.0" PrivateAssets="all" />
     <PackageReference Include="JetBrains.Annotations" Version="2023.3.0" PrivateAssets="all" />
-    <PackageReference Include="JetBrains.ExternalAnnotations" Version="10.2.147" PrivateAssets="all" />
+    <PackageReference Include="JetBrains.ExternalAnnotations" Version="10.2.149" PrivateAssets="all" />
   </ItemGroup>
   </ItemGroup>
 </Project>
 </Project>

+ 12 - 0
NoSamples.slnf

@@ -0,0 +1,12 @@
+{
+  "solution": {
+    "path": "Terminal.sln",
+    "projects": [
+      "Analyzers\\Terminal.Gui.Analyzers.Internal.Tests\\Terminal.Gui.Analyzers.Internal.Tests.csproj",
+      "Analyzers\\Terminal.Gui.Analyzers.Internal\\Terminal.Gui.Analyzers.Internal.csproj",
+      "Terminal.Gui\\Terminal.Gui.csproj",
+      "UICatalog\\UICatalog.csproj",
+      "UnitTests\\UnitTests.csproj"
+    ]
+  }
+}

+ 11 - 0
Release.slnf

@@ -0,0 +1,11 @@
+{
+  "solution": {
+    "path": "Terminal.sln",
+    "projects": [
+      "Analyzers\\Terminal.Gui.Analyzers.Internal\\Terminal.Gui.Analyzers.Internal.csproj",
+      "Terminal.Gui\\Terminal.Gui.csproj",
+      "UICatalog\\UICatalog.csproj",
+      "UnitTests\\UnitTests.csproj"
+    ]
+  }
+}

+ 3 - 0
Terminal.Gui/Configuration/SettingsScope.cs

@@ -118,6 +118,9 @@ public class SettingsScope : Scope<SettingsScope>
             return this;
             return this;
         }
         }
 
 
+        // BUG: Not trim-compatible
+        // Not a bug, per se, but it's easily fixable by just loading the file.
+        // Defaults can just be field initializers for involved types.
         using Stream? stream = assembly.GetManifestResourceStream (resourceName)!;
         using Stream? stream = assembly.GetManifestResourceStream (resourceName)!;
 
 
         if (stream is null)
         if (stream is null)

+ 1 - 1
Terminal.Gui/Resources/Strings.pt-PT.resx

@@ -166,7 +166,7 @@
     <value>Acabam_ento</value>
     <value>Acabam_ento</value>
   </data>
   </data>
   <data name="wzNext" xml:space="preserve">
   <data name="wzNext" xml:space="preserve">
-    <value>S_eguir</value>
+    <value>S_eguir...</value>
   </data>
   </data>
   <data name="btnSaveAs" xml:space="preserve">
   <data name="btnSaveAs" xml:space="preserve">
     <value>Guardar como</value>
     <value>Guardar como</value>

+ 30 - 26
Terminal.Gui/Terminal.Gui.csproj

@@ -1,4 +1,4 @@
-<Project Sdk="Microsoft.NET.Sdk">
+<Project Sdk="Microsoft.NET.Sdk">
   <!-- =================================================================== -->
   <!-- =================================================================== -->
   <!-- Version numbers -->
   <!-- Version numbers -->
   <!-- Automatically updated by gitversion (run `dotnet-gitversion /updateprojectfiles`)  -->
   <!-- Automatically updated by gitversion (run `dotnet-gitversion /updateprojectfiles`)  -->
@@ -7,28 +7,35 @@
   <PropertyGroup>
   <PropertyGroup>
     <Version>2.0.0</Version>
     <Version>2.0.0</Version>
   </PropertyGroup>
   </PropertyGroup>
+  <!-- =================================================================== -->
+  <!-- Assembly name. -->
+  <!-- Referenced throughout this file for consistency. -->
+  <!-- =================================================================== -->
+<PropertyGroup>
+  <AssemblyName>Terminal.Gui</AssemblyName>
+</PropertyGroup>
+
   <!-- =================================================================== -->
   <!-- =================================================================== -->
   <!-- .NET Build Settings -->
   <!-- .NET Build Settings -->
   <!-- =================================================================== -->
   <!-- =================================================================== -->
   <PropertyGroup>
   <PropertyGroup>
     <TargetFrameworks>net8.0</TargetFrameworks>
     <TargetFrameworks>net8.0</TargetFrameworks>
     <LangVersion>12</LangVersion>
     <LangVersion>12</LangVersion>
-    <RootNamespace>Terminal.Gui</RootNamespace>
-    <AssemblyName>Terminal.Gui</AssemblyName>
+    <RootNamespace>$(AssemblyName)</RootNamespace>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
-    <DefineTrace>True</DefineTrace>
+    <DefineTrace>true</DefineTrace>
     <DebugType>portable</DebugType>
     <DebugType>portable</DebugType>
     <DefineConstants>$(DefineConstants);JETBRAINS_ANNOTATIONS;CONTRACTS_FULL;CODE_ANALYSIS</DefineConstants>
     <DefineConstants>$(DefineConstants);JETBRAINS_ANNOTATIONS;CONTRACTS_FULL;CODE_ANALYSIS</DefineConstants>
     <ImplicitUsings>enable</ImplicitUsings>
     <ImplicitUsings>enable</ImplicitUsings>
-    <NoLogo>True</NoLogo>
+    <NoLogo>true</NoLogo>
     <SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
     <SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
   </PropertyGroup>
   </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DefineDebug>True</DefineDebug>
+  <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
+    <DefineDebug>true</DefineDebug>
     <DefineConstants>$(DefineConstants);DEBUG_IDISPOSABLE</DefineConstants>
     <DefineConstants>$(DefineConstants);DEBUG_IDISPOSABLE</DefineConstants>
   </PropertyGroup>
   </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <Optimize>True</Optimize>
+  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
+    <Optimize>true</Optimize>
     <VersionSuffix></VersionSuffix>
     <VersionSuffix></VersionSuffix>
   </PropertyGroup>
   </PropertyGroup>
   <!-- =================================================================== -->
   <!-- =================================================================== -->
@@ -36,8 +43,6 @@
   <!-- =================================================================== -->
   <!-- =================================================================== -->
   <ItemGroup>
   <ItemGroup>
     <None Remove="Resources\config.json" />
     <None Remove="Resources\config.json" />
-  </ItemGroup>
-  <ItemGroup>
     <EmbeddedResource Include="Resources\config.json" />
     <EmbeddedResource Include="Resources\config.json" />
   </ItemGroup>
   </ItemGroup>
   <!-- =================================================================== -->
   <!-- =================================================================== -->
@@ -45,12 +50,12 @@
   <!-- =================================================================== -->
   <!-- =================================================================== -->
   <ItemGroup>
   <ItemGroup>
     <PackageReference Include="ColorHelper" Version="1.8.1" />
     <PackageReference Include="ColorHelper" Version="1.8.1" />
-    <PackageReference Include="JetBrains.Annotations" Version="2023.3.0" PrivateAssets="All" />
+    <PackageReference Include="JetBrains.Annotations" Version="2023.3.0" PrivateAssets="all" />
     <PackageReference Include="Microsoft.CodeAnalysis" Version="4.9.2" PrivateAssets="all" />
     <PackageReference Include="Microsoft.CodeAnalysis" Version="4.9.2" PrivateAssets="all" />
     <PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.9.2" PrivateAssets="all" />
     <PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.9.2" PrivateAssets="all" />
     <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.9.2" PrivateAssets="all" />
     <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.9.2" PrivateAssets="all" />
     <!-- Enable Nuget Source Link for github -->
     <!-- Enable Nuget Source Link for github -->
-    <PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
+    <PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="all" />
     <PackageReference Include="System.IO.Abstractions" Version="21.0.2" />
     <PackageReference Include="System.IO.Abstractions" Version="21.0.2" />
     <PackageReference Include="System.Text.Json" Version="8.0.3" />
     <PackageReference Include="System.Text.Json" Version="8.0.3" />
     <PackageReference Include="Wcwidth" Version="2.0.0" />
     <PackageReference Include="Wcwidth" Version="2.0.0" />
@@ -70,7 +75,7 @@
     <Using Include="System.Text" />
     <Using Include="System.Text" />
   </ItemGroup>
   </ItemGroup>
   <!-- =================================================================== -->
   <!-- =================================================================== -->
-  <!-- Namespaces for which internal items are visible -->
+  <!-- Assembliy names for which internal items are visible -->
   <!-- =================================================================== -->
   <!-- =================================================================== -->
   <ItemGroup>
   <ItemGroup>
     <InternalsVisibleTo Include="UnitTests" />
     <InternalsVisibleTo Include="UnitTests" />
@@ -81,11 +86,11 @@
   <!-- =================================================================== -->
   <!-- =================================================================== -->
   <ItemGroup>
   <ItemGroup>
     <None Include="..\docfx\images\logo.png">
     <None Include="..\docfx\images\logo.png">
-      <Pack>True</Pack>
+      <Pack>true</Pack>
       <PackagePath>\</PackagePath>
       <PackagePath>\</PackagePath>
     </None>
     </None>
     <None Include="..\README.md">
     <None Include="..\README.md">
-      <Pack>True</Pack>
+      <Pack>true</Pack>
       <PackagePath>\</PackagePath>
       <PackagePath>\</PackagePath>
     </None>
     </None>
   </ItemGroup>
   </ItemGroup>
@@ -94,8 +99,8 @@
   <!-- =================================================================== -->
   <!-- =================================================================== -->
   <ItemGroup>
   <ItemGroup>
     <Compile Update="Resources\Strings.Designer.cs">
     <Compile Update="Resources\Strings.Designer.cs">
-      <DesignTime>True</DesignTime>
-      <AutoGen>True</AutoGen>
+      <DesignTime>true</DesignTime>
+      <AutoGen>true</AutoGen>
       <DependentUpon>Strings.resx</DependentUpon>
       <DependentUpon>Strings.resx</DependentUpon>
     </Compile>
     </Compile>
   </ItemGroup>
   </ItemGroup>
@@ -109,33 +114,32 @@
   <!-- Nuget  -->
   <!-- Nuget  -->
   <!-- =================================================================== -->
   <!-- =================================================================== -->
   <PropertyGroup>
   <PropertyGroup>
-    <PackageId>Terminal.Gui</PackageId>
+    <PackageId>$(AssemblyName)</PackageId>
     <PackageLicenseExpression>MIT</PackageLicenseExpression>
     <PackageLicenseExpression>MIT</PackageLicenseExpression>
-    <PackageProjectUrl>https://github.com/gui-cs/Terminal.Gui/</PackageProjectUrl>
+    <PackageProjectUrl>https://github.com/gui-cs/$(AssemblyName)</PackageProjectUrl>
     <PackageIcon>logo.png</PackageIcon>
     <PackageIcon>logo.png</PackageIcon>
     <PackageReadmeFile>README.md</PackageReadmeFile>
     <PackageReadmeFile>README.md</PackageReadmeFile>
     <PackageTags>csharp, terminal, c#, f#, gui, toolkit, console, tui</PackageTags>
     <PackageTags>csharp, terminal, c#, f#, gui, toolkit, console, tui</PackageTags>
     <Description>Cross platform Terminal UI toolkit for .NET</Description>
     <Description>Cross platform Terminal UI toolkit for .NET</Description>
     <Owners>Miguel de Icaza, Tig Kindel</Owners>
     <Owners>Miguel de Icaza, Tig Kindel</Owners>
     <Summary>A toolkit for building rich console apps for .NET that works on Windows, Mac, and Linux/Unix.</Summary>
     <Summary>A toolkit for building rich console apps for .NET that works on Windows, Mac, and Linux/Unix.</Summary>
-    <Title>Terminal.Gui - Cross platform Terminal User Interface (TUI) toolkit for .NET</Title>
+    <Title>$(AssemblyName) - Cross-platform Terminal User Interface (TUI) toolkit for .NET</Title>
     <PackageReleaseNotes>
     <PackageReleaseNotes>
-      See: https://github.com/gui-cs/Terminal.Gui/releases
+      See: $(PackageProjectUrl)/releases
     </PackageReleaseNotes>
     </PackageReleaseNotes>
-    <DocumentationFile>bin\$(Configuration)\Terminal.Gui.xml</DocumentationFile>
+    <DocumentationFile>bin\$(Configuration)\$(AssemblyName).xml</DocumentationFile>
     <GeneratePackageOnBuild Condition=" '$(Configuration)' == 'Debug' ">true</GeneratePackageOnBuild>
     <GeneratePackageOnBuild Condition=" '$(Configuration)' == 'Debug' ">true</GeneratePackageOnBuild>
     <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
     <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
-    <RepositoryUrl>https://github.com/gui-cs/Terminal.Gui.git</RepositoryUrl>
+    <RepositoryUrl>https://github.com/gui-cs/$(AssemblyName).git</RepositoryUrl>
     <RepositoryType>git</RepositoryType>
     <RepositoryType>git</RepositoryType>
     <IncludeSymbols>true</IncludeSymbols>
     <IncludeSymbols>true</IncludeSymbols>
     <SymbolPackageFormat>snupkg</SymbolPackageFormat>
     <SymbolPackageFormat>snupkg</SymbolPackageFormat>
     <!-- Publish the repository URL in the built .nupkg (in the NuSpec <Repository> element) -->
     <!-- Publish the repository URL in the built .nupkg (in the NuSpec <Repository> element) -->
     <PublishRepositoryUrl>true</PublishRepositoryUrl>
     <PublishRepositoryUrl>true</PublishRepositoryUrl>
-    <!-- Embed source files that are not tracked by the source control manager in the PDB -->
     <GitRepositoryRemoteName>upstream</GitRepositoryRemoteName>
     <GitRepositoryRemoteName>upstream</GitRepositoryRemoteName>
+    <!-- Embed source files that are not tracked by the source control manager in the PDB -->
     <EmbedUntrackedSources>true</EmbedUntrackedSources>
     <EmbedUntrackedSources>true</EmbedUntrackedSources>
     <EnableSourceLink>true</EnableSourceLink>
     <EnableSourceLink>true</EnableSourceLink>
     <Authors>Miguel de Icaza, Tig Kindel (@tig), @BDisp</Authors>
     <Authors>Miguel de Icaza, Tig Kindel (@tig), @BDisp</Authors>
-    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
   </PropertyGroup>
   </PropertyGroup>
 </Project>
 </Project>

+ 35 - 21
Terminal.sln

@@ -13,22 +13,6 @@ EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Example", "Example\Example.csproj", "{B0A602CD-E176-449D-8663-64238D54F857}"
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Example", "Example\Example.csproj", "{B0A602CD-E176-449D-8663-64238D54F857}"
 EndProject
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E143FB1F-0B88-48CB-9086-72CDCECFCD22}"
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E143FB1F-0B88-48CB-9086-72CDCECFCD22}"
-	ProjectSection(SolutionItems) = preProject
-		.editorconfig = .editorconfig
-		.gitignore = .gitignore
-		.github\workflows\api-docs.yml = .github\workflows\api-docs.yml
-		.github\CODEOWNERS = .github\CODEOWNERS
-		CODE_OF_CONDUCT.md = CODE_OF_CONDUCT.md
-		CONTRIBUTING.md = CONTRIBUTING.md
-		.github\workflows\dotnet-core.yml = .github\workflows\dotnet-core.yml
-		GitVersion.yml = GitVersion.yml
-		global.json = global.json
-		nuget.config = nuget.config
-		.github\workflows\publish.yml = .github\workflows\publish.yml
-		README.md = README.md
-		Terminal.sln.DotSettings = Terminal.sln.DotSettings
-		testenvironments.json = testenvironments.json
-	EndProjectSection
 EndProject
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Analyzers", "Analyzers", "{CCADA0BC-61CF-4B4B-96BA-A3B0C0A7F54D}"
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Analyzers", "Analyzers", "{CCADA0BC-61CF-4B4B-96BA-A3B0C0A7F54D}"
 EndProject
 EndProject
@@ -40,12 +24,34 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Terminal.Gui.Analyzers.Inte
 EndProject
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CommunityToolkitExample", "CommunityToolkitExample\CommunityToolkitExample.csproj", "{58FDCA8F-08F7-4D80-9DA3-6A9AED01E163}"
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CommunityToolkitExample", "CommunityToolkitExample\CommunityToolkitExample.csproj", "{58FDCA8F-08F7-4D80-9DA3-6A9AED01E163}"
 EndProject
 EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Settings", "Settings", "{B8F48EE8-34A6-43B7-B00E-CD91CDD93962}"
+	ProjectSection(SolutionItems) = preProject
+		.editorconfig = .editorconfig
+		.filenesting.json = .filenesting.json
+		.gitignore = .gitignore
+		global.json = global.json
+		nuget.config = nuget.config
+		Terminal.sln.DotSettings = Terminal.sln.DotSettings
+		testenvironments.json = testenvironments.json
+	EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GitHub", "GitHub", "{13BB2C46-B324-4B9C-92EB-CE6184D4736E}"
+	ProjectSection(SolutionItems) = preProject
+		.github\workflows\api-docs.yml = .github\workflows\api-docs.yml
+		.github\workflows\dotnet-core.yml = .github\workflows\dotnet-core.yml
+		GitVersion.yml = GitVersion.yml
+		.github\workflows\publish.yml = .github\workflows\publish.yml
+	EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docs", "Docs", "{C7A51224-5E0F-4986-AB37-A6BF89966C12}"
+	ProjectSection(SolutionItems) = preProject
+		.github\CODEOWNERS = .github\CODEOWNERS
+		CODE_OF_CONDUCT.md = CODE_OF_CONDUCT.md
+		CONTRIBUTING.md = CONTRIBUTING.md
+		README.md = README.md
+	EndProjectSection
+EndProject
 Global
 Global
-	GlobalSection(NestedProjects) = preSolution
-		{5DE91722-8765-4E2B-97E4-2A18010B5CED} = {CCADA0BC-61CF-4B4B-96BA-A3B0C0A7F54D}
-		{715DB4BA-F989-4DF6-B46F-5ED26A32B2DD} = {CCADA0BC-61CF-4B4B-96BA-A3B0C0A7F54D}
-		{C2AD09BD-D579-45A7-ACA3-E4EF3BC027D2} = {CCADA0BC-61CF-4B4B-96BA-A3B0C0A7F54D}
-	EndGlobalSection
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
 		Debug|Any CPU = Debug|Any CPU
 		Release|Any CPU = Release|Any CPU
 		Release|Any CPU = Release|Any CPU
@@ -91,6 +97,14 @@ Global
 	GlobalSection(SolutionProperties) = preSolution
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
 		HideSolutionNode = FALSE
 	EndGlobalSection
 	EndGlobalSection
+	GlobalSection(NestedProjects) = preSolution
+		{5DE91722-8765-4E2B-97E4-2A18010B5CED} = {CCADA0BC-61CF-4B4B-96BA-A3B0C0A7F54D}
+		{715DB4BA-F989-4DF6-B46F-5ED26A32B2DD} = {CCADA0BC-61CF-4B4B-96BA-A3B0C0A7F54D}
+		{C2AD09BD-D579-45A7-ACA3-E4EF3BC027D2} = {CCADA0BC-61CF-4B4B-96BA-A3B0C0A7F54D}
+		{B8F48EE8-34A6-43B7-B00E-CD91CDD93962} = {E143FB1F-0B88-48CB-9086-72CDCECFCD22}
+		{13BB2C46-B324-4B9C-92EB-CE6184D4736E} = {E143FB1F-0B88-48CB-9086-72CDCECFCD22}
+		{C7A51224-5E0F-4986-AB37-A6BF89966C12} = {E143FB1F-0B88-48CB-9086-72CDCECFCD22}
+	EndGlobalSection
 	GlobalSection(ExtensibilityGlobals) = postSolution
 	GlobalSection(ExtensibilityGlobals) = postSolution
 		SolutionGuid = {9F8F8A4D-7B8D-4C2A-AC5E-CD7117F74C03}
 		SolutionGuid = {9F8F8A4D-7B8D-4C2A-AC5E-CD7117F74C03}
 	EndGlobalSection
 	EndGlobalSection

+ 3 - 1
Terminal.sln.DotSettings

@@ -1,4 +1,4 @@
-<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
+<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
 	<s:String x:Key="/Default/CodeEditing/GenerateMemberBody/AccessorImplementationKind/@EntryValue">BackingField</s:String>
 	<s:String x:Key="/Default/CodeEditing/GenerateMemberBody/AccessorImplementationKind/@EntryValue">BackingField</s:String>
 	<s:String x:Key="/Default/CodeEditing/GenerateMemberBody/DocumentationGenerationKind/@EntryValue">Inherit</s:String>
 	<s:String x:Key="/Default/CodeEditing/GenerateMemberBody/DocumentationGenerationKind/@EntryValue">Inherit</s:String>
 	<s:Boolean x:Key="/Default/CodeEditing/GenerateMemberBody/PlaceBackingFieldAboveProperty/@EntryValue">True</s:Boolean>
 	<s:Boolean x:Key="/Default/CodeEditing/GenerateMemberBody/PlaceBackingFieldAboveProperty/@EntryValue">True</s:Boolean>
@@ -441,5 +441,7 @@
 	<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:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=B0C2F2A1AF61DA42BBF270980E3DCEF7/TodoIconStyle/@EntryValue">Warning</s:String>
 	<s:Boolean x:Key="/Default/UserDictionary/Words/=Justifier/@EntryIndexedValue">True</s:Boolean>
 	<s:Boolean x:Key="/Default/UserDictionary/Words/=Justifier/@EntryIndexedValue">True</s:Boolean>
+	<s:Boolean x:Key="/Default/UserDictionary/Words/=langword/@EntryIndexedValue">True</s:Boolean>
+	<s:Boolean x:Key="/Default/UserDictionary/Words/=Roslynator/@EntryIndexedValue">True</s:Boolean>
 	<s:Boolean x:Key="/Default/UserDictionary/Words/=unsynchronized/@EntryIndexedValue">True</s:Boolean>
 	<s:Boolean x:Key="/Default/UserDictionary/Words/=unsynchronized/@EntryIndexedValue">True</s:Boolean>
 </wpf:ResourceDictionary>
 </wpf:ResourceDictionary>

+ 4 - 3
UICatalog/UICatalog.csproj

@@ -1,8 +1,9 @@
-<Project Sdk="Microsoft.NET.Sdk">
+<Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
   <PropertyGroup>
     <OutputType>Exe</OutputType>
     <OutputType>Exe</OutputType>
     <TargetFramework>net8.0</TargetFramework>
     <TargetFramework>net8.0</TargetFramework>
     <StartupObject>UICatalog.UICatalogApp</StartupObject>
     <StartupObject>UICatalog.UICatalogApp</StartupObject>
+    <LangVersion>12</LangVersion>
     <!-- Version numbers are automatically updated by gitversion when a release is released -->
     <!-- 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. -->
     <!-- In the source tree the version will always be 2.0 for all projects. -->
     <!-- Do not modify these. -->
     <!-- Do not modify these. -->
@@ -12,10 +13,10 @@
     <InformationalVersion>2.0</InformationalVersion>
     <InformationalVersion>2.0</InformationalVersion>
     <DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
     <DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
   </PropertyGroup>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
+  <PropertyGroup Condition="'$(Configuration)'=='Release'">
     <DefineConstants>TRACE</DefineConstants>
     <DefineConstants>TRACE</DefineConstants>
   </PropertyGroup>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
+  <PropertyGroup Condition="'$(Configuration)'=='Debug'">
     <DefineConstants>TRACE;DEBUG_IDISPOSABLE</DefineConstants>
     <DefineConstants>TRACE;DEBUG_IDISPOSABLE</DefineConstants>
   </PropertyGroup>
   </PropertyGroup>
   <ItemGroup>
   <ItemGroup>

+ 0 - 15
UnitTests/.filenesting.json

@@ -1,15 +0,0 @@
-{
-  "help": "https://go.microsoft.com/fwlink/?linkid=866610",
-  "root": false,
-  "dependentFileProviders": {
-    "add": {
-      "pathSegment": {
-        "add": {
-          ".*": [
-            ".cs"
-          ]
-        }
-      }
-    }
-  }
-}

+ 7 - 9
UnitTests/UnitTests.csproj

@@ -1,4 +1,4 @@
-<Project Sdk="Microsoft.NET.Sdk">
+<Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
   <PropertyGroup>
     <!-- Version numbers are automatically updated by gitversion when a release is released -->
     <!-- 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. -->
     <!-- In the source tree the version will always be 2.0 for all projects. -->
@@ -14,19 +14,19 @@
     <IsPackable>false</IsPackable>
     <IsPackable>false</IsPackable>
     <UseDataCollector />
     <UseDataCollector />
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
-    <DefineTrace>True</DefineTrace>
+    <DefineTrace>true</DefineTrace>
     <DebugType>portable</DebugType>
     <DebugType>portable</DebugType>
     <DefineConstants>$(DefineConstants);JETBRAINS_ANNOTATIONS;CONTRACTS_FULL</DefineConstants>
     <DefineConstants>$(DefineConstants);JETBRAINS_ANNOTATIONS;CONTRACTS_FULL</DefineConstants>
     <ImplicitUsings>enable</ImplicitUsings>
     <ImplicitUsings>enable</ImplicitUsings>
-    <NoLogo>True</NoLogo>
+    <NoLogo>true</NoLogo>
     <SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
     <SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
   </PropertyGroup>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
-    <DefineDebug>True</DefineDebug>
+  <PropertyGroup Condition="'$(Configuration)'=='Debug'">
+    <DefineDebug>true</DefineDebug>
     <DefineConstants>$(DefineConstants);DEBUG_IDISPOSABLE</DefineConstants>
     <DefineConstants>$(DefineConstants);DEBUG_IDISPOSABLE</DefineConstants>
   </PropertyGroup>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
-    <Optimize>True</Optimize>
+  <PropertyGroup Condition="'$(Configuration)'=='Release'">
+    <Optimize>true</Optimize>
   </PropertyGroup>
   </PropertyGroup>
   <ItemGroup>
   <ItemGroup>
     <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
     <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
@@ -75,7 +75,5 @@
     <IncludeTestAssembly>
     <IncludeTestAssembly>
       False
       False
     </IncludeTestAssembly>
     </IncludeTestAssembly>
-    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
-    <ImplicitUsings>enable</ImplicitUsings>
   </PropertyGroup>
   </PropertyGroup>
 </Project>
 </Project>

+ 7 - 2
nuget.config

@@ -8,6 +8,11 @@
 
 
     <!--To inherit the global NuGet package sources remove the <clear/> line below -->
     <!--To inherit the global NuGet package sources remove the <clear/> line below -->
     <clear />
     <clear />
-    <add key="nuget" value="https://api.nuget.org/v3/index.json" />
+    <add key="nuget" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
   </packageSources>
   </packageSources>
-</configuration>
+  <packageSourceMapping>
+    <packageSource key="nuget">
+      <package pattern="*" />
+    </packageSource>
+  </packageSourceMapping>
+</configuration>