EnumGenerator.Core
3.4.1206
See the version list below for details.
dotnet add package EnumGenerator.Core --version 3.4.1206
NuGet\Install-Package EnumGenerator.Core -Version 3.4.1206
<PackageReference Include="EnumGenerator.Core" Version="3.4.1206" />
<PackageVersion Include="EnumGenerator.Core" Version="3.4.1206" />
<PackageReference Include="EnumGenerator.Core" />
paket add EnumGenerator.Core --version 3.4.1206
#r "nuget: EnumGenerator.Core, 3.4.1206"
#:package EnumGenerator.Core@3.4.1206
#addin nuget:?package=EnumGenerator.Core&version=3.4.1206
#tool nuget:?package=EnumGenerator.Core&version=3.4.1206
EnumGenerator Core library.
Library that can be used to generate c# / cil enum files based on json files.
Can be used for more complex integration into a build pipeline, for simple use-cases consider one of the pre-made tools:
Installation
There are two ways to add the nuget package:
- Run:
dotnet add package EnumGenerator.Core --version '3.4.*'
- Add the following to a
ItemGroupsection of your csproj:
<PackageReference Include="EnumGenerator.Core" Version="3.4.*" />
Usage
Steps for generating a enum:
- Add usings:
using EnumGenerator.Core.Mapping;
using EnumGenerator.Core.Definition;
using EnumGenerator.Core.Exporter;
- Create a mapping context:
// Create context object containing all the settings for the mapping.
var context = Context.Create("[*]", "name");
Note: To get more diagnostics you can also supply a Microsoft.Extensions.Logging.ILogger implementation here.
- Map the enum:
var inputJson = File.ReadAllText("input.json");
var enumDefinition = context.MapEnum(inputJson, "TestEnum");
- Export the csharp enum:
var csharp = enumDefinition.ExportCSharp();
or 4. Export the cil enum:
var cil = enumDefinition.ExportCil(assemblyName: "TestEnum");
or 4. Export a class-library:
var assemblyFile = enumDefinition.ExportClassLibrary(assemblyName: "TestEnum");
or
Help
For more general documentation and examples visit the github project enum-generator-dotnet.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.Extensions.Logging (>= 2.2.0)
- Mono.Cecil (>= 0.10.4)
- Newtonsoft.Json (>= 12.0.1)
- System.Collections.Immutable (>= 1.5.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on EnumGenerator.Core:
| Package | Downloads |
|---|---|
|
EnumGenerator.Cli
Cli-tool that can be used to create a c# / f# / vb / cil enum based on a json file |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 5.0.1274 | 2,997 | 11/27/2019 |
| 4.1.1229 | 2,268 | 8/19/2019 |
| 4.0.1221 | 1,544 | 8/16/2019 |
| 3.5.1217 | 1,673 | 8/10/2019 |
| 3.5.1214 | 1,608 | 8/10/2019 |
| 3.4.1211 | 1,553 | 8/9/2019 |
| 3.4.1206 | 1,603 | 8/9/2019 |
| 3.3.1203 | 1,591 | 8/8/2019 |
| 3.2.1196 | 1,635 | 8/7/2019 |
| 3.2.1193 | 1,597 | 8/7/2019 |
| 3.1.1190 | 1,601 | 8/7/2019 |
| 3.0.1187 | 1,577 | 8/7/2019 |
| 2.1.1008 | 1,581 | 7/6/2019 |
| 2.0.1004 | 1,620 | 7/6/2019 |
| 1.0.931 | 1,881 | 5/4/2019 |