You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A thin wrapper around the [Roslyn API](https://docs.microsoft.com/en-us/dotnet/csharp/roslyn-sdk/) to simplify generating C# code.
7
7
8
+
This can be used to implement things like code generators for Swagger/OpenAPI Spec, ORMs, etc. using a type-safe interface rather than simple string templating.
9
+
10
+
While you can use the Rosyln API directly, its immutable and thread-safe design can make using it somewhat verbose and cumbersome. This library provides a simpler (but also less flexible) wrapper.
11
+
8
12
## Usage
9
13
10
14
Add a reference to the [`NanoByte.CodeGeneration`](https://www.nuget.org/packages/NanoByte.CodeGeneration/) NuGet package to your project. You can then generate a class like this:
Copy file name to clipboardExpand all lines: doc/main.md
+4
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,9 @@
1
1
A thin wrapper around the [Roslyn API](https://docs.microsoft.com/en-us/dotnet/csharp/roslyn-sdk/) to simplify generating C# code.
2
2
3
+
This can be used to implement things like code generators for Swagger/OpenAPI Spec, ORMs, etc. using a type-safe interface rather than simple string templating.
4
+
5
+
While you can use the Rosyln API directly, its immutable and thread-safe design can make using it somewhat verbose and cumbersome. This library provides a simpler (but also less flexible) wrapper.
0 commit comments