diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index 488df66..848a3e1 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -42,12 +42,12 @@ jobs:
steps:
- name: 🛡️ Harden Runner
- uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
+ uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- name: 🛒 Checkout repository
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
+ uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0
@@ -65,7 +65,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: 🛠️ Initialize CodeQL
- uses: github/codeql-action/init@883d8588e56d1753a8a58c1c86e88976f0c23449 # v3.26.3
+ uses: github/codeql-action/init@e2b3eafc8d227b0241d48be5f425d47c2d750a13 # v3.26.10
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -82,6 +82,6 @@ jobs:
run: dotnet build --no-restore -c Release
- name: 🔍 Perform CodeQL Analysis
- uses: github/codeql-action/analyze@883d8588e56d1753a8a58c1c86e88976f0c23449 # v3.26.3
+ uses: github/codeql-action/analyze@e2b3eafc8d227b0241d48be5f425d47c2d750a13 # v3.26.10
with:
category: "/language:${{matrix.language}}"
diff --git a/.github/workflows/create-tag.yml b/.github/workflows/create-tag.yml
index 309a69a..a0f2834 100644
--- a/.github/workflows/create-tag.yml
+++ b/.github/workflows/create-tag.yml
@@ -20,12 +20,12 @@ jobs:
steps:
- name: 🛡️ Harden Runner
- uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
+ uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- name: 🛒 Checkout
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
+ uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0
diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml
index bf2dcfb..5c03af2 100644
--- a/.github/workflows/dependency-review.yml
+++ b/.github/workflows/dependency-review.yml
@@ -17,11 +17,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
- uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
+ uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- name: 'Checkout Repository'
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
+ uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: 'Dependency Review'
uses: actions/dependency-review-action@5a2ce3f5b92ee19cbb1541a4984c76d921601d7c # v4.3.4
diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml
index 9090b48..6862562 100644
--- a/.github/workflows/dotnet.yml
+++ b/.github/workflows/dotnet.yml
@@ -24,12 +24,12 @@ jobs:
steps:
- name: 🛡️ Harden Runner
- uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
+ uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- name: 🛒 Checkout
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
+ uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0
@@ -55,6 +55,6 @@ jobs:
run: dotnet test --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
- name: ☂️ Upload coverage reports to Codecov
- uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
+ uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml
index 3d00387..3c1372b 100644
--- a/.github/workflows/package.yml
+++ b/.github/workflows/package.yml
@@ -19,12 +19,12 @@ jobs:
steps:
- name: 🛡️ Harden Runner
- uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
+ uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- name: 🛒 Checkout
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
+ uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0
diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml
index 7af97c2..f33286e 100644
--- a/.github/workflows/scorecard.yml
+++ b/.github/workflows/scorecard.yml
@@ -32,12 +32,12 @@ jobs:
steps:
- name: Harden Runner
- uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
+ uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- name: "Checkout code"
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
+ uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
persist-credentials: false
@@ -64,7 +64,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
- uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
+ uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: SARIF file
path: results.sarif
@@ -72,6 +72,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
- uses: github/codeql-action/upload-sarif@883d8588e56d1753a8a58c1c86e88976f0c23449 # v3.26.3
+ uses: github/codeql-action/upload-sarif@e2b3eafc8d227b0241d48be5f425d47c2d750a13 # v3.26.10
with:
sarif_file: results.sarif
diff --git a/gen/EnumUtilities.Generators/CodeWriters/EnumFactoryWriter.cs b/gen/EnumUtilities.Generators/CodeWriters/EnumFactoryWriter.cs
index 9752b61..70c2f2c 100644
--- a/gen/EnumUtilities.Generators/CodeWriters/EnumFactoryWriter.cs
+++ b/gen/EnumUtilities.Generators/CodeWriters/EnumFactoryWriter.cs
@@ -4676,7 +4676,7 @@ private void WriteMiscellaneousBlock()
#line hidden
#line 16 "C:\Users\skarl\source\repos\github\skarllot\EnumUtilities\gen\EnumUtilities.Generators\CodeWriters\Factory\MiscellaneousBlock.ttinclude"
-this.Write(")");
+this.Write(")(");
#line default
@@ -4690,7 +4690,7 @@ private void WriteMiscellaneousBlock()
#line hidden
#line 16 "C:\Users\skarl\source\repos\github\skarllot\EnumUtilities\gen\EnumUtilities.Generators\CodeWriters\Factory\MiscellaneousBlock.ttinclude"
-this.Write(",\r\n");
+this.Write("),\r\n");
#line default
diff --git a/gen/EnumUtilities.Generators/CodeWriters/Factory/MiscellaneousBlock.ttinclude b/gen/EnumUtilities.Generators/CodeWriters/Factory/MiscellaneousBlock.ttinclude
index 5951300..3e2c25d 100644
--- a/gen/EnumUtilities.Generators/CodeWriters/Factory/MiscellaneousBlock.ttinclude
+++ b/gen/EnumUtilities.Generators/CodeWriters/Factory/MiscellaneousBlock.ttinclude
@@ -13,7 +13,7 @@
foreach (var curr in Model.UniqueValues)
{
#>
- (<#= Model.RefName #>)<#= curr.MemberValue #>,
+ (<#= Model.RefName #>)(<#= curr.MemberValue #>),
<#+
}
#>
diff --git a/global.json b/global.json
index ed43fec..db4f396 100644
--- a/global.json
+++ b/global.json
@@ -1,6 +1,6 @@
{
"sdk": {
- "version": "8.0.401",
+ "version": "8.0.402",
"rollForward": "latestMajor",
"allowPrerelease": false
}
diff --git a/tests/EnumUtilities.Generators.IntegrationTests/EnumUtilities.Generators.IntegrationTests.csproj b/tests/EnumUtilities.Generators.IntegrationTests/EnumUtilities.Generators.IntegrationTests.csproj
index 8cc282b..0f8ba3a 100644
--- a/tests/EnumUtilities.Generators.IntegrationTests/EnumUtilities.Generators.IntegrationTests.csproj
+++ b/tests/EnumUtilities.Generators.IntegrationTests/EnumUtilities.Generators.IntegrationTests.csproj
@@ -22,8 +22,8 @@
runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
+
+
diff --git a/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.CategoriesFactory.g.cs b/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.CategoriesFactory.g.cs
index c9bebe6..d918869 100644
--- a/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.CategoriesFactory.g.cs
+++ b/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.CategoriesFactory.g.cs
@@ -356,12 +356,12 @@ public static Categories[] GetValues()
{
return new[]
{
- (Categories)0,
- (Categories)1,
- (Categories)2,
- (Categories)3,
- (Categories)4,
- (Categories)5,
+ (Categories)(0),
+ (Categories)(1),
+ (Categories)(2),
+ (Categories)(3),
+ (Categories)(4),
+ (Categories)(5),
};
}
diff --git a/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.ColoursFactory.g.cs b/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.ColoursFactory.g.cs
index 946b5e2..7e6a563 100644
--- a/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.ColoursFactory.g.cs
+++ b/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.ColoursFactory.g.cs
@@ -356,9 +356,9 @@ public static Colours[] GetValues()
{
return new[]
{
- (Colours)1,
- (Colours)2,
- (Colours)4,
+ (Colours)(1),
+ (Colours)(2),
+ (Colours)(4),
};
}
diff --git a/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.HumanStatesFactory.g.cs b/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.HumanStatesFactory.g.cs
index 1dc6457..6dd08e5 100644
--- a/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.HumanStatesFactory.g.cs
+++ b/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.HumanStatesFactory.g.cs
@@ -368,11 +368,11 @@ public static HumanStates[] GetValues()
{
return new[]
{
- (HumanStates)1,
- (HumanStates)2,
- (HumanStates)3,
- (HumanStates)4,
- (HumanStates)5,
+ (HumanStates)(1),
+ (HumanStates)(2),
+ (HumanStates)(3),
+ (HumanStates)(4),
+ (HumanStates)(5),
};
}
diff --git a/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.MyEnum1Factory.g.cs b/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.MyEnum1Factory.g.cs
index 6b2f7df..65c6f09 100644
--- a/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.MyEnum1Factory.g.cs
+++ b/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.MyEnum1Factory.g.cs
@@ -341,9 +341,9 @@ public static NestedInClass.MyEnum1[] GetValues()
{
return new[]
{
- (NestedInClass.MyEnum1)0,
- (NestedInClass.MyEnum1)1,
- (NestedInClass.MyEnum1)2,
+ (NestedInClass.MyEnum1)(0),
+ (NestedInClass.MyEnum1)(1),
+ (NestedInClass.MyEnum1)(2),
};
}
diff --git a/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.MyEnum2Factory.g.cs b/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.MyEnum2Factory.g.cs
index 677e0af..df43cc9 100644
--- a/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.MyEnum2Factory.g.cs
+++ b/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.MyEnum2Factory.g.cs
@@ -818,10 +818,10 @@ public static NestedInClass.MyEnum2[] GetValues()
{
return new[]
{
- (NestedInClass.MyEnum2)0,
- (NestedInClass.MyEnum2)1,
- (NestedInClass.MyEnum2)2,
- (NestedInClass.MyEnum2)3,
+ (NestedInClass.MyEnum2)(0),
+ (NestedInClass.MyEnum2)(1),
+ (NestedInClass.MyEnum2)(2),
+ (NestedInClass.MyEnum2)(3),
};
}
diff --git a/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.MyEnum3Factory.g.cs b/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.MyEnum3Factory.g.cs
index 719ab72..5c55e3a 100644
--- a/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.MyEnum3Factory.g.cs
+++ b/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.MyEnum3Factory.g.cs
@@ -502,13 +502,13 @@ public static NestedInClass.MyEnum3[] GetValues()
{
return new[]
{
- (NestedInClass.MyEnum3)0,
- (NestedInClass.MyEnum3)1,
- (NestedInClass.MyEnum3)2,
- (NestedInClass.MyEnum3)3,
- (NestedInClass.MyEnum3)4,
- (NestedInClass.MyEnum3)5,
- (NestedInClass.MyEnum3)6,
+ (NestedInClass.MyEnum3)(0),
+ (NestedInClass.MyEnum3)(1),
+ (NestedInClass.MyEnum3)(2),
+ (NestedInClass.MyEnum3)(3),
+ (NestedInClass.MyEnum3)(4),
+ (NestedInClass.MyEnum3)(5),
+ (NestedInClass.MyEnum3)(6),
};
}
diff --git a/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.PaymentMethodFactory.g.cs b/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.PaymentMethodFactory.g.cs
index e480b44..995a531 100644
--- a/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.PaymentMethodFactory.g.cs
+++ b/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.PaymentMethodFactory.g.cs
@@ -818,10 +818,10 @@ public static PaymentMethod[] GetValues()
{
return new[]
{
- (PaymentMethod)0,
- (PaymentMethod)1,
- (PaymentMethod)2,
- (PaymentMethod)3,
+ (PaymentMethod)(0),
+ (PaymentMethod)(1),
+ (PaymentMethod)(2),
+ (PaymentMethod)(3),
};
}
diff --git a/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.SlimCategoriesFactory.g.cs b/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.SlimCategoriesFactory.g.cs
index 8b72eb9..55ef4de 100644
--- a/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.SlimCategoriesFactory.g.cs
+++ b/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.SlimCategoriesFactory.g.cs
@@ -356,12 +356,12 @@ public static SlimCategories[] GetValues()
{
return new[]
{
- (SlimCategories)0,
- (SlimCategories)1,
- (SlimCategories)2,
- (SlimCategories)3,
- (SlimCategories)4,
- (SlimCategories)5,
+ (SlimCategories)(0),
+ (SlimCategories)(1),
+ (SlimCategories)(2),
+ (SlimCategories)(3),
+ (SlimCategories)(4),
+ (SlimCategories)(5),
};
}
diff --git a/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.StatusCodeEnumInfo.g.cs b/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.StatusCodeEnumInfo.g.cs
new file mode 100644
index 0000000..a908337
--- /dev/null
+++ b/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.StatusCodeEnumInfo.g.cs
@@ -0,0 +1,524 @@
+//
+#nullable enable
+
+using System;
+using System.Runtime.CompilerServices;
+using Raiqub.Generators.EnumUtilities.Formatters;
+using Raiqub.Generators.EnumUtilities.Parsers;
+
+#pragma warning disable CS1591 // publicly visible type or member must be documented
+
+namespace Raiqub.Generators.EnumUtilities.IntegrationTests.Models
+{
+ [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.8.0.0")]
+ public static partial class StatusCodeMetadata
+ {
+ /// Provides constant values for members names.
+ public static partial class Name
+ {
+ /// Represents the largest possible number of characters produced by converting an value to string, based on defined members. This field is constant.
+ public const int MaxCharsLength = 14;
+
+ /// The string representation of name.
+ public const string Unknown = "Unknown";
+
+ /// The string representation of name.
+ public const string Success = "Success";
+
+ /// The string representation of name.
+ public const string Error = "Error";
+
+ /// The string representation of name.
+ public const string NotFound = "NotFound";
+
+ /// The string representation of name.
+ public const string Timeout = "Timeout";
+
+ /// The string representation of name.
+ public const string Unauthorized = "Unauthorized";
+
+ /// The string representation of name.
+ public const string Forbidden = "Forbidden";
+
+ /// The string representation of name.
+ public const string Conflict = "Conflict";
+
+ /// The string representation of name.
+ public const string Gone = "Gone";
+
+ /// The string representation of name.
+ public const string InvalidRequest = "InvalidRequest";
+
+ /// The string representation of name.
+ public const string ServerError = "ServerError";
+ }
+
+ /// Provides static values for UTF-8 encoded members names.
+ public static partial class Utf8Name
+ {
+ /// Represents the largest possible number of bytes produced by converting an value to UTF-8 string, based on defined members. This field is constant.
+ public const int MaxBytesLength = 14;
+
+ /// The UTF-8 representation of name.
+ public static ReadOnlySpan Unknown => new byte[7] { 85, 110, 107, 110, 111, 119, 110 };
+
+ /// The UTF-8 representation of name.
+ public static ReadOnlySpan Success => new byte[7] { 83, 117, 99, 99, 101, 115, 115 };
+
+ /// The UTF-8 representation of name.
+ public static ReadOnlySpan Error => new byte[5] { 69, 114, 114, 111, 114 };
+
+ /// The UTF-8 representation of name.
+ public static ReadOnlySpan NotFound => new byte[8] { 78, 111, 116, 70, 111, 117, 110, 100 };
+
+ /// The UTF-8 representation of name.
+ public static ReadOnlySpan Timeout => new byte[7] { 84, 105, 109, 101, 111, 117, 116 };
+
+ /// The UTF-8 representation of name.
+ public static ReadOnlySpan Unauthorized => new byte[12] { 85, 110, 97, 117, 116, 104, 111, 114, 105, 122, 101, 100 };
+
+ /// The UTF-8 representation of name.
+ public static ReadOnlySpan Forbidden => new byte[9] { 70, 111, 114, 98, 105, 100, 100, 101, 110 };
+
+ /// The UTF-8 representation of name.
+ public static ReadOnlySpan Conflict => new byte[8] { 67, 111, 110, 102, 108, 105, 99, 116 };
+
+ /// The UTF-8 representation of name.
+ public static ReadOnlySpan Gone => new byte[4] { 71, 111, 110, 101 };
+
+ /// The UTF-8 representation of name.
+ public static ReadOnlySpan InvalidRequest => new byte[14] { 73, 110, 118, 97, 108, 105, 100, 82, 101, 113, 117, 101, 115, 116 };
+
+ /// The UTF-8 representation of name.
+ public static ReadOnlySpan ServerError => new byte[11] { 83, 101, 114, 118, 101, 114, 69, 114, 114, 111, 114 };
+ }
+
+ /// Provides constant values for serialized members values.
+ public static partial class SerializedValue
+ {
+ /// Represents the largest possible number of characters produced by converting an value to string, based on defined members. This field is constant.
+ public const int MaxCharsLength = 14;
+
+ /// The string representation of serialized value.
+ public const string Unknown = "Unknown";
+
+ /// The string representation of serialized value.
+ public const string Success = "Success";
+
+ /// The string representation of serialized value.
+ public const string Error = "Error";
+
+ /// The string representation of serialized value.
+ public const string NotFound = "Not Found";
+
+ /// The string representation of serialized value.
+ public const string Timeout = "Timeout";
+
+ /// The string representation of serialized value.
+ public const string Unauthorized = "Unauthorized";
+
+ /// The string representation of serialized value.
+ public const string Forbidden = "Forbidden";
+
+ /// The string representation of serialized value.
+ public const string Conflict = "Conflict";
+
+ /// The string representation of serialized value.
+ public const string Gone = "Gone";
+
+ /// The string representation of serialized value.
+ public const string InvalidRequest = "InvalidRequest";
+
+ /// The string representation of serialized value.
+ public const string ServerError = "ServerError";
+ }
+
+ /// Provides static values for UTF-8 encoded members serialized values.
+ public static partial class Utf8SerializedValue
+ {
+ /// Represents the largest possible number of bytes produced by converting an value to UTF-8 string, based on defined members. This field is constant.
+ public const int MaxBytesLength = 14;
+
+ /// The UTF-8 representation of serialized value.
+ public static ReadOnlySpan Unknown => new byte[7] { 85, 110, 107, 110, 111, 119, 110 };
+
+ /// The UTF-8 representation of serialized value.
+ public static ReadOnlySpan Success => new byte[7] { 83, 117, 99, 99, 101, 115, 115 };
+
+ /// The UTF-8 representation of serialized value.
+ public static ReadOnlySpan Error => new byte[5] { 69, 114, 114, 111, 114 };
+
+ /// The UTF-8 representation of serialized value.
+ public static ReadOnlySpan NotFound => new byte[9] { 78, 111, 116, 32, 70, 111, 117, 110, 100 };
+
+ /// The UTF-8 representation of serialized value.
+ public static ReadOnlySpan Timeout => new byte[7] { 84, 105, 109, 101, 111, 117, 116 };
+
+ /// The UTF-8 representation of serialized value.
+ public static ReadOnlySpan Unauthorized => new byte[12] { 85, 110, 97, 117, 116, 104, 111, 114, 105, 122, 101, 100 };
+
+ /// The UTF-8 representation of serialized value.
+ public static ReadOnlySpan Forbidden => new byte[9] { 70, 111, 114, 98, 105, 100, 100, 101, 110 };
+
+ /// The UTF-8 representation of serialized value.
+ public static ReadOnlySpan Conflict => new byte[8] { 67, 111, 110, 102, 108, 105, 99, 116 };
+
+ /// The UTF-8 representation of serialized value.
+ public static ReadOnlySpan Gone => new byte[4] { 71, 111, 110, 101 };
+
+ /// The UTF-8 representation of serialized value.
+ public static ReadOnlySpan InvalidRequest => new byte[14] { 73, 110, 118, 97, 108, 105, 100, 82, 101, 113, 117, 101, 115, 116 };
+
+ /// The UTF-8 representation of serialized value.
+ public static ReadOnlySpan ServerError => new byte[11] { 83, 101, 114, 118, 101, 114, 69, 114, 114, 111, 114 };
+ }
+
+ /// Provides support for formatting values.
+ internal sealed partial class StringFormatter : IEnumFormatter
+ {
+ /// Gets the singleton instance of the class.
+ public static StringFormatter Instance = new StringFormatter();
+
+ ///
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public int GetStringLengthForNumber(int value) => EnumNumericFormatter.GetStringLength(value);
+
+ ///
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public string GetStringForNumber(int value) => value.ToString();
+
+ ///
+ public int? TryGetStringLengthForMember(int value)
+ {
+ return value switch
+ {
+ -1 => 7,
+ 0 => 7,
+ -2 => 5,
+ -3 => 8,
+ -4 => 7,
+ -5 => 12,
+ -6 => 9,
+ -7 => 8,
+ -8 => 4,
+ -9 => 14,
+ -10 => 11,
+ _ => null
+ };
+ }
+
+ ///
+ public string? TryGetStringForMember(int value)
+ {
+ return value switch
+ {
+ -1 => "Unknown",
+ 0 => "Success",
+ -2 => "Error",
+ -3 => "NotFound",
+ -4 => "Timeout",
+ -5 => "Unauthorized",
+ -6 => "Forbidden",
+ -7 => "Conflict",
+ -8 => "Gone",
+ -9 => "InvalidRequest",
+ -10 => "ServerError",
+ _ => null
+ };
+ }
+ }
+
+ /// Provides support for formatting serialized values.
+ internal sealed partial class SerializationStringFormatter : IEnumFormatter
+ {
+ /// Gets the singleton instance of the class.
+ public static SerializationStringFormatter Instance = new SerializationStringFormatter();
+
+ ///
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public int GetStringLengthForNumber(int value) => EnumNumericFormatter.GetStringLength(value);
+
+ ///
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public string GetStringForNumber(int value) => value.ToString();
+
+ ///
+ public int? TryGetStringLengthForMember(int value)
+ {
+ return value switch
+ {
+ -1 => 7,
+ 0 => 7,
+ -2 => 5,
+ -3 => 9,
+ -4 => 7,
+ -5 => 12,
+ -6 => 9,
+ -7 => 8,
+ -8 => 4,
+ -9 => 14,
+ -10 => 11,
+ _ => null
+ };
+ }
+
+ ///
+ public string? TryGetStringForMember(int value)
+ {
+ return value switch
+ {
+ -1 => "Unknown",
+ 0 => "Success",
+ -2 => "Error",
+ -3 => "Not Found",
+ -4 => "Timeout",
+ -5 => "Unauthorized",
+ -6 => "Forbidden",
+ -7 => "Conflict",
+ -8 => "Gone",
+ -9 => "InvalidRequest",
+ -10 => "ServerError",
+ _ => null
+ };
+ }
+ }
+
+ /// Provides support for parsing values.
+ internal sealed partial class StringParser
+ : IEnumParser
+ {
+ /// Gets the singleton instance of the class.
+ public static StringParser Instance = new StringParser();
+
+ ///
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public int BitwiseOr(int value1, int value2) => unchecked((int)(value1 | value2));
+
+ ///
+ public bool TryParseNumber(ReadOnlySpan value, out int result) => EnumNumericParser.TryParse(value, out result);
+
+ ///
+ public bool TryParseSingleName(ReadOnlySpan value, StringComparison comparisonType, out int result)
+ {
+ if (value.IsEmpty)
+ {
+ result = 0;
+ return false;
+ }
+
+ switch (value[0])
+ {
+ case 'U':
+ case 'u':
+ switch (value)
+ {
+ case { } when value.Equals("Unknown", comparisonType):
+ result = -1;
+ return true;
+ case { } when value.Equals("Unauthorized", comparisonType):
+ result = -5;
+ return true;
+ }
+ goto default;
+ case 'S':
+ case 's':
+ switch (value)
+ {
+ case { } when value.Equals("Success", comparisonType):
+ result = 0;
+ return true;
+ case { } when value.Equals("ServerError", comparisonType):
+ result = -10;
+ return true;
+ }
+ goto default;
+ case 'E':
+ case 'e':
+ switch (value)
+ {
+ case { } when value.Equals("Error", comparisonType):
+ result = -2;
+ return true;
+ }
+ goto default;
+ case 'N':
+ case 'n':
+ switch (value)
+ {
+ case { } when value.Equals("NotFound", comparisonType):
+ result = -3;
+ return true;
+ }
+ goto default;
+ case 'T':
+ case 't':
+ switch (value)
+ {
+ case { } when value.Equals("Timeout", comparisonType):
+ result = -4;
+ return true;
+ }
+ goto default;
+ case 'F':
+ case 'f':
+ switch (value)
+ {
+ case { } when value.Equals("Forbidden", comparisonType):
+ result = -6;
+ return true;
+ }
+ goto default;
+ case 'C':
+ case 'c':
+ switch (value)
+ {
+ case { } when value.Equals("Conflict", comparisonType):
+ result = -7;
+ return true;
+ }
+ goto default;
+ case 'G':
+ case 'g':
+ switch (value)
+ {
+ case { } when value.Equals("Gone", comparisonType):
+ result = -8;
+ return true;
+ }
+ goto default;
+ case 'I':
+ case 'i':
+ switch (value)
+ {
+ case { } when value.Equals("InvalidRequest", comparisonType):
+ result = -9;
+ return true;
+ }
+ goto default;
+ default:
+ result = 0;
+ return false;
+ }
+ }
+ }
+
+ /// Provides support for parsing serialized values.
+ internal sealed partial class SerializationStringParser : IEnumParser
+ {
+ /// Gets the singleton instance of the class.
+ public static SerializationStringParser Instance = new SerializationStringParser();
+
+ ///
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public int BitwiseOr(int value1, int value2) => unchecked((int)(value1 | value2));
+
+ ///
+ public bool TryParseNumber(ReadOnlySpan value, out int result) => EnumNumericParser.TryParse(value, out result);
+
+ ///
+ public bool TryParseSingleName(ReadOnlySpan value, StringComparison comparisonType, out int result)
+ {
+ if (value.IsEmpty)
+ {
+ result = 0;
+ return false;
+ }
+
+ switch (value[0])
+ {
+ case 'U':
+ case 'u':
+ switch (value)
+ {
+ case { } when value.Equals("Unknown", comparisonType):
+ result = -1;
+ return true;
+ case { } when value.Equals("Unauthorized", comparisonType):
+ result = -5;
+ return true;
+ }
+ goto default;
+ case 'S':
+ case 's':
+ switch (value)
+ {
+ case { } when value.Equals("Success", comparisonType):
+ result = 0;
+ return true;
+ case { } when value.Equals("ServerError", comparisonType):
+ result = -10;
+ return true;
+ }
+ goto default;
+ case 'E':
+ case 'e':
+ switch (value)
+ {
+ case { } when value.Equals("Error", comparisonType):
+ result = -2;
+ return true;
+ }
+ goto default;
+ case 'N':
+ case 'n':
+ switch (value)
+ {
+ case { } when value.Equals("Not Found", comparisonType):
+ result = -3;
+ return true;
+ }
+ goto default;
+ case 'T':
+ case 't':
+ switch (value)
+ {
+ case { } when value.Equals("Timeout", comparisonType):
+ result = -4;
+ return true;
+ }
+ goto default;
+ case 'F':
+ case 'f':
+ switch (value)
+ {
+ case { } when value.Equals("Forbidden", comparisonType):
+ result = -6;
+ return true;
+ }
+ goto default;
+ case 'C':
+ case 'c':
+ switch (value)
+ {
+ case { } when value.Equals("Conflict", comparisonType):
+ result = -7;
+ return true;
+ }
+ goto default;
+ case 'G':
+ case 'g':
+ switch (value)
+ {
+ case { } when value.Equals("Gone", comparisonType):
+ result = -8;
+ return true;
+ }
+ goto default;
+ case 'I':
+ case 'i':
+ switch (value)
+ {
+ case { } when value.Equals("InvalidRequest", comparisonType):
+ result = -9;
+ return true;
+ }
+ goto default;
+ default:
+ result = 0;
+ return false;
+ }
+ }
+ }
+ }
+}
diff --git a/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.StatusCodeExtensions.g.cs b/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.StatusCodeExtensions.g.cs
new file mode 100644
index 0000000..bb2aa87
--- /dev/null
+++ b/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.StatusCodeExtensions.g.cs
@@ -0,0 +1,142 @@
+//
+#nullable enable
+
+using System;
+using System.Runtime.CompilerServices;
+using System.Threading;
+using Raiqub.Generators.EnumUtilities.Formatters;
+
+#pragma warning disable CS1591 // publicly visible type or member must be documented
+
+namespace Raiqub.Generators.EnumUtilities.IntegrationTests.Models
+{
+ [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.8.0.0")]
+ public static partial class StatusCodeExtensions
+ {
+ private static readonly StatusCodeMetadata.StringFormatter s_stringFormatter = StatusCodeMetadata.StringFormatter.Instance;
+ private static readonly StatusCodeMetadata.SerializationStringFormatter s_serializationStringFormatter = StatusCodeMetadata.SerializationStringFormatter.Instance;
+
+ /// Converts the value of this instance to its equivalent string representation.
+ /// The string representation of the value of this instance.
+ public static string ToStringFast(this StatusCode value)
+ {
+ return EnumStringFormatter.GetString((int)value, s_stringFormatter);
+ }
+
+ /// Calculates the number of characters produced by converting the specified value to string.
+ /// The value to calculate the number of characters.
+ /// The number of characters produced by converting the specified value to string.
+ public static int GetStringLength(this StatusCode value)
+ {
+ return EnumStringFormatter.GetStringLength((int)value, s_stringFormatter);
+ }
+
+ /// Returns a boolean telling whether the value of this instance exists in the enumeration.
+ /// true if the value of this instance exists in the enumeration; false otherwise.
+ public static bool IsDefined(this StatusCode value)
+ {
+ return StatusCodeValidation.IsDefined(value);
+ }
+
+ /// Adds two enumerations and replaces the first integer with the sum, as an atomic operation.
+ /// A variable containing the first value to be added.
+ /// The value to be added to the enumeration at .
+ /// The new value that was stored at by this operation.
+ public static StatusCode InterlockedAdd(this ref StatusCode location, int value)
+ {
+ ref int locationRaw = ref Unsafe.As(ref location);
+ int resultRaw = Interlocked.Add(ref locationRaw, value);
+ return Unsafe.As(ref resultRaw);
+ }
+
+ /// Decrements enumeration and stores the result, as an atomic operation.
+ /// The variable whose value is to be decremented.
+ /// The value of the variable immediately after the decrement operation finished.
+ public static StatusCode InterlockedDecrement(this ref StatusCode location)
+ {
+ ref int locationRaw = ref Unsafe.As(ref location);
+ int resultRaw = Interlocked.Decrement(ref locationRaw);
+ return Unsafe.As(ref resultRaw);
+ }
+
+ /// Increments enumeration and stores the result, as an atomic operation.
+ /// The variable whose value is to be incremented.
+ /// The value of the variable immediately after the increment operation finished.
+ public static StatusCode InterlockedIncrement(this ref StatusCode location)
+ {
+ ref int locationRaw = ref Unsafe.As(ref location);
+ int resultRaw = Interlocked.Increment(ref locationRaw);
+ return Unsafe.As(ref resultRaw);
+ }
+
+ /// Compares two enumerations for equality and, if they are equal, replaces the first value.
+ /// The destination, whose value is compared with and possibly replaced.
+ /// The value that replaces the destination value if the comparison results in equality.
+ /// The value that is compared to the value at .
+ /// The original value in .
+ public static StatusCode InterlockedCompareExchange(this ref StatusCode location, StatusCode value, StatusCode comparand)
+ {
+ ref int locationRaw = ref Unsafe.As(ref location);
+ int resultRaw = Interlocked.CompareExchange(ref locationRaw, Unsafe.As(ref value), Unsafe.As(ref comparand));
+ return Unsafe.As(ref resultRaw);
+ }
+
+ /// Sets an enumeration value to a specified value and returns the original value, as an atomic operation.
+ /// The variable to set to the specified value.
+ /// The value to which the parameter is set.
+ /// The original value of .
+ public static StatusCode InterlockedExchange(this ref StatusCode location, StatusCode value)
+ {
+ ref int locationRaw = ref Unsafe.As(ref location);
+ int resultRaw = Interlocked.Exchange(ref locationRaw, Unsafe.As(ref value));
+ return Unsafe.As(ref resultRaw);
+ }
+
+ public static string ToEnumMemberValue(this StatusCode value)
+ {
+ return EnumStringFormatter.GetString((int)value, s_serializationStringFormatter);
+ }
+
+ public static int GetEnumMemberValueStringLength(this StatusCode value)
+ {
+ return EnumStringFormatter.GetStringLength((int)value, s_serializationStringFormatter);
+ }
+
+ public static string GetDisplayShortName(this StatusCode value)
+ {
+ return (int)value switch
+ {
+ _ => GetDisplayName(value)
+ };
+ }
+
+ public static string GetDisplayName(this StatusCode value)
+ {
+ return (int)value switch
+ {
+ -1 => "Unknown",
+ 0 => "Success",
+ -2 => "Error",
+ -3 => "NotFound",
+ -4 => "Timeout",
+ -5 => "Unauthorized",
+ -6 => "Forbidden",
+ -7 => "Conflict",
+ -8 => "Gone",
+ -9 => "Invalid request",
+ -10 => "ServerError",
+ _ => ToStringFast(value)
+ };
+ }
+
+ public static string? GetDescription(this StatusCode value)
+ {
+ return (int)value switch
+ {
+ -9 => "The request is invalid",
+ _ => null
+ };
+ }
+ }
+}
diff --git a/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.StatusCodeFactory.g.cs b/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.StatusCodeFactory.g.cs
new file mode 100644
index 0000000..c4d0a04
--- /dev/null
+++ b/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.StatusCodeFactory.g.cs
@@ -0,0 +1,621 @@
+//
+#nullable enable
+
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Runtime.CompilerServices;
+using Raiqub.Generators.EnumUtilities.Parsers;
+
+#pragma warning disable CS1591 // publicly visible type or member must be documented
+
+namespace Raiqub.Generators.EnumUtilities.IntegrationTests.Models
+{
+ [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.8.0.0")]
+ public static partial class StatusCodeFactory
+ {
+ private static readonly StatusCodeMetadata.StringParser s_stringParser = StatusCodeMetadata.StringParser.Instance;
+ private static readonly StatusCodeMetadata.SerializationStringParser s_serializationStringParser = StatusCodeMetadata.SerializationStringParser.Instance;
+
+ ///
+ /// Converts the string representation of the name or numeric value of one or more enumerated constants to
+ /// an equivalent enumerated object.
+ ///
+ /// The string representation of the enumeration name or underlying value to convert.
+ /// to ignore case; to regard case.
+ /// The value represented by the specified name or numeric value. Note that this value need not be a member of the StatusCode enumeration.
+ /// is .
+ /// is empty or does not represent a valid value.
+ public static StatusCode Parse(string value, bool ignoreCase = false)
+ {
+ if (value is null) ThrowArgumentNullException(nameof(value));
+ TryParse(value.AsSpan(), ignoreCase, throwOnFailure: true, out var result);
+ return result;
+ }
+
+ ///
+ /// Converts the string representation of the name or numeric value of one or more enumerated constants to
+ /// an equivalent enumerated object.
+ ///
+ /// The string representation of the enumeration name or underlying value to convert.
+ /// to ignore case; to regard case.
+ /// The value represented by the specified name or numeric value. Note that this value need not be a member of the StatusCode enumeration.
+ /// is empty or does not represent a valid value.
+ public static StatusCode Parse(ReadOnlySpan value, bool ignoreCase = false)
+ {
+ TryParse(value, ignoreCase, throwOnFailure: true, out var result);
+ return result;
+ }
+
+ ///
+ /// Converts the string representation of the name or numeric value of one or more enumerated constants to
+ /// an equivalent enumerated object.
+ ///
+ /// The string representation of the enumeration name or underlying value to convert.
+ /// to ignore case; to regard case.
+ /// The value represented by the specified name or numeric value or null. Note that this value need not be a member of the StatusCode enumeration.
+ /// is empty or does not represent a valid value.
+ [return: NotNullIfNotNull("value")]
+ public static StatusCode? ParseOrNull(string? value, bool ignoreCase = false)
+ {
+ if (value is null) return null;
+ TryParse(value.AsSpan(), ignoreCase, throwOnFailure: true, out var result);
+ return result;
+ }
+
+ ///
+ /// Converts the string representation of the name or numeric value of one or more enumerated constants to
+ /// an equivalent enumerated object. The return value indicates whether the conversion succeeded.
+ ///
+ /// The string representation of the enumeration name or underlying value to convert.
+ /// to ignore case; to regard case.
+ ///
+ /// When this method returns, result contains an object of type StatusCode whose value is represented by value
+ /// if the parse operation succeeds. If the parse operation fails, result contains the default value of the
+ /// underlying type of StatusCode. Note that this value need not be a member of the StatusCode enumeration.
+ ///
+ /// true if the value parameter was converted successfully; otherwise, false.
+ public static bool TryParse([NotNullWhen(true)] string? value, bool ignoreCase, out StatusCode result)
+ {
+ return TryParse(value.AsSpan(), ignoreCase, throwOnFailure: false, out result);
+ }
+
+ ///
+ /// Converts the string representation of the name or numeric value of one or more enumerated constants to
+ /// an equivalent enumerated object. The return value indicates whether the conversion succeeded.
+ ///
+ /// The string representation of the enumeration name or underlying value to convert.
+ ///
+ /// When this method returns, result contains an object of type StatusCode whose value is represented by value
+ /// if the parse operation succeeds. If the parse operation fails, result contains the default value of the
+ /// underlying type of StatusCode. Note that this value need not be a member of the StatusCode enumeration.
+ ///
+ /// true if the value parameter was converted successfully; otherwise, false.
+ public static bool TryParse([NotNullWhen(true)] string? value, out StatusCode result)
+ {
+ return TryParse(value.AsSpan(), ignoreCase: false, throwOnFailure: false, out result);
+ }
+
+ ///
+ /// Converts the string representation of the name or numeric value of one or more enumerated constants to
+ /// an equivalent enumerated object.
+ ///
+ /// The string representation of the enumeration name or underlying value to convert.
+ /// to ignore case; to regard case.
+ ///
+ /// Contains an object of type StatusCode whose value is represented by value if the parse operation succeeds.
+ /// If the parse operation fails, result contains null value.
+ ///
+ public static StatusCode? TryParse(string? value, bool ignoreCase = false)
+ {
+ return TryParse(value.AsSpan(), ignoreCase, throwOnFailure: false, out StatusCode result) ? result : null;
+ }
+
+ ///
+ /// Converts the string representation of the name or numeric value of one or more enumerated constants to
+ /// an equivalent enumerated object. The return value indicates whether the conversion succeeded.
+ ///
+ /// The string representation of the enumeration name or underlying value to convert.
+ /// to ignore case; to regard case.
+ ///
+ /// When this method returns, result contains an object of type StatusCode whose value is represented by value
+ /// if the parse operation succeeds. If the parse operation fails, result contains the default value of the
+ /// underlying type of StatusCode. Note that this value need not be a member of the StatusCode enumeration.
+ ///
+ /// true if the value parameter was converted successfully; otherwise, false.
+ public static bool TryParse(ReadOnlySpan value, bool ignoreCase, out StatusCode result)
+ {
+ return TryParse(value, ignoreCase, throwOnFailure: false, out result);
+ }
+
+ ///
+ /// Converts the string representation of the name or numeric value of one or more enumerated constants to
+ /// an equivalent enumerated object. The return value indicates whether the conversion succeeded.
+ ///
+ /// The case-sensitive string representation of the enumeration name or underlying value to convert.
+ ///
+ /// When this method returns, result contains an object of type StatusCode whose value is represented by value
+ /// if the parse operation succeeds. If the parse operation fails, result contains the default value of the
+ /// underlying type of StatusCode. Note that this value need not be a member of the StatusCode enumeration.
+ ///
+ /// true if the value parameter was converted successfully; otherwise, false.
+ public static bool TryParse(ReadOnlySpan value, out StatusCode result)
+ {
+ return TryParse(value, ignoreCase: false, throwOnFailure: false, out result);
+ }
+
+ ///
+ /// Converts the string representation of the name or numeric value of one or more enumerated constants to
+ /// an equivalent enumerated object.
+ ///
+ /// The string representation of the enumeration name or underlying value to convert.
+ /// to ignore case; to regard case.
+ ///
+ /// Contains an object of type StatusCode whose value is represented by value if the parse operation succeeds.
+ /// If the parse operation fails, result contains null value.
+ ///
+ public static StatusCode? TryParse(ReadOnlySpan value, bool ignoreCase = false)
+ {
+ return TryParse(value, ignoreCase, throwOnFailure: false, out StatusCode result) ? result : null;
+ }
+
+ private static bool TryParse(ReadOnlySpan value, bool ignoreCase, bool throwOnFailure, out StatusCode result)
+ {
+ var comparisonType = ignoreCase ? StringComparison.OrdinalIgnoreCase : StringComparison.Ordinal;
+ bool success = EnumStringParser.TryParse(value, s_stringParser, comparisonType, throwOnFailure, out int number);
+ if (!success)
+ {
+ result = 0;
+ return false;
+ }
+
+ result = (StatusCode)number;
+ return true;
+ }
+
+ ///
+ /// Converts the string representation of the name or numeric value of one or more enumerated constants to
+ /// an equivalent enumerated object. The return value indicates whether the conversion succeeded.
+ ///
+ /// The string representation of the enumeration name or underlying value to convert.
+ /// One of the enumeration values that specifies how the strings will be compared.
+ ///
+ /// When this method returns, result contains an object of type StatusCode whose value is represented by value
+ /// if the parse operation succeeds. If the parse operation fails, result contains the default value of the
+ /// underlying type of StatusCode. Note that this value need not be a member of the StatusCode enumeration.
+ ///
+ /// true if the value parameter was converted successfully; otherwise, false.
+ /// is not a value.
+ [Obsolete("Use TryParse overload with 'ignoreCase' parameter")]
+ public static bool TryParse(
+ [NotNullWhen(true)] string? name,
+ StringComparison comparisonType,
+ out StatusCode result)
+ {
+ bool success = EnumStringParser.TryParse(name, s_stringParser, comparisonType, throwOnFailure: false, out int number);
+ if (!success)
+ {
+ result = 0;
+ return false;
+ }
+
+ result = (StatusCode)number;
+ return true;
+ }
+
+ ///
+ /// Converts the string representation of the name or numeric value of one or more enumerated constants to
+ /// an equivalent enumerated object. The return value indicates whether the conversion succeeded.
+ ///
+ /// The case-insensitive string representation of the enumeration name or underlying value to convert.
+ ///
+ /// When this method returns, result contains an object of type StatusCode whose value is represented by value
+ /// if the parse operation succeeds. If the parse operation fails, result contains the default value of the
+ /// underlying type of StatusCode. Note that this value need not be a member of the StatusCode enumeration.
+ ///
+ /// true if the value parameter was converted successfully; otherwise, false.
+ [Obsolete("Use TryParse overload with 'ignoreCase' parameter")]
+ public static bool TryParseIgnoreCase(
+ [NotNullWhen(true)] string? name,
+ out StatusCode result)
+ {
+ return TryParse(name.AsSpan(), ignoreCase: true, out result);
+ }
+
+ ///
+ /// Converts the string representation of the name or numeric value of one or more enumerated constants to
+ /// an equivalent enumerated object.
+ ///
+ /// The case-insensitive string representation of the enumeration name or underlying value to convert.
+ ///
+ /// Contains an object of type StatusCode whose value is represented by value if the parse operation succeeds.
+ /// If the parse operation fails, result contains null value.
+ ///
+ [Obsolete("Use TryParse overload with 'ignoreCase' parameter")]
+ public static StatusCode? TryParseIgnoreCase(string? name)
+ {
+ return TryParse(name.AsSpan(), ignoreCase: true, out StatusCode result) ? result : null;
+ }
+
+ ///
+ /// Converts the string representation of the name or numeric value of one or more enumerated constants to
+ /// an equivalent enumerated object.
+ ///
+ /// The string representation of the enumeration name or underlying value to convert.
+ /// One of the enumeration values that specifies how the strings will be compared.
+ ///
+ /// Contains an object of type StatusCode whose value is represented by value if the parse operation succeeds.
+ /// If the parse operation fails, result contains null value.
+ ///
+ /// is not a value.
+ [Obsolete("Use TryParse overload with 'ignoreCase' parameter")]
+ public static StatusCode? TryParse(string? name, StringComparison comparisonType)
+ {
+ return TryParse(name, comparisonType, out StatusCode result) ? result : null;
+ }
+
+ ///
+ /// Converts the string representation of the serialized value to an equivalent enumerated object.
+ ///
+ /// The string representation of the enumeration serialized value to convert.
+ /// to ignore case; to regard case.
+ /// The value represented by the specified serialized value. Note that this value need not be a member of the StatusCode enumeration.
+ /// is .
+ /// is empty or does not represent a valid value.
+ public static StatusCode ParseFromEnumMemberValue(string value, bool ignoreCase = false)
+ {
+ if (value is null) ThrowArgumentNullException(nameof(value));
+ TryParseFromEnumMemberValue(value.AsSpan(), ignoreCase, throwOnFailure: true, out var result);
+ return result;
+ }
+
+ ///
+ /// Converts the string representation of the serialized value to an equivalent enumerated object.
+ ///
+ /// The string representation of the enumeration serialized value to convert.
+ /// to ignore case; to regard case.
+ /// The value represented by the specified serialized value. Note that this value need not be a member of the StatusCode enumeration.
+ /// is empty or does not represent a valid value.
+ public static StatusCode ParseFromEnumMemberValue(ReadOnlySpan value, bool ignoreCase = false)
+ {
+ TryParseFromEnumMemberValue(value, ignoreCase, throwOnFailure: true, out var result);
+ return result;
+ }
+
+ ///
+ /// Converts the string representation of the serialized value to an equivalent enumerated object.
+ ///
+ /// The string representation of the enumeration serialized value to convert.
+ /// to ignore case; to regard case.
+ /// The value represented by the specified serialized value or null. Note that this value need not be a member of the StatusCode enumeration.
+ /// is empty or does not represent a valid value.
+ [return: NotNullIfNotNull("value")]
+ public static StatusCode? ParseFromEnumMemberValueOrNull(string? value, bool ignoreCase = false)
+ {
+ if (value is null) return null;
+ TryParseFromEnumMemberValue(value.AsSpan(), ignoreCase, throwOnFailure: true, out var result);
+ return result;
+ }
+
+ ///
+ /// Converts the string representation of the serialized value to an equivalent enumerated object.
+ /// The return value indicates whether the conversion succeeded.
+ ///
+ /// The value as defined with .
+ /// to ignore case; to regard case.
+ ///
+ /// When this method returns, result contains an object of type StatusCode whose value is represented by a
+ /// serialized value if the parse operation succeeds. If the parse operation fails, result contains the default
+ /// value of the underlying type of StatusCode. Note that this value need not be a member of the StatusCode enumeration.
+ ///
+ /// true if the value parameter was converted successfully; otherwise, false.
+ public static bool TryParseFromEnumMemberValue([NotNullWhen(true)] string? value, bool ignoreCase, out StatusCode result)
+ {
+ return TryParseFromEnumMemberValue(value.AsSpan(), ignoreCase, throwOnFailure: false, out result);
+ }
+
+ ///
+ /// Converts the string representation of the serialized value to an equivalent enumerated object.
+ /// The return value indicates whether the conversion succeeded.
+ ///
+ /// The value as defined with .
+ ///
+ /// When this method returns, result contains an object of type StatusCode whose value is represented by a
+ /// serialized value if the parse operation succeeds. If the parse operation fails, result contains the default
+ /// value of the underlying type of StatusCode. Note that this value need not be a member of the StatusCode enumeration.
+ ///
+ /// true if the value parameter was converted successfully; otherwise, false.
+ public static bool TryParseFromEnumMemberValue([NotNullWhen(true)] string? value, out StatusCode result)
+ {
+ return TryParseFromEnumMemberValue(value.AsSpan(), ignoreCase: false, throwOnFailure: false, out result);
+ }
+
+ ///
+ /// Converts the string representation of the serialized value to an equivalent enumerated object.
+ ///
+ /// The value as defined with .
+ /// to ignore case; to regard case.
+ ///
+ /// Contains an object of type StatusCode whose value is represented by value if the parse operation succeeds.
+ /// If the parse operation fails, result contains a null value.
+ ///
+ public static StatusCode? TryParseFromEnumMemberValue(string? value, bool ignoreCase = false)
+ {
+ return TryParseFromEnumMemberValue(value.AsSpan(), ignoreCase, throwOnFailure: false, out StatusCode result) ? result : null;
+ }
+
+ ///
+ /// Converts the string representation of the serialized value to an equivalent enumerated object.
+ /// The return value indicates whether the conversion succeeded.
+ ///
+ /// The value as defined with .
+ /// to ignore case; to regard case.
+ ///
+ /// When this method returns, result contains an object of type StatusCode whose value is represented by a
+ /// serialized value if the parse operation succeeds. If the parse operation fails, result contains the default
+ /// value of the underlying type of StatusCode. Note that this value need not be a member of the StatusCode enumeration.
+ ///
+ /// true if the value parameter was converted successfully; otherwise, false.
+ public static bool TryParseFromEnumMemberValue(ReadOnlySpan value, bool ignoreCase, out StatusCode result)
+ {
+ return TryParseFromEnumMemberValue(value, ignoreCase, throwOnFailure: false, out result);
+ }
+
+ ///
+ /// Converts the string representation of the serialized value to an equivalent enumerated object.
+ /// The return value indicates whether the conversion succeeded.
+ ///
+ /// The value as defined with .
+ ///
+ /// When this method returns, result contains an object of type StatusCode whose value is represented by a
+ /// serialized value if the parse operation succeeds. If the parse operation fails, result contains the default
+ /// value of the underlying type of StatusCode. Note that this value need not be a member of the StatusCode enumeration.
+ ///
+ /// true if the value parameter was converted successfully; otherwise, false.
+ public static bool TryParseFromEnumMemberValue(ReadOnlySpan value, out StatusCode result)
+ {
+ return TryParseFromEnumMemberValue(value, ignoreCase: false, throwOnFailure: false, out result);
+ }
+
+ ///
+ /// Converts the string representation of the serialized value to an equivalent enumerated object.
+ ///
+ /// The value as defined with .
+ /// to ignore case; to regard case.
+ ///
+ /// Contains an object of type StatusCode whose value is represented by value if the parse operation succeeds.
+ /// If the parse operation fails, result contains a null value.
+ ///
+ public static StatusCode? TryParseFromEnumMemberValue(ReadOnlySpan value, bool ignoreCase = false)
+ {
+ return TryParseFromEnumMemberValue(value, ignoreCase, throwOnFailure: false, out StatusCode result) ? result : null;
+ }
+
+ private static bool TryParseFromEnumMemberValue(ReadOnlySpan value, bool ignoreCase, bool throwOnFailure, out StatusCode result)
+ {
+ return TryParseFromEnumMemberValue(value, ignoreCase ? StringComparison.OrdinalIgnoreCase : StringComparison.Ordinal, throwOnFailure, out result);
+ }
+
+ private static bool TryParseFromEnumMemberValue(ReadOnlySpan value, StringComparison comparisonType, bool throwOnFailure, out StatusCode result)
+ {
+ bool success = EnumStringParser.TryParse(value, s_serializationStringParser, comparisonType, throwOnFailure, out int number);
+ if (!success)
+ {
+ result = 0;
+ return false;
+ }
+
+ result = (StatusCode)number;
+ return true;
+ }
+
+ ///
+ /// Converts the string representation of the serialized value to an equivalent enumerated object.
+ /// The return value indicates whether the conversion succeeded.
+ ///
+ /// The value as defined with .
+ /// One of the enumeration values that specifies how the strings will be compared.
+ ///
+ /// When this method returns, result contains an object of type StatusCode whose value is represented by value
+ /// if the parse operation succeeds. If the parse operation fails, result contains the default value of the
+ /// underlying type of StatusCode. Note that this value need not be a member of the StatusCode enumeration.
+ ///
+ /// true if the value parameter was converted successfully; otherwise, false.
+ /// is not a value.
+ [Obsolete("Use TryParseFromEnumMemberValue overload with 'ignoreCase' parameter")]
+ public static bool TryParseFromEnumMemberValue(
+ [NotNullWhen(true)] string? value,
+ StringComparison comparisonType,
+ out StatusCode result)
+ {
+ return TryParseFromEnumMemberValue(value.AsSpan(), comparisonType, throwOnFailure: false, out result);
+ }
+
+ ///
+ /// Converts the string representation of the value associated with one enumerated constant to
+ /// an equivalent enumerated object.
+ ///
+ /// The value as defined with .
+ /// One of the enumeration values that specifies how the strings will be compared.
+ ///
+ /// Contains an object of type StatusCode whose value is represented by value if the parse operation succeeds.
+ /// If the parse operation fails, result contains a null value.
+ ///
+ /// is not a value.
+ [Obsolete("Use TryParseFromEnumMemberValue overload with 'ignoreCase' parameter")]
+ public static StatusCode? TryParseFromEnumMemberValue(string? value, StringComparison comparisonType)
+ {
+ return TryParseFromEnumMemberValue(value.AsSpan(), comparisonType, throwOnFailure: false, out StatusCode result) ? result : null;
+ }
+
+ public static bool TryCreateFromDisplayShortName(
+ [NotNullWhen(true)] string? displayShortName,
+ StringComparison comparisonType,
+ out StatusCode result)
+ {
+ return TryCreateFromDisplayName(displayShortName, comparisonType, out result);
+ }
+
+ public static bool TryCreateFromDisplayShortName([NotNullWhen(true)] string? displayShortName, out StatusCode result)
+ {
+ return TryCreateFromDisplayShortName(displayShortName, StringComparison.Ordinal, out result);
+ }
+
+ public static StatusCode? TryCreateFromDisplayShortName(string? displayShortName, StringComparison comparisonType)
+ {
+ return TryCreateFromDisplayShortName(displayShortName, comparisonType, out StatusCode result) ? result : null;
+ }
+
+ public static StatusCode? TryCreateFromDisplayShortName(string? displayShortName)
+ {
+ return TryCreateFromDisplayShortName(displayShortName, StringComparison.Ordinal, out StatusCode result) ? result : null;
+ }
+
+ public static bool TryCreateFromDisplayName(
+ [NotNullWhen(true)] string? displayName,
+ StringComparison comparisonType,
+ out StatusCode result)
+ {
+ int numValue;
+ switch (displayName)
+ {
+ case { } s when s.Equals("Unknown", comparisonType):
+ numValue = -1;
+ break;
+ case { } s when s.Equals("Success", comparisonType):
+ numValue = 0;
+ break;
+ case { } s when s.Equals("Error", comparisonType):
+ numValue = -2;
+ break;
+ case { } s when s.Equals("NotFound", comparisonType):
+ numValue = -3;
+ break;
+ case { } s when s.Equals("Timeout", comparisonType):
+ numValue = -4;
+ break;
+ case { } s when s.Equals("Unauthorized", comparisonType):
+ numValue = -5;
+ break;
+ case { } s when s.Equals("Forbidden", comparisonType):
+ numValue = -6;
+ break;
+ case { } s when s.Equals("Conflict", comparisonType):
+ numValue = -7;
+ break;
+ case { } s when s.Equals("Gone", comparisonType):
+ numValue = -8;
+ break;
+ case { } s when s.Equals("Invalid request", comparisonType):
+ numValue = -9;
+ break;
+ case { } s when s.Equals("ServerError", comparisonType):
+ numValue = -10;
+ break;
+ default:
+ result = default;
+ return false;
+ }
+
+ result = (StatusCode)numValue;
+ return true;
+ }
+
+ public static bool TryCreateFromDisplayName([NotNullWhen(true)] string? displayName, out StatusCode result)
+ {
+ return TryCreateFromDisplayName(displayName, StringComparison.Ordinal, out result);
+ }
+
+ public static StatusCode? TryCreateFromDisplayName(string? displayName, StringComparison comparisonType)
+ {
+ return TryCreateFromDisplayName(displayName, comparisonType, out StatusCode result) ? result : null;
+ }
+
+ public static StatusCode? TryCreateFromDisplayName(string? displayName)
+ {
+ return TryCreateFromDisplayName(displayName, StringComparison.Ordinal, out StatusCode result) ? result : null;
+ }
+
+ public static bool TryCreateFromDescription(
+ [NotNullWhen(true)] string? description,
+ StringComparison comparisonType,
+ out StatusCode result)
+ {
+ int numValue;
+ switch (description)
+ {
+ case { } s when s.Equals("The request is invalid", comparisonType):
+ numValue = -9;
+ break;
+ default:
+ result = default;
+ return false;
+ }
+
+ result = (StatusCode)numValue;
+ return true;
+ }
+
+ public static bool TryCreateFromDescription([NotNullWhen(true)] string? description, out StatusCode result)
+ {
+ return TryCreateFromDescription(description, StringComparison.Ordinal, out result);
+ }
+
+ public static StatusCode? TryCreateFromDescription(string? description, StringComparison comparisonType)
+ {
+ return TryCreateFromDescription(description, comparisonType, out StatusCode result) ? result : null;
+ }
+
+ public static StatusCode? TryCreateFromDescription(string? description)
+ {
+ return TryCreateFromDescription(description, StringComparison.Ordinal, out StatusCode result) ? result : null;
+ }
+
+ /// Retrieves an array of the values of the constants in the StatusCode enumeration.
+ /// An array that contains the values of the constants in StatusCode.
+ public static StatusCode[] GetValues()
+ {
+ return new[]
+ {
+ (StatusCode)(-1),
+ (StatusCode)(0),
+ (StatusCode)(-2),
+ (StatusCode)(-3),
+ (StatusCode)(-4),
+ (StatusCode)(-5),
+ (StatusCode)(-6),
+ (StatusCode)(-7),
+ (StatusCode)(-8),
+ (StatusCode)(-9),
+ (StatusCode)(-10),
+ };
+ }
+
+ /// Retrieves an array of the names of the constants in StatusCode enumeration.
+ /// A string array of the names of the constants in StatusCode.
+ public static string[] GetNames()
+ {
+ return new[]
+ {
+ "Unknown",
+ "Success",
+ "Error",
+ "NotFound",
+ "Timeout",
+ "Unauthorized",
+ "Forbidden",
+ "Conflict",
+ "Gone",
+ "InvalidRequest",
+ "ServerError",
+ };
+ }
+
+ [DoesNotReturn]
+ private static void ThrowArgumentNullException(string paramName)
+ {
+ throw new ArgumentNullException(paramName);
+ }
+ }
+}
diff --git a/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.StatusCodeValidation.g.cs b/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.StatusCodeValidation.g.cs
new file mode 100644
index 0000000..3919622
--- /dev/null
+++ b/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.StatusCodeValidation.g.cs
@@ -0,0 +1,81 @@
+//
+#nullable enable
+
+using System;
+using System.Diagnostics.CodeAnalysis;
+
+#pragma warning disable CS1591 // publicly visible type or member must be documented
+
+namespace Raiqub.Generators.EnumUtilities.IntegrationTests.Models
+{
+ [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.8.0.0")]
+ public static partial class StatusCodeValidation
+ {
+ /// Returns a boolean telling whether the value of instance exists in the enumeration.
+ /// true if the value of instance exists in the enumeration; false otherwise.
+ public static bool IsDefined(StatusCode value)
+ {
+ return (int)value switch
+ {
+ -1 => true,
+ 0 => true,
+ -2 => true,
+ -3 => true,
+ -4 => true,
+ -5 => true,
+ -6 => true,
+ -7 => true,
+ -8 => true,
+ -9 => true,
+ -10 => true,
+ _ => false
+ };
+ }
+
+ public static bool IsDefined(
+ [NotNullWhen(true)] string? name,
+ StringComparison comparisonType)
+ {
+ return name switch
+ {
+ { } s when s.Equals("Unknown", comparisonType) => true,
+ { } s when s.Equals("Success", comparisonType) => true,
+ { } s when s.Equals("Error", comparisonType) => true,
+ { } s when s.Equals("NotFound", comparisonType) => true,
+ { } s when s.Equals("Timeout", comparisonType) => true,
+ { } s when s.Equals("Unauthorized", comparisonType) => true,
+ { } s when s.Equals("Forbidden", comparisonType) => true,
+ { } s when s.Equals("Conflict", comparisonType) => true,
+ { } s when s.Equals("Gone", comparisonType) => true,
+ { } s when s.Equals("InvalidRequest", comparisonType) => true,
+ { } s when s.Equals("ServerError", comparisonType) => true,
+ _ => false
+ };
+ }
+
+ public static bool IsDefinedIgnoreCase([NotNullWhen(true)] string? name)
+ {
+ return IsDefined(name, StringComparison.OrdinalIgnoreCase);
+ }
+
+ public static bool IsDefined([NotNullWhen(true)] string? name)
+ {
+ return name switch
+ {
+ "Unknown" => true,
+ "Success" => true,
+ "Error" => true,
+ "NotFound" => true,
+ "Timeout" => true,
+ "Unauthorized" => true,
+ "Forbidden" => true,
+ "Conflict" => true,
+ "Gone" => true,
+ "InvalidRequest" => true,
+ "ServerError" => true,
+ _ => false
+ };
+ }
+ }
+}
diff --git a/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.UserRoleFactory.g.cs b/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.UserRoleFactory.g.cs
index 2df56df..166bed5 100644
--- a/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.UserRoleFactory.g.cs
+++ b/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.UserRoleFactory.g.cs
@@ -693,12 +693,12 @@ public static UserRole[] GetValues()
{
return new[]
{
- (UserRole)0,
- (UserRole)1,
- (UserRole)2,
- (UserRole)4,
- (UserRole)6,
- (UserRole)7,
+ (UserRole)(0),
+ (UserRole)(1),
+ (UserRole)(2),
+ (UserRole)(4),
+ (UserRole)(6),
+ (UserRole)(7),
};
}
diff --git a/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.WeekDaysFactory.g.cs b/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.WeekDaysFactory.g.cs
index b53f7d8..5d6fcd9 100644
--- a/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.WeekDaysFactory.g.cs
+++ b/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/Raiqub.Generators.EnumUtilities.IntegrationTests.Models.WeekDaysFactory.g.cs
@@ -502,13 +502,13 @@ public static WeekDays[] GetValues()
{
return new[]
{
- (WeekDays)0,
- (WeekDays)1,
- (WeekDays)2,
- (WeekDays)3,
- (WeekDays)4,
- (WeekDays)5,
- (WeekDays)6,
+ (WeekDays)(0),
+ (WeekDays)(1),
+ (WeekDays)(2),
+ (WeekDays)(3),
+ (WeekDays)(4),
+ (WeekDays)(5),
+ (WeekDays)(6),
};
}
diff --git a/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/_.NoNamespaceFactory.g.cs b/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/_.NoNamespaceFactory.g.cs
index 96ddcfb..bd8dbcb 100644
--- a/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/_.NoNamespaceFactory.g.cs
+++ b/tests/EnumUtilities.Generators.IntegrationTests/Generated/Raiqub.Generators.EnumUtilities/Raiqub.Generators.EnumUtilities.EnumUtilitiesGenerator/_.NoNamespaceFactory.g.cs
@@ -339,9 +339,9 @@ public static NoNamespace[] GetValues()
{
return new[]
{
- (NoNamespace)0,
- (NoNamespace)1,
- (NoNamespace)2,
+ (NoNamespace)(0),
+ (NoNamespace)(1),
+ (NoNamespace)(2),
};
}
diff --git a/tests/EnumUtilities.Generators.IntegrationTests/Models/StatusCode.cs b/tests/EnumUtilities.Generators.IntegrationTests/Models/StatusCode.cs
new file mode 100644
index 0000000..0476cde
--- /dev/null
+++ b/tests/EnumUtilities.Generators.IntegrationTests/Models/StatusCode.cs
@@ -0,0 +1,23 @@
+using System.ComponentModel.DataAnnotations;
+using System.Runtime.Serialization;
+
+namespace Raiqub.Generators.EnumUtilities.IntegrationTests.Models;
+
+[EnumGenerator]
+public enum StatusCode
+{
+ Unknown = -1,
+ Success = 0,
+ Error = -2,
+ [EnumMember(Value = "Not Found")] NotFound = -3,
+ Timeout = -4,
+ Unauthorized = -5,
+ Forbidden = -6,
+ Conflict = -7,
+ Gone = -8,
+
+ [Display(Name = "Invalid request", Description = "The request is invalid")]
+ InvalidRequest = -9,
+
+ ServerError = -10,
+}
diff --git a/tests/EnumUtilities.Generators.IntegrationTests/packages.lock.json b/tests/EnumUtilities.Generators.IntegrationTests/packages.lock.json
index ec76a9f..9f5aff2 100644
--- a/tests/EnumUtilities.Generators.IntegrationTests/packages.lock.json
+++ b/tests/EnumUtilities.Generators.IntegrationTests/packages.lock.json
@@ -37,12 +37,12 @@
},
"Microsoft.NET.Test.Sdk": {
"type": "Direct",
- "requested": "[17.11.0, )",
- "resolved": "17.11.0",
- "contentHash": "fH7P0LihMXgnlNLtrXGetHd30aQcD+YrSbWXbCPBnrypdRApPgNqd/TgncTlSVY1bbLYdnvpBgts2dcnK37GzA==",
+ "requested": "[17.11.1, )",
+ "resolved": "17.11.1",
+ "contentHash": "U3Ty4BaGoEu+T2bwSko9tWqWUOU16WzSFkq6U8zve75oRBMSLTBdMAZrVNNz1Tq12aCdDom9fcOcM9QZaFHqFg==",
"dependencies": {
- "Microsoft.CodeCoverage": "17.11.0",
- "Microsoft.TestPlatform.TestHost": "17.11.0"
+ "Microsoft.CodeCoverage": "17.11.1",
+ "Microsoft.TestPlatform.TestHost": "17.11.1"
}
},
"Nerdbank.GitVersioning": {
@@ -53,13 +53,13 @@
},
"xunit": {
"type": "Direct",
- "requested": "[2.9.0, )",
- "resolved": "2.9.0",
- "contentHash": "PtU3rZ0ThdmdJqTbK7GkgFf6iBaCR6Q0uvJHznID+XEYk2v6O/b7sRxqnbi3B2gRDXxjTqMkVNayzwsqsFUxRw==",
+ "requested": "[2.9.2, )",
+ "resolved": "2.9.2",
+ "contentHash": "7LhFS2N9Z6Xgg8aE5lY95cneYivRMfRI8v+4PATa4S64D5Z/Plkg0qa8dTRHSiGRgVZ/CL2gEfJDE5AUhOX+2Q==",
"dependencies": {
- "xunit.analyzers": "1.15.0",
- "xunit.assert": "2.9.0",
- "xunit.core": "[2.9.0]"
+ "xunit.analyzers": "1.16.0",
+ "xunit.assert": "2.9.2",
+ "xunit.core": "[2.9.2]"
}
},
"xunit.runner.visualstudio": {
@@ -70,8 +70,8 @@
},
"Microsoft.CodeCoverage": {
"type": "Transitive",
- "resolved": "17.11.0",
- "contentHash": "QKcOSuw7MZG4XiQ+pCj+Ib6amOwoRDEO7e3DbxqXeOPXSnfyGXYoZQI8I140s1mKQVn1Vh+c5WlKvCvlgMovpg=="
+ "resolved": "17.11.1",
+ "contentHash": "nPJqrcA5iX+Y0kqoT3a+pD/8lrW/V7ayqnEJQsTonSoPz59J8bmoQhcSN4G8+UJ64Hkuf0zuxnfuj2lkHOq4cA=="
},
"Microsoft.EntityFrameworkCore.Abstractions": {
"type": "Transitive",
@@ -153,18 +153,18 @@
},
"Microsoft.TestPlatform.ObjectModel": {
"type": "Transitive",
- "resolved": "17.11.0",
- "contentHash": "PU+CC1yRzbR0IllrtdILaeep7WP5OIrvmWrvCMqG3jB1h4F6Ur7CYHl6ENbDVXPzEvygXh0GWbTyrbjfvgTpAg==",
+ "resolved": "17.11.1",
+ "contentHash": "E2jZqAU6JeWEVsyOEOrSW1o1bpHLgb25ypvKNB/moBXPVsFYBPd/Jwi7OrYahG50J83LfHzezYI+GaEkpAotiA==",
"dependencies": {
"System.Reflection.Metadata": "1.6.0"
}
},
"Microsoft.TestPlatform.TestHost": {
"type": "Transitive",
- "resolved": "17.11.0",
- "contentHash": "KMzJO3dm3+9W8JRQ3IDviu0v7uXP5Lgii6TuxMc5m8ynaqcGnn7Y18cMb5AsP2xp59uUHO474WZrssxBdb8ZxQ==",
+ "resolved": "17.11.1",
+ "contentHash": "DnG+GOqJXO/CkoqlJWeDFTgPhqD/V6VqUIL3vINizCWZ3X+HshCtbbyDdSHQQEjrc2Sl/K3yaxX6s+5LFEdYuw==",
"dependencies": {
- "Microsoft.TestPlatform.ObjectModel": "17.11.0",
+ "Microsoft.TestPlatform.ObjectModel": "17.11.1",
"Newtonsoft.Json": "13.0.1"
}
},
@@ -206,37 +206,37 @@
},
"xunit.analyzers": {
"type": "Transitive",
- "resolved": "1.15.0",
- "contentHash": "s+M8K/Rtlgr6CmD7AYQKrNTvT5sh0l0ZKDoZ3Z/ExhlIwfV9mGAMR4f7KqIB7SSK7ZOhqDTgTUMYPmKfmvWUWQ=="
+ "resolved": "1.16.0",
+ "contentHash": "hptYM7vGr46GUIgZt21YHO4rfuBAQS2eINbFo16CV/Dqq+24Tp+P5gDCACu1AbFfW4Sp/WRfDPSK8fmUUb8s0Q=="
},
"xunit.assert": {
"type": "Transitive",
- "resolved": "2.9.0",
- "contentHash": "Z/1pyia//860wEYTKn6Q5dmgikJdRjgE4t5AoxJkK8oTmidzPLEPG574kmm7LFkMLbH6Frwmgb750kcyR+hwoA=="
+ "resolved": "2.9.2",
+ "contentHash": "QkNBAQG4pa66cholm28AxijBjrmki98/vsEh4Sx5iplzotvPgpiotcxqJQMRC8d7RV7nIT8ozh97957hDnZwsQ=="
},
"xunit.core": {
"type": "Transitive",
- "resolved": "2.9.0",
- "contentHash": "uRaop9tZsZMCaUS4AfbSPGYHtvywWnm8XXFNUqII7ShWyDBgdchY6gyDNgO4AK1Lv/1NNW61Zq63CsDV6oH6Jg==",
+ "resolved": "2.9.2",
+ "contentHash": "O6RrNSdmZ0xgEn5kT927PNwog5vxTtKrWMihhhrT0Sg9jQ7iBDciYOwzBgP2krBEk5/GBXI18R1lKvmnxGcb4w==",
"dependencies": {
- "xunit.extensibility.core": "[2.9.0]",
- "xunit.extensibility.execution": "[2.9.0]"
+ "xunit.extensibility.core": "[2.9.2]",
+ "xunit.extensibility.execution": "[2.9.2]"
}
},
"xunit.extensibility.core": {
"type": "Transitive",
- "resolved": "2.9.0",
- "contentHash": "zjDEUSxsr6UNij4gIwCgMqQox+oLDPRZ+mubwWLci+SssPBFQD1xeRR4SvgBuXqbE0QXCJ/STVTp+lxiB5NLVA==",
+ "resolved": "2.9.2",
+ "contentHash": "Ol+KlBJz1x8BrdnhN2DeOuLrr1I/cTwtHCggL9BvYqFuVd/TUSzxNT5O0NxCIXth30bsKxgMfdqLTcORtM52yQ==",
"dependencies": {
"xunit.abstractions": "2.0.3"
}
},
"xunit.extensibility.execution": {
"type": "Transitive",
- "resolved": "2.9.0",
- "contentHash": "5ZTQZvmPLlBw6QzCOwM0KnMsZw6eGjbmC176QHZlcbQoMhGIeGcYzYwn5w9yXxf+4phtplMuVqTpTbFDQh2bqQ==",
+ "resolved": "2.9.2",
+ "contentHash": "rKMpq4GsIUIJibXuZoZ8lYp5EpROlnYaRpwu9Zr0sRZXE7JqJfEEbCsUriZqB+ByXCLFBJyjkTRULMdC+U566g==",
"dependencies": {
- "xunit.extensibility.core": "[2.9.0]"
+ "xunit.extensibility.core": "[2.9.2]"
}
},
"Raiqub.Generators.EnumUtilities": {
@@ -279,12 +279,12 @@
},
"Microsoft.NET.Test.Sdk": {
"type": "Direct",
- "requested": "[17.11.0, )",
- "resolved": "17.11.0",
- "contentHash": "fH7P0LihMXgnlNLtrXGetHd30aQcD+YrSbWXbCPBnrypdRApPgNqd/TgncTlSVY1bbLYdnvpBgts2dcnK37GzA==",
+ "requested": "[17.11.1, )",
+ "resolved": "17.11.1",
+ "contentHash": "U3Ty4BaGoEu+T2bwSko9tWqWUOU16WzSFkq6U8zve75oRBMSLTBdMAZrVNNz1Tq12aCdDom9fcOcM9QZaFHqFg==",
"dependencies": {
- "Microsoft.CodeCoverage": "17.11.0",
- "Microsoft.TestPlatform.TestHost": "17.11.0"
+ "Microsoft.CodeCoverage": "17.11.1",
+ "Microsoft.TestPlatform.TestHost": "17.11.1"
}
},
"Nerdbank.GitVersioning": {
@@ -295,13 +295,13 @@
},
"xunit": {
"type": "Direct",
- "requested": "[2.9.0, )",
- "resolved": "2.9.0",
- "contentHash": "PtU3rZ0ThdmdJqTbK7GkgFf6iBaCR6Q0uvJHznID+XEYk2v6O/b7sRxqnbi3B2gRDXxjTqMkVNayzwsqsFUxRw==",
+ "requested": "[2.9.2, )",
+ "resolved": "2.9.2",
+ "contentHash": "7LhFS2N9Z6Xgg8aE5lY95cneYivRMfRI8v+4PATa4S64D5Z/Plkg0qa8dTRHSiGRgVZ/CL2gEfJDE5AUhOX+2Q==",
"dependencies": {
- "xunit.analyzers": "1.15.0",
- "xunit.assert": "2.9.0",
- "xunit.core": "[2.9.0]"
+ "xunit.analyzers": "1.16.0",
+ "xunit.assert": "2.9.2",
+ "xunit.core": "[2.9.2]"
}
},
"xunit.runner.visualstudio": {
@@ -312,8 +312,8 @@
},
"Microsoft.CodeCoverage": {
"type": "Transitive",
- "resolved": "17.11.0",
- "contentHash": "QKcOSuw7MZG4XiQ+pCj+Ib6amOwoRDEO7e3DbxqXeOPXSnfyGXYoZQI8I140s1mKQVn1Vh+c5WlKvCvlgMovpg=="
+ "resolved": "17.11.1",
+ "contentHash": "nPJqrcA5iX+Y0kqoT3a+pD/8lrW/V7ayqnEJQsTonSoPz59J8bmoQhcSN4G8+UJ64Hkuf0zuxnfuj2lkHOq4cA=="
},
"Microsoft.EntityFrameworkCore.Abstractions": {
"type": "Transitive",
@@ -395,18 +395,18 @@
},
"Microsoft.TestPlatform.ObjectModel": {
"type": "Transitive",
- "resolved": "17.11.0",
- "contentHash": "PU+CC1yRzbR0IllrtdILaeep7WP5OIrvmWrvCMqG3jB1h4F6Ur7CYHl6ENbDVXPzEvygXh0GWbTyrbjfvgTpAg==",
+ "resolved": "17.11.1",
+ "contentHash": "E2jZqAU6JeWEVsyOEOrSW1o1bpHLgb25ypvKNB/moBXPVsFYBPd/Jwi7OrYahG50J83LfHzezYI+GaEkpAotiA==",
"dependencies": {
"System.Reflection.Metadata": "1.6.0"
}
},
"Microsoft.TestPlatform.TestHost": {
"type": "Transitive",
- "resolved": "17.11.0",
- "contentHash": "KMzJO3dm3+9W8JRQ3IDviu0v7uXP5Lgii6TuxMc5m8ynaqcGnn7Y18cMb5AsP2xp59uUHO474WZrssxBdb8ZxQ==",
+ "resolved": "17.11.1",
+ "contentHash": "DnG+GOqJXO/CkoqlJWeDFTgPhqD/V6VqUIL3vINizCWZ3X+HshCtbbyDdSHQQEjrc2Sl/K3yaxX6s+5LFEdYuw==",
"dependencies": {
- "Microsoft.TestPlatform.ObjectModel": "17.11.0",
+ "Microsoft.TestPlatform.ObjectModel": "17.11.1",
"Newtonsoft.Json": "13.0.1"
}
},
@@ -448,37 +448,37 @@
},
"xunit.analyzers": {
"type": "Transitive",
- "resolved": "1.15.0",
- "contentHash": "s+M8K/Rtlgr6CmD7AYQKrNTvT5sh0l0ZKDoZ3Z/ExhlIwfV9mGAMR4f7KqIB7SSK7ZOhqDTgTUMYPmKfmvWUWQ=="
+ "resolved": "1.16.0",
+ "contentHash": "hptYM7vGr46GUIgZt21YHO4rfuBAQS2eINbFo16CV/Dqq+24Tp+P5gDCACu1AbFfW4Sp/WRfDPSK8fmUUb8s0Q=="
},
"xunit.assert": {
"type": "Transitive",
- "resolved": "2.9.0",
- "contentHash": "Z/1pyia//860wEYTKn6Q5dmgikJdRjgE4t5AoxJkK8oTmidzPLEPG574kmm7LFkMLbH6Frwmgb750kcyR+hwoA=="
+ "resolved": "2.9.2",
+ "contentHash": "QkNBAQG4pa66cholm28AxijBjrmki98/vsEh4Sx5iplzotvPgpiotcxqJQMRC8d7RV7nIT8ozh97957hDnZwsQ=="
},
"xunit.core": {
"type": "Transitive",
- "resolved": "2.9.0",
- "contentHash": "uRaop9tZsZMCaUS4AfbSPGYHtvywWnm8XXFNUqII7ShWyDBgdchY6gyDNgO4AK1Lv/1NNW61Zq63CsDV6oH6Jg==",
+ "resolved": "2.9.2",
+ "contentHash": "O6RrNSdmZ0xgEn5kT927PNwog5vxTtKrWMihhhrT0Sg9jQ7iBDciYOwzBgP2krBEk5/GBXI18R1lKvmnxGcb4w==",
"dependencies": {
- "xunit.extensibility.core": "[2.9.0]",
- "xunit.extensibility.execution": "[2.9.0]"
+ "xunit.extensibility.core": "[2.9.2]",
+ "xunit.extensibility.execution": "[2.9.2]"
}
},
"xunit.extensibility.core": {
"type": "Transitive",
- "resolved": "2.9.0",
- "contentHash": "zjDEUSxsr6UNij4gIwCgMqQox+oLDPRZ+mubwWLci+SssPBFQD1xeRR4SvgBuXqbE0QXCJ/STVTp+lxiB5NLVA==",
+ "resolved": "2.9.2",
+ "contentHash": "Ol+KlBJz1x8BrdnhN2DeOuLrr1I/cTwtHCggL9BvYqFuVd/TUSzxNT5O0NxCIXth30bsKxgMfdqLTcORtM52yQ==",
"dependencies": {
"xunit.abstractions": "2.0.3"
}
},
"xunit.extensibility.execution": {
"type": "Transitive",
- "resolved": "2.9.0",
- "contentHash": "5ZTQZvmPLlBw6QzCOwM0KnMsZw6eGjbmC176QHZlcbQoMhGIeGcYzYwn5w9yXxf+4phtplMuVqTpTbFDQh2bqQ==",
+ "resolved": "2.9.2",
+ "contentHash": "rKMpq4GsIUIJibXuZoZ8lYp5EpROlnYaRpwu9Zr0sRZXE7JqJfEEbCsUriZqB+ByXCLFBJyjkTRULMdC+U566g==",
"dependencies": {
- "xunit.extensibility.core": "[2.9.0]"
+ "xunit.extensibility.core": "[2.9.2]"
}
},
"Raiqub.Generators.EnumUtilities": {
diff --git a/tests/EnumUtilities.Generators.Tests/EnumUtilities.Generators.Tests.csproj b/tests/EnumUtilities.Generators.Tests/EnumUtilities.Generators.Tests.csproj
index 1116a79..746dc32 100644
--- a/tests/EnumUtilities.Generators.Tests/EnumUtilities.Generators.Tests.csproj
+++ b/tests/EnumUtilities.Generators.Tests/EnumUtilities.Generators.Tests.csproj
@@ -15,8 +15,8 @@
-
-
+
+
diff --git a/tests/EnumUtilities.Generators.Tests/packages.lock.json b/tests/EnumUtilities.Generators.Tests/packages.lock.json
index 58f16e7..d1cd13c 100644
--- a/tests/EnumUtilities.Generators.Tests/packages.lock.json
+++ b/tests/EnumUtilities.Generators.Tests/packages.lock.json
@@ -56,12 +56,12 @@
},
"Microsoft.NET.Test.Sdk": {
"type": "Direct",
- "requested": "[17.11.0, )",
- "resolved": "17.11.0",
- "contentHash": "fH7P0LihMXgnlNLtrXGetHd30aQcD+YrSbWXbCPBnrypdRApPgNqd/TgncTlSVY1bbLYdnvpBgts2dcnK37GzA==",
+ "requested": "[17.11.1, )",
+ "resolved": "17.11.1",
+ "contentHash": "U3Ty4BaGoEu+T2bwSko9tWqWUOU16WzSFkq6U8zve75oRBMSLTBdMAZrVNNz1Tq12aCdDom9fcOcM9QZaFHqFg==",
"dependencies": {
- "Microsoft.CodeCoverage": "17.11.0",
- "Microsoft.TestPlatform.TestHost": "17.11.0"
+ "Microsoft.CodeCoverage": "17.11.1",
+ "Microsoft.TestPlatform.TestHost": "17.11.1"
}
},
"Nerdbank.GitVersioning": {
@@ -72,13 +72,13 @@
},
"xunit": {
"type": "Direct",
- "requested": "[2.9.0, )",
- "resolved": "2.9.0",
- "contentHash": "PtU3rZ0ThdmdJqTbK7GkgFf6iBaCR6Q0uvJHznID+XEYk2v6O/b7sRxqnbi3B2gRDXxjTqMkVNayzwsqsFUxRw==",
+ "requested": "[2.9.2, )",
+ "resolved": "2.9.2",
+ "contentHash": "7LhFS2N9Z6Xgg8aE5lY95cneYivRMfRI8v+4PATa4S64D5Z/Plkg0qa8dTRHSiGRgVZ/CL2gEfJDE5AUhOX+2Q==",
"dependencies": {
- "xunit.analyzers": "1.15.0",
- "xunit.assert": "2.9.0",
- "xunit.core": "[2.9.0]"
+ "xunit.analyzers": "1.16.0",
+ "xunit.assert": "2.9.2",
+ "xunit.core": "[2.9.2]"
}
},
"xunit.runner.visualstudio": {
@@ -177,8 +177,8 @@
},
"Microsoft.CodeCoverage": {
"type": "Transitive",
- "resolved": "17.11.0",
- "contentHash": "QKcOSuw7MZG4XiQ+pCj+Ib6amOwoRDEO7e3DbxqXeOPXSnfyGXYoZQI8I140s1mKQVn1Vh+c5WlKvCvlgMovpg=="
+ "resolved": "17.11.1",
+ "contentHash": "nPJqrcA5iX+Y0kqoT3a+pD/8lrW/V7ayqnEJQsTonSoPz59J8bmoQhcSN4G8+UJ64Hkuf0zuxnfuj2lkHOq4cA=="
},
"Microsoft.NETCore.Platforms": {
"type": "Transitive",
@@ -192,18 +192,18 @@
},
"Microsoft.TestPlatform.ObjectModel": {
"type": "Transitive",
- "resolved": "17.11.0",
- "contentHash": "PU+CC1yRzbR0IllrtdILaeep7WP5OIrvmWrvCMqG3jB1h4F6Ur7CYHl6ENbDVXPzEvygXh0GWbTyrbjfvgTpAg==",
+ "resolved": "17.11.1",
+ "contentHash": "E2jZqAU6JeWEVsyOEOrSW1o1bpHLgb25ypvKNB/moBXPVsFYBPd/Jwi7OrYahG50J83LfHzezYI+GaEkpAotiA==",
"dependencies": {
"System.Reflection.Metadata": "1.6.0"
}
},
"Microsoft.TestPlatform.TestHost": {
"type": "Transitive",
- "resolved": "17.11.0",
- "contentHash": "KMzJO3dm3+9W8JRQ3IDviu0v7uXP5Lgii6TuxMc5m8ynaqcGnn7Y18cMb5AsP2xp59uUHO474WZrssxBdb8ZxQ==",
+ "resolved": "17.11.1",
+ "contentHash": "DnG+GOqJXO/CkoqlJWeDFTgPhqD/V6VqUIL3vINizCWZ3X+HshCtbbyDdSHQQEjrc2Sl/K3yaxX6s+5LFEdYuw==",
"dependencies": {
- "Microsoft.TestPlatform.ObjectModel": "17.11.0",
+ "Microsoft.TestPlatform.ObjectModel": "17.11.1",
"Newtonsoft.Json": "13.0.1"
}
},
@@ -742,37 +742,37 @@
},
"xunit.analyzers": {
"type": "Transitive",
- "resolved": "1.15.0",
- "contentHash": "s+M8K/Rtlgr6CmD7AYQKrNTvT5sh0l0ZKDoZ3Z/ExhlIwfV9mGAMR4f7KqIB7SSK7ZOhqDTgTUMYPmKfmvWUWQ=="
+ "resolved": "1.16.0",
+ "contentHash": "hptYM7vGr46GUIgZt21YHO4rfuBAQS2eINbFo16CV/Dqq+24Tp+P5gDCACu1AbFfW4Sp/WRfDPSK8fmUUb8s0Q=="
},
"xunit.assert": {
"type": "Transitive",
- "resolved": "2.9.0",
- "contentHash": "Z/1pyia//860wEYTKn6Q5dmgikJdRjgE4t5AoxJkK8oTmidzPLEPG574kmm7LFkMLbH6Frwmgb750kcyR+hwoA=="
+ "resolved": "2.9.2",
+ "contentHash": "QkNBAQG4pa66cholm28AxijBjrmki98/vsEh4Sx5iplzotvPgpiotcxqJQMRC8d7RV7nIT8ozh97957hDnZwsQ=="
},
"xunit.core": {
"type": "Transitive",
- "resolved": "2.9.0",
- "contentHash": "uRaop9tZsZMCaUS4AfbSPGYHtvywWnm8XXFNUqII7ShWyDBgdchY6gyDNgO4AK1Lv/1NNW61Zq63CsDV6oH6Jg==",
+ "resolved": "2.9.2",
+ "contentHash": "O6RrNSdmZ0xgEn5kT927PNwog5vxTtKrWMihhhrT0Sg9jQ7iBDciYOwzBgP2krBEk5/GBXI18R1lKvmnxGcb4w==",
"dependencies": {
- "xunit.extensibility.core": "[2.9.0]",
- "xunit.extensibility.execution": "[2.9.0]"
+ "xunit.extensibility.core": "[2.9.2]",
+ "xunit.extensibility.execution": "[2.9.2]"
}
},
"xunit.extensibility.core": {
"type": "Transitive",
- "resolved": "2.9.0",
- "contentHash": "zjDEUSxsr6UNij4gIwCgMqQox+oLDPRZ+mubwWLci+SssPBFQD1xeRR4SvgBuXqbE0QXCJ/STVTp+lxiB5NLVA==",
+ "resolved": "2.9.2",
+ "contentHash": "Ol+KlBJz1x8BrdnhN2DeOuLrr1I/cTwtHCggL9BvYqFuVd/TUSzxNT5O0NxCIXth30bsKxgMfdqLTcORtM52yQ==",
"dependencies": {
"xunit.abstractions": "2.0.3"
}
},
"xunit.extensibility.execution": {
"type": "Transitive",
- "resolved": "2.9.0",
- "contentHash": "5ZTQZvmPLlBw6QzCOwM0KnMsZw6eGjbmC176QHZlcbQoMhGIeGcYzYwn5w9yXxf+4phtplMuVqTpTbFDQh2bqQ==",
+ "resolved": "2.9.2",
+ "contentHash": "rKMpq4GsIUIJibXuZoZ8lYp5EpROlnYaRpwu9Zr0sRZXE7JqJfEEbCsUriZqB+ByXCLFBJyjkTRULMdC+U566g==",
"dependencies": {
- "xunit.extensibility.core": "[2.9.0]"
+ "xunit.extensibility.core": "[2.9.2]"
}
},
"Raiqub.Generators.EnumUtilities": {
diff --git a/tests/EnumUtilities.Tests/EnumUtilities.Tests.csproj b/tests/EnumUtilities.Tests/EnumUtilities.Tests.csproj
index 19c7c13..4197247 100644
--- a/tests/EnumUtilities.Tests/EnumUtilities.Tests.csproj
+++ b/tests/EnumUtilities.Tests/EnumUtilities.Tests.csproj
@@ -11,9 +11,9 @@
-
-
-
+
+
+
diff --git a/tests/EnumUtilities.Tests/packages.lock.json b/tests/EnumUtilities.Tests/packages.lock.json
index 1b7560e..1f68272 100644
--- a/tests/EnumUtilities.Tests/packages.lock.json
+++ b/tests/EnumUtilities.Tests/packages.lock.json
@@ -16,21 +16,21 @@
},
"FluentAssertions": {
"type": "Direct",
- "requested": "[6.12.0, )",
- "resolved": "6.12.0",
- "contentHash": "ZXhHT2YwP9lajrwSKbLlFqsmCCvFJMoRSK9t7sImfnCyd0OB3MhgxdoMcVqxbq1iyxD6mD2fiackWmBb7ayiXQ==",
+ "requested": "[6.12.1, )",
+ "resolved": "6.12.1",
+ "contentHash": "hciWwryyLw3eonfqhFpOMTXyM1/auJChYslEBA+iGJyuBs5O3t/kA8YaeH4iRo/2Fe3ElSYL86C0miivtZ0f3g==",
"dependencies": {
"System.Configuration.ConfigurationManager": "4.4.0"
}
},
"Microsoft.NET.Test.Sdk": {
"type": "Direct",
- "requested": "[17.11.0, )",
- "resolved": "17.11.0",
- "contentHash": "fH7P0LihMXgnlNLtrXGetHd30aQcD+YrSbWXbCPBnrypdRApPgNqd/TgncTlSVY1bbLYdnvpBgts2dcnK37GzA==",
+ "requested": "[17.11.1, )",
+ "resolved": "17.11.1",
+ "contentHash": "U3Ty4BaGoEu+T2bwSko9tWqWUOU16WzSFkq6U8zve75oRBMSLTBdMAZrVNNz1Tq12aCdDom9fcOcM9QZaFHqFg==",
"dependencies": {
- "Microsoft.CodeCoverage": "17.11.0",
- "Microsoft.TestPlatform.TestHost": "17.11.0"
+ "Microsoft.CodeCoverage": "17.11.1",
+ "Microsoft.TestPlatform.TestHost": "17.11.1"
}
},
"Nerdbank.GitVersioning": {
@@ -41,13 +41,13 @@
},
"xunit": {
"type": "Direct",
- "requested": "[2.9.0, )",
- "resolved": "2.9.0",
- "contentHash": "PtU3rZ0ThdmdJqTbK7GkgFf6iBaCR6Q0uvJHznID+XEYk2v6O/b7sRxqnbi3B2gRDXxjTqMkVNayzwsqsFUxRw==",
+ "requested": "[2.9.2, )",
+ "resolved": "2.9.2",
+ "contentHash": "7LhFS2N9Z6Xgg8aE5lY95cneYivRMfRI8v+4PATa4S64D5Z/Plkg0qa8dTRHSiGRgVZ/CL2gEfJDE5AUhOX+2Q==",
"dependencies": {
- "xunit.analyzers": "1.15.0",
- "xunit.assert": "2.9.0",
- "xunit.core": "[2.9.0]"
+ "xunit.analyzers": "1.16.0",
+ "xunit.assert": "2.9.2",
+ "xunit.core": "[2.9.2]"
}
},
"Xunit.Combinatorial": {
@@ -67,23 +67,23 @@
},
"Microsoft.CodeCoverage": {
"type": "Transitive",
- "resolved": "17.11.0",
- "contentHash": "QKcOSuw7MZG4XiQ+pCj+Ib6amOwoRDEO7e3DbxqXeOPXSnfyGXYoZQI8I140s1mKQVn1Vh+c5WlKvCvlgMovpg=="
+ "resolved": "17.11.1",
+ "contentHash": "nPJqrcA5iX+Y0kqoT3a+pD/8lrW/V7ayqnEJQsTonSoPz59J8bmoQhcSN4G8+UJ64Hkuf0zuxnfuj2lkHOq4cA=="
},
"Microsoft.TestPlatform.ObjectModel": {
"type": "Transitive",
- "resolved": "17.11.0",
- "contentHash": "PU+CC1yRzbR0IllrtdILaeep7WP5OIrvmWrvCMqG3jB1h4F6Ur7CYHl6ENbDVXPzEvygXh0GWbTyrbjfvgTpAg==",
+ "resolved": "17.11.1",
+ "contentHash": "E2jZqAU6JeWEVsyOEOrSW1o1bpHLgb25ypvKNB/moBXPVsFYBPd/Jwi7OrYahG50J83LfHzezYI+GaEkpAotiA==",
"dependencies": {
"System.Reflection.Metadata": "1.6.0"
}
},
"Microsoft.TestPlatform.TestHost": {
"type": "Transitive",
- "resolved": "17.11.0",
- "contentHash": "KMzJO3dm3+9W8JRQ3IDviu0v7uXP5Lgii6TuxMc5m8ynaqcGnn7Y18cMb5AsP2xp59uUHO474WZrssxBdb8ZxQ==",
+ "resolved": "17.11.1",
+ "contentHash": "DnG+GOqJXO/CkoqlJWeDFTgPhqD/V6VqUIL3vINizCWZ3X+HshCtbbyDdSHQQEjrc2Sl/K3yaxX6s+5LFEdYuw==",
"dependencies": {
- "Microsoft.TestPlatform.ObjectModel": "17.11.0",
+ "Microsoft.TestPlatform.ObjectModel": "17.11.1",
"Newtonsoft.Json": "13.0.1"
}
},
@@ -117,37 +117,37 @@
},
"xunit.analyzers": {
"type": "Transitive",
- "resolved": "1.15.0",
- "contentHash": "s+M8K/Rtlgr6CmD7AYQKrNTvT5sh0l0ZKDoZ3Z/ExhlIwfV9mGAMR4f7KqIB7SSK7ZOhqDTgTUMYPmKfmvWUWQ=="
+ "resolved": "1.16.0",
+ "contentHash": "hptYM7vGr46GUIgZt21YHO4rfuBAQS2eINbFo16CV/Dqq+24Tp+P5gDCACu1AbFfW4Sp/WRfDPSK8fmUUb8s0Q=="
},
"xunit.assert": {
"type": "Transitive",
- "resolved": "2.9.0",
- "contentHash": "Z/1pyia//860wEYTKn6Q5dmgikJdRjgE4t5AoxJkK8oTmidzPLEPG574kmm7LFkMLbH6Frwmgb750kcyR+hwoA=="
+ "resolved": "2.9.2",
+ "contentHash": "QkNBAQG4pa66cholm28AxijBjrmki98/vsEh4Sx5iplzotvPgpiotcxqJQMRC8d7RV7nIT8ozh97957hDnZwsQ=="
},
"xunit.core": {
"type": "Transitive",
- "resolved": "2.9.0",
- "contentHash": "uRaop9tZsZMCaUS4AfbSPGYHtvywWnm8XXFNUqII7ShWyDBgdchY6gyDNgO4AK1Lv/1NNW61Zq63CsDV6oH6Jg==",
+ "resolved": "2.9.2",
+ "contentHash": "O6RrNSdmZ0xgEn5kT927PNwog5vxTtKrWMihhhrT0Sg9jQ7iBDciYOwzBgP2krBEk5/GBXI18R1lKvmnxGcb4w==",
"dependencies": {
- "xunit.extensibility.core": "[2.9.0]",
- "xunit.extensibility.execution": "[2.9.0]"
+ "xunit.extensibility.core": "[2.9.2]",
+ "xunit.extensibility.execution": "[2.9.2]"
}
},
"xunit.extensibility.core": {
"type": "Transitive",
- "resolved": "2.9.0",
- "contentHash": "zjDEUSxsr6UNij4gIwCgMqQox+oLDPRZ+mubwWLci+SssPBFQD1xeRR4SvgBuXqbE0QXCJ/STVTp+lxiB5NLVA==",
+ "resolved": "2.9.2",
+ "contentHash": "Ol+KlBJz1x8BrdnhN2DeOuLrr1I/cTwtHCggL9BvYqFuVd/TUSzxNT5O0NxCIXth30bsKxgMfdqLTcORtM52yQ==",
"dependencies": {
"xunit.abstractions": "2.0.3"
}
},
"xunit.extensibility.execution": {
"type": "Transitive",
- "resolved": "2.9.0",
- "contentHash": "5ZTQZvmPLlBw6QzCOwM0KnMsZw6eGjbmC176QHZlcbQoMhGIeGcYzYwn5w9yXxf+4phtplMuVqTpTbFDQh2bqQ==",
+ "resolved": "2.9.2",
+ "contentHash": "rKMpq4GsIUIJibXuZoZ8lYp5EpROlnYaRpwu9Zr0sRZXE7JqJfEEbCsUriZqB+ByXCLFBJyjkTRULMdC+U566g==",
"dependencies": {
- "xunit.extensibility.core": "[2.9.0]"
+ "xunit.extensibility.core": "[2.9.2]"
}
},
"Raiqub.Generators.EnumUtilities": {