Category: roslyn
-
RSCG – Vogen
RSCG – Vogen name Vogen nuget https://www.nuget.org/packages/Vogen/ link https://dunnhq.com/posts/2021/primitive-obsession/ author Steve Dunn Transform values( e.g. int) into classes If you know what are ValueObject,that is one solution This is how you can use Vogen . The code that you start with is The code that you will use is The code…
-
RSCG – dunet
RSCG – dunet name dunet nuget https://www.nuget.org/packages/dunet/ link https://github.com/domn1995/dunet author Domn Werner Add union types to C# – similar with F#/TS discriminated unions Check his examples- awesome This is how you can use dunet . The code that you start with is The code that you will use is The code…
-
RSCG – AutoCtor
RSCG – AutoCtor name AutoCtor nuget https://www.nuget.org/packages/AutoCtor/ link author Cameron MacFarland Generate constructor from non-initialized fields This is how you can use AutoCtor . The code that you start with is The code that you will use is The code that is generated is Code and pdf at https://ignatandrei.github.io/RSCG_Examples/v2/docs/AutoCtor
-
RSCG – QuickConstructor
RSCG – QuickConstructor name QuickConstructor nuget https://www.nuget.org/packages/QuickConstructor link https://github.com/flavien/QuickConstructor author Flavien Charlon Fast add constructors that are read only FIELDS Has multiple other features This is how you can use QuickConstructor . The code that you start with is The code that you will use is The code that is generated…
-
RSCG – System.Runtime.InteropServices
RSCG – System.Runtime.InteropServices name System.Runtime.InteropServices nuget https://www.nuget.org/packages/System.Runtime.InteropServices/ link https://learn.microsoft.com/en-us/dotnet/standard/native-interop/pinvoke-source-generation author Microsoft Generate PInvoke calls This is how you can use System.Runtime.InteropServices . The code that you start with is The code that you will use is The code that is generated is Code and pdf at https://ignatandrei.github.io/RSCG_Examples/v2/docs/System.Runtime.InteropServices
-
RSCG – AutoDeconstruct
name AutoDeconstruct nuget https://www.nuget.org/packages/AutoDeconstruct link https://github.com/JasonBock/AutoDeconstruct/blob/main/docs/Overview.md author Jason Bock Automatically add deconstruct for all types in an assembly This is how you can use AutoDeconstruct . The code that you start with is The code that you will use is The code that is generated is Code and pdf at https://ignatandrei.github.io/RSCG_Examples/v2/docs/AutoDeconstruct
-
RSCG – RSCG_AMS
name RSCG_AMS nuget https://www.nuget.org/packages/RSCG_AMS/ link https://github.com/ignatandrei/RSCG_AMS author Ignat Andrei Automatically registering the version,ci,commit id This is how you can use RSCG_AMS . The code that you start with is The code that you will use is The code that is generated is Code and pdf at https://ignatandrei.github.io/RSCG_Examples/v2/docs/RSCG_AMS
-
RSCG – CommunityToolkit.Mvvm
name CommunityToolkit.Mvvm nuget https://www.nuget.org/packages/CommunityToolkit.Mvvm link https://learn.microsoft.com/en-us/dotnet/communitytoolkit/mvvm/generators/overview author Microsoft Shows how to implement INotifyPropertyChanged,ObservableProperty and RelayCommand Unfortunately,not yet a separate package just for those. Also,this show that RSCG could generate multiple partial declarations This is how you can use CommunityToolkit.Mvvm . The code that you start with is The code that you will use is…
-
RSCG – RSCG_Static
name RSCG_Static nuget https://www.nuget.org/packages/RSCG_Static/ link https://github.com/ignatandrei/RSCG_Static author Andrei Ignat Generate interfaces and classes from static classes This is how you can use RSCG_Static . The code that you start with is The code that you will use is The code that is generated is Code and pdf at https://ignatandrei.github.io/RSCG_Examples/v2/docs/RSCG_Static
-
File to CSharp Const
I was getting tired how many times I am reading from embedded resources – and finding it over and over the same code. So – what if I will transform the file into C# text ? Seems a work for Roslyn Source Code Generator – and the new one IIncrementalGenerator https://github.com/dotnet/roslyn/blob/main/docs/features/incremental-generators.md,not the old ISourceGenerator https://learn.microsoft.com/en-us/dotnet/csharp/roslyn-sdk/source-generators-overview…