diff --git a/ICSharpCode.Decompiler/CSharp/CSharpLanguageVersion.cs b/ICSharpCode.Decompiler/CSharp/CSharpLanguageVersion.cs index 07e76b0c9..2ed638782 100644 --- a/ICSharpCode.Decompiler/CSharp/CSharpLanguageVersion.cs +++ b/ICSharpCode.Decompiler/CSharp/CSharpLanguageVersion.cs @@ -16,8 +16,11 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. +using NetEscapades.EnumGenerators; + namespace ICSharpCode.Decompiler.CSharp { + [EnumExtensions] public enum LanguageVersion { CSharp1 = 1, diff --git a/ICSharpCode.Decompiler/CSharp/Resolver/OverloadResolutionErrors.cs b/ICSharpCode.Decompiler/CSharp/Resolver/OverloadResolutionErrors.cs index 84007e59a..143fd3140 100644 --- a/ICSharpCode.Decompiler/CSharp/Resolver/OverloadResolutionErrors.cs +++ b/ICSharpCode.Decompiler/CSharp/Resolver/OverloadResolutionErrors.cs @@ -18,9 +18,12 @@ using System; +using NetEscapades.EnumGenerators; + namespace ICSharpCode.Decompiler.CSharp.Resolver { [Flags] + [EnumExtensions] public enum OverloadResolutionErrors { None = 0, diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Modifiers.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Modifiers.cs index 1a04824b9..8651c0002 100644 --- a/ICSharpCode.Decompiler/CSharp/Syntax/Modifiers.cs +++ b/ICSharpCode.Decompiler/CSharp/Syntax/Modifiers.cs @@ -28,9 +28,12 @@ using System; +using NetEscapades.EnumGenerators; + namespace ICSharpCode.Decompiler.CSharp.Syntax { [Flags] + [EnumExtensions] public enum Modifiers { None = 0, diff --git a/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj b/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj index 20a1b5d0a..ac8b7c9c5 100644 --- a/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj +++ b/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj @@ -47,11 +47,11 @@ - + true - true + true @@ -84,6 +84,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/ICSharpCode.Decompiler/IL/InstructionFlags.cs b/ICSharpCode.Decompiler/IL/InstructionFlags.cs index e1a661a8b..547fd1608 100644 --- a/ICSharpCode.Decompiler/IL/InstructionFlags.cs +++ b/ICSharpCode.Decompiler/IL/InstructionFlags.cs @@ -19,9 +19,12 @@ using System; +using NetEscapades.EnumGenerators; + namespace ICSharpCode.Decompiler.IL { [Flags] + [EnumExtensions] public enum InstructionFlags { None = 0, diff --git a/ICSharpCode.Decompiler/IL/Instructions/DynamicInstructions.cs b/ICSharpCode.Decompiler/IL/Instructions/DynamicInstructions.cs index ee878ebb4..d1d830fb0 100644 --- a/ICSharpCode.Decompiler/IL/Instructions/DynamicInstructions.cs +++ b/ICSharpCode.Decompiler/IL/Instructions/DynamicInstructions.cs @@ -26,9 +26,12 @@ using ICSharpCode.Decompiler.IL.Patterns; using ICSharpCode.Decompiler.TypeSystem; using ICSharpCode.Decompiler.Util; +using NetEscapades.EnumGenerators; + namespace ICSharpCode.Decompiler.IL { [Flags] + [EnumExtensions] public enum CSharpArgumentInfoFlags { None = 0, @@ -41,6 +44,7 @@ namespace ICSharpCode.Decompiler.IL } [Flags] + [EnumExtensions] public enum CSharpBinderFlags { None = 0, diff --git a/ICSharpCode.Decompiler/IL/Transforms/ILInlining.cs b/ICSharpCode.Decompiler/IL/Transforms/ILInlining.cs index 0bc5c2eb6..61638a089 100644 --- a/ICSharpCode.Decompiler/IL/Transforms/ILInlining.cs +++ b/ICSharpCode.Decompiler/IL/Transforms/ILInlining.cs @@ -24,9 +24,12 @@ using System.Reflection; using ICSharpCode.Decompiler.TypeSystem; using ICSharpCode.Decompiler.TypeSystem.Implementation; +using NetEscapades.EnumGenerators; + namespace ICSharpCode.Decompiler.IL.Transforms { [Flags] + [EnumExtensions] public enum InliningOptions { None = 0, diff --git a/ICSharpCode.Decompiler/Output/IAmbience.cs b/ICSharpCode.Decompiler/Output/IAmbience.cs index ba39d4c3b..36ccabc6e 100644 --- a/ICSharpCode.Decompiler/Output/IAmbience.cs +++ b/ICSharpCode.Decompiler/Output/IAmbience.cs @@ -20,9 +20,12 @@ using System; using ICSharpCode.Decompiler.TypeSystem; +using NetEscapades.EnumGenerators; + namespace ICSharpCode.Decompiler.Output { [Flags] + [EnumExtensions] public enum ConversionFlags { /// diff --git a/ICSharpCode.Decompiler/TypeSystem/DecompilerTypeSystem.cs b/ICSharpCode.Decompiler/TypeSystem/DecompilerTypeSystem.cs index 697f64b9d..617b848bf 100644 --- a/ICSharpCode.Decompiler/TypeSystem/DecompilerTypeSystem.cs +++ b/ICSharpCode.Decompiler/TypeSystem/DecompilerTypeSystem.cs @@ -25,6 +25,8 @@ using ICSharpCode.Decompiler.Metadata; using ICSharpCode.Decompiler.TypeSystem.Implementation; using ICSharpCode.Decompiler.Util; +using NetEscapades.EnumGenerators; + using static ICSharpCode.Decompiler.Metadata.MetadataExtensions; using SRM = System.Reflection.Metadata; @@ -35,6 +37,7 @@ namespace ICSharpCode.Decompiler.TypeSystem /// Options that control how metadata is represented in the type system. /// [Flags] + [EnumExtensions] public enum TypeSystemOptions { /// diff --git a/ICSharpCode.Decompiler/TypeSystem/IType.cs b/ICSharpCode.Decompiler/TypeSystem/IType.cs index 8dcc13de4..c3b649f4c 100644 --- a/ICSharpCode.Decompiler/TypeSystem/IType.cs +++ b/ICSharpCode.Decompiler/TypeSystem/IType.cs @@ -21,6 +21,8 @@ using System; using System.Collections.Generic; +using NetEscapades.EnumGenerators; + namespace ICSharpCode.Decompiler.TypeSystem { /// @@ -335,6 +337,7 @@ namespace ICSharpCode.Decompiler.TypeSystem } [Flags] + [EnumExtensions] public enum GetMemberOptions { /// diff --git a/ICSharpCode.Decompiler/packages.lock.json b/ICSharpCode.Decompiler/packages.lock.json index 2cce4eed7..65253daab 100644 --- a/ICSharpCode.Decompiler/packages.lock.json +++ b/ICSharpCode.Decompiler/packages.lock.json @@ -18,6 +18,15 @@ "Microsoft.SourceLink.Common": "8.0.0" } }, + "NetEscapades.EnumGenerators.Interceptors": { + "type": "Direct", + "requested": "[1.0.0-beta16, )", + "resolved": "1.0.0-beta16", + "contentHash": "pGcgfiVbv8+Yvs4de5hZW8t7Z1UmK7aPY4aZKzJxVFutUwNyAoV3USqRNde/MPE+USlKzGbx8qeq9Pfrec15xg==", + "dependencies": { + "NetEscapades.EnumGenerators": "1.0.0-beta16" + } + }, "NETStandard.Library": { "type": "Direct", "requested": "[2.0.3, )", @@ -68,6 +77,11 @@ "resolved": "8.0.0", "contentHash": "dk9JPxTCIevS75HyEQ0E4OVAFhB2N+V9ShCXf8Q6FkUQZDkgLI12y679Nym1YqsiSysuQskT7Z+6nUf3yab6Vw==" }, + "NetEscapades.EnumGenerators": { + "type": "Transitive", + "resolved": "1.0.0-beta16", + "contentHash": "QKRivsr5EFhkDQbM//DLrdRCkX3X8BtXwsgnp1saswTlXaqzIBgiGFxNFlgEv/WHdKRU9mfRGW2l1dhVFsonyg==" + }, "System.Buffers": { "type": "Transitive", "resolved": "4.5.1",