Category: roslyn

  • [RSCG]–About My Software

    I have made a new improvement to my Roslyn Source Code Generator,AMS . Until now it just said the time and the commit date in a CI scenario  ( Git ( GitLab,GitHub),Azure …) Now –  what if it can list all the merge requests between 2 dates ,so you can see what is new ?  Now…

  • FileExtension– export data from CSV–part 2

    First,is how to export data from table (https://en.wikipedia.org/wiki/List_of_file_signatures) into classes . First,the table must be transformed into a more programmatic recognizable way – like a CSV  – see https://github.com/ignatandrei/FileExtension/blob/master/src/RSCG_GCK/offset0.txt Then a solution is to have into the dll ( as embedded resource or as a file) . The second solution,more complicated,is to use Roslyn Source…

  • Evolving Roslyn Source Code Generators

    I am a big fan of Roslyn Source Code Generators – you can read about at https://github.com/dotnet/roslyn/blob/main/docs/features/source-generators.md and https://devblogs.microsoft.com/dotnet/introducing-c-source-generators/. I have tested,until now,27 examples and discovered other 53 RSCG – you can read about at https://github.com/ignatandrei/RSCG_Examples and download the book from  https://ignatandrei.github.io/RSCG_Examples/ Also,Microsoft is dogfooding this by using at Blazor ( https://devblogs.microsoft.com/aspnet/asp-net-core-updates-in-net-6-preview-2/#razor-compiler-updated-to-use-source-generators ),JSON.NET https://devblogs.microsoft.com/dotnet/try-the-new-system-text-json-source-generator/ .…

  • RSCG Example – AOPMarker for CI Builds – part 30

        name AOPMarkerCI nuget https://www.nuget.org/packages/AOPMethodsCommon/ https://www.nuget.org/packages/AOPMethodsGenerator/ link http://msprogrammer.serviciipeweb.ro/category/roslyn/ author Andrei Ignat This will tracing methods marked with AOPMarkerMethod in CI builds. Does not affect the code run by the programmer.   The code that you start with is The code that you will use is   The code that is generated is Example Code:…

  • RSCG Example – Class2Interface – part 29

        name BoilerplateFree nuget https://www.nuget.org/packages/boilerplatefree link https://github.com/GeeWee/boilerplatefree author Gustav Wengel This will generate interface from a class   The code that you start with is The code that you will use is   The code that is generated is Example Code: https://github.com/ignatandrei/RSCG_Examples/tree/main/Class2Interface

  • RSCG Example – ToStringDebugger – part 28

        name StructRecordsGenerator nuget https://www.nuget.org/packages/StructRecordGenerator/ link https://github.com/SergeyTeplyakov/StructRecordsGenerator author Sergey Teplyakov This will generate code .ToString. Usefull for debugging   The code that you start with is The code that you will use is   The code that is generated is Example Code: https://github.com/ignatandrei/RSCG_Examples/tree/main/DebuggerToString

  • RSCG Example–TimeBombComment–part 27

        name RSCG_TimeBombComment nuget https://www.nuget.org/packages/RSCG_TimeBombComment/ link http://msprogrammer.serviciipeweb.ro/category/roslyn/ author Andrei Ignat This will generate an error from the comment after a certain date   The code that you start with is The code that you will use is   The code that is generated is Example Code: https://github.com/ignatandrei/RSCG_Examples/tree/main/TimeBombComment

  • RSCG Example–ApparatusAOT–part 26

        name ApparatusAOT nuget https://www.nuget.org/packages/Apparatus.AOT.Reflection/ link https://github.com/byme8/Apparatus.AOT.Reflection author Stanislav Silin This will generate code for investigating at runtime the properties of an object   The code that you start with is The code that you will use is   The code that is generated is Example Code: https://github.com/ignatandrei/RSCG_Examples/tree/main/ApparatusAOT

  • RSCG Example–AppSettings editor–part 25

        name AppSettingsEditor nuget https://www.nuget.org/packages/appSettingsEditor/ link http://msprogrammer.serviciipeweb.ro/category/roslyn/ author Andrei Ignat This will generate classes code from appsettings . Additionally,it generates API controller for editing and an UI interface   The code that you start with is The code that you will use is   The code that is generated is Example Code: https://github.com/ignatandrei/RSCG_Examples/tree/main/appSettingsEditor

  • RSCG Example–Static To Interface–part 24

        name Static To Interface nuget https://www.nuget.org/packages/RSCG_Static/ link http://msprogrammer.serviciipeweb.ro/category/roslyn/ author Andrei Ignat This will generate code for any static properties of a class to generate interface,record and a class with real behaviour   The code that you start with is The code that you will use is   The code that is generated is…