Category: .NET Core
-
RSCG–Template Rendering- part 17
name Transplator nuget https://www.nuget.org/packages/Transplator/ link https://github.com/atifaziz/Transplator/ author Atif Aziz The Transplator is a small fast rendering engine to allow you to make rendering from any class instance. 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/TemplateRender
-
RSCG–Advice- part 8
If you create a Roslyn Source Code Generator that uses inside a base class or a static class,the best way,in my opinion,is to create 2 separate nuget packages : one for the code generated and one for the base class. This way the project that will use your RSCG will use just the nuget package…
-
RSCG–AMS – About My software –Documentation– part 7
Now it is time to let others know about the project. And the first step is to make documentation. And,because a picture is worth many words,here is the picture: Also,instructions about how to use will help the programmers: For a DLL it is simple : <ItemGroup> <PackageReference Include=”AMS_Base” Version=”2021.6.29.1820″ /> <PackageReference Include=”RSCG_AMS” Version=”2021.6.29.1820″ ReferenceOutputAssembly=”false” OutputItemType=”Analyzer”…
-
RSCG–AMS – About My software –Reading csproj– part 6
Now it is time to put some more data – like authors and version. I have read a lot ( and tried a lot) about CompilerVisibleProperty and CompilerVisibleItemMetadata ( see https://github.com/dotnet/roslyn/blob/main/docs/features/source-generators.cookbook.md ) . However,I was unable to get the data ( Authors and Version) from there . So this is what I was get,to read…
-
RSCG–AMS – About My software –NuGet– part 5
The problem with RSCG is to differentiate between the generator and the code generated. In my case,the base class should be in one nuget,the generator in other ( to can remove it from build) and the WebAPI in another. That took me a whole day and the result is ok . Pain Points: https://turnerj.com/blog/the-pain-points-of-csharp-source-generators CI…
-
RSCG–AMS – About My software –WebAPI– part 4
Now it should be an easy way to see in the WebAPI. First,return the data for all software that respected that : Now,how can I make a small html to display things ? I can do with Razor Library – but it is too big and maybe the developers do not want to have this…
-
RSCG–AMS – About My software –Multiple assemblies– part 3
The problem that I face now – and must be solved – is what to do if I have multiple assemblies / dlls / asp.net core that wants to have the About My Software listed ? It will be a name conflict between the classes – or,if we put in different namespaces,will be difficult to…
-
RSCG–AMS – About My software –work– part 2
So now it is time to work at implementation This will be a standard RSCG – generating code. I make also a test console to display the values. The implementation will consider the fact that we can have many Source Control providers – each one with his ideas about variables. So I made 2 classes…
-
RSCG–AMS – About My software –idea – part 1
Every product should have an About page . In the About page should be listed The product name The version of the product Link to latest version ? Built date+ time The commit ID The authors Link to the License Other components version and link to about Third Party notices Repository link ( github,gitlab,…) Documentation…
-
Benchmarking RSCG vs Reflection
I make a microservices Buffet . In this I consider having email as a service . When the DevOps wants email,he can choose between various plugins ( simple smtp email,gmail,exchange,others). Those plugins can have various properties – that must be edited by the primary administrator of the microservice. The properties can be discovered at runtime…