Category: RSCG

  • RSCG – LayeredCraft.OptimizedEnums

        name LayeredCraft.OptimizedEnums nuget https://www.nuget.org/packages/LayeredCraft.OptimizedEnums/ link https://github.com/layeredcraft/optimized-enums author LayeredCraft A new way to define enums – and efficiently manage them   This is how you can use LayeredCraft.OptimizedEnums . The code that you start with is The code that you will use is   The code that is generated is Code and pdf at…

  • RSCG – Tenekon.MethodOverloads.SourceGenerator

        name Tenekon.MethodOverloads.SourceGenerator nuget https://www.nuget.org/packages/Tenekon.MethodOverloads.SourceGenerator/ link https://github.com/tenekon/Tenekon.MethodOverloads.SourceGenerator author Tenekon generate overloads of the same method   This is how you can use Tenekon.MethodOverloads.SourceGenerator . 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/Tenekon.MethodOverloads.SourceGenerator

  • RSCG – MagicConstants

        name MagicConstants nuget https://www.nuget.org/packages/MagicConstants/ link https://github.com/LieselThuriot/MagicConstants author Liesel Thuriot Generates constants from files to return contents. It has extension for routes and more for ASP.NET projects.   This is how you can use MagicConstants . The code that you start with is The code that you will use is   The code that…

  • RSCG_DBContext–usage–part 3 of 3

    Install the Nuget package https://www.nuget.org/packages/RSCG_DBContext/ Then decorate your context class with GenerateDbContextExists and make it partial The generator emits a partial class with one Exists_() method per DbSet property, plus an Exists_AllDBSets() helper that checks them all: Code at https://github.com/ignatandrei/RSCG_DBContext/ NuGet package: RSCG_DBContext | GitHub repository

  • RSCG_DBContext–execution – part 2 of 3

    Some problems that should be solved: 1 How to know that the user opted for this generation ? Of course , with an attribute – I named mine GenerateDbContextExistsAttribute ( consequence: The problem of multiple assemblies sharing same attribute is solved –  see Andrew Lock https://andrewlock.net/exploring-dotnet-10-preview-features-4-solving-the-source-generator-marker-attribute-problem-in-dotnet-10/ ) 2. The generation of function : the function…

  • RSCG_DbContext- idea –part 1 of 3

    The  DBContext from Entity Framework has a method on Database property , named :EnsureCreated ( and one EnsureCreatedAsync) The problem with that is that verifies JUST the name of the database – not the tables exposed in the DBSet . So how  to do this kind of stuff – verify that the tables for a…

  • RSCG – AOP.Logging.SourceGenerator

    RSCG – AOP.Logging.SourceGenerator     name AOP.Logging.SourceGenerator nuget https://www.nuget.org/packages/AOP.Logging.SourceGenerator/ link https://github.com/dborgards/aop.logging.net author Dietmar Borgards Logging methods by generating new ones   This is how you can use AOP.Logging.SourceGenerator . 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/AOP.Logging.SourceGenerator

  • RSCG – Najlot.Map.SourceGenerator

    RSCG – Najlot.Map.SourceGenerator     name Najlot.Map.SourceGenerator nuget https://www.nuget.org/packages/Najlot.Map.SourceGenerator/ link https://github.com/najlot/Map author Najlot Generates object mapping code at compile time using source generators   This is how you can use Najlot.Map.SourceGenerator . The code that you start with is The code that you will use is   The code that is generated is Code and…

  • RSCG – TrimItEasy

    RSCG – TrimItEasy     name TrimItEasy nuget https://www.nuget.org/packages/TrimItEasy/ link https://github.com/phongnguyend/TrimItEasy author Phong Nguyen trimming eacg string from a class properties   This is how you can use TrimItEasy . The code that you start with is The code that you will use is   The code that is generated is // #nullable enable using…

  • RSCG – SatorImaging.TDoubles

    RSCG – SatorImaging.TDoubles     name SatorImaging.TDoubles nuget https://www.nuget.org/packages/SatorImaging.TDoubles/ link https://github.com/sator-imaging/TDoubles author Sator Imaging Generating test stubs with mocking for interfaces   This is how you can use SatorImaging.TDoubles . The code that you start with is <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>net10.0</TargetFramework> <ImplicitUsings>enable</ImplicitUsings> <Nullable>enable</Nullable> <IsPackable>false</IsPackable> <IsTestProject>true</IsTestProject> </PropertyGroup> <ItemGroup> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" /> <PackageReference Include="MSTest.TestAdapter" Version="2.2.10" />…