Category: roslyn

  • Aigamo.MatchGenerator

    RSCG – Aigamo.MatchGenerator     name Aigamo.MatchGenerator nuget https://www.nuget.org/packages/Aigamo.MatchGenerator/ link https://github.com/ycanardeau/MatchGenerator author Aigamo Generates exhaustive Match() extension methods for enums and abstract record hierarchies (tagged unions), ensuring compile-time safety — all cases must be handled. How to use 1. Add [GenerateMatch] attribute to an enum or abstract record: [GenerateMatch] public enum CarTypes { None, Dacia, Tesla, BMW,…

  • lomapper

    RSCG – lomapper     name lomapper nuget https://www.nuget.org/packages/lomapper/ link https://github.com/jdtoon/lomapper author Junaid Desai Generates object mapping code at compile time using source generators . How to use 1. Decorate a partial mapper class with [Mapper] and declare partial mapping methods: “`charp [Mapper] public parial class UserMapper { [MapIgnore(nameof(Person.ID))] public partial PersonDTO Map(Peron entity); } “` 2.…

  • Najlot.Audit.SourceGenerator

    RSCG – Najlot.Audit.SourceGenerator     name Najlot.Audit.SourceGenerator nuget https://www.nuget.org/packages/Najlot.Audit.SourceGenerator/ link https://github.com/najlot/Audit author Najlot Generates audit/change-tracking code at compile time — detects which properties changed between two snapshots of an object. How to use 1. Mark your entity and a partial provider with [AuditProvider]: “`charp [AuditProvider] public partial class Person { public string FirstName { get; set; }…

  • TaggedEnum

    RSCG – TaggedEnum     name TaggedEnum nuget https://www.nuget.org/packages/TaggedEnum/ link https://github.com/al0rid4l/SixTatami author Alor’idal Generates dictionary-based lookup, fast string conversion, and name/value retrieval for enums with custom data tags — like tagged unions for enums. How to use 1. Decorate with Tagged and attach Data to each member: “`csharp [Tagged] public enum CarTypes { [Data(“this is none”)] None,…

  • SvgIconGenerator

    RSCG – SvgIconGenerator     name SvgIconGenerator nuget https://www.nuget.org/packages/SvgIconGenerator/ link https://github.com/helluvamatt/SvgIconGenerator author Matt Schneeberger Generates strongly-typed C# classes from SVG icon files at compile time — access SVG icons as typed properties with no runtime file I/O. How to use 1. Add SVG files as AdditionalFiles in .csproj: “`xml “` 3. Declare a partial static class with…

  • NLog.Extensions.ThisClass

    RSCG – NLog.Extensions.ThisClass     name NLog.Extensions.ThisClass nuget https://www.nuget.org/packages/NLog.Extensions.ThisClass/ link https://github.com/trympet/ThisClass author Trym Pet Generates a strongly-typed NLog Logger property per class at compile time — no manual LogManager.GetCurrentClassLogger() boilerplate. How to use 1. Mark a partial class with [ClassLoggerLazy]: “`charp [ClassLoggerLazy] partial class Person { public string Name() { Logger.Error(“This is an error message from the…

  • AssemblyMetadata

    RSCG – AssemblyMetadata     name AssemblyMetadata nuget https://www.nuget.org/packages/AssemblyMetadata/ link https://github.com/BenjaminAbt/AssemblyMetadata author Benjamin Abt Generates compile-time assembly metadata constants (build date, year, time, etc.) — access build info as typed properties without runtime reflection. How to use 1. Add the package as an Analyzer (no runtime reference needed): “`xml OutputItemType=”Analyzer” ReferenceOutputAssembly=”false” /> “` 2. Use the generated…

  • TypedPaths

    RSCG – TypedPaths     name TypedPaths nuget https://www.nuget.org/packages/TypedPaths.Generator/ link https://github.com/AlexChim1231/TypedPaths/ author Alex Chim Turns a folder tree into strongly-typed path constants at compile time — access file/folder paths as typed properties instead of magic strings. How to use 1. Declare which folder to scan in .csproj: “`xml “` 2. Access generated typed path constants: “`charp Console.WriteLine(TypedPaths.Src.Andrei.Value);…

  • REslava.ResultFlow

    RSCG – REslava.ResultFlow     name REslava.ResultFlow nuget https://www.nuget.org/packages/REslava.ResultFlow/ link https://github.com/reslava/nuget-package-reslava-result/ author Rafa Eslava Generates Mermaid flowchart diagrams at compile time from fluent Result pipeline methods — visualize functional code flows as diagrams runtime overhead. How to use 1. Decorate a fluent Result method with [ResultFlow]: “`charp [REslava.ResultFlow.ResultFlow] public static Result GetValueFromConsole() { return Result.Ok(value) .Ensure(s =>…

  • Pekspro.DataAnnotationValuesExtractor

    RSCG – Pekspro.DataAnnotationValuesExtractor     name Pekspro.DataAnnotationValuesExtractor nuget https://www.nuget.org/packages/Pekspro.DataAnnotationValuesExtractor/ link https://github.com/pekspro/DataAnnotationValuesExtractor author Pekspro Generates typed constants from DataAnnotations attributes ([Range], [StringLength], [Required], [Display]) at compile time — no reflection needed to read annotation values. How to use 1. Decorate your model with standard DataAnnotations: “`charp partial class Person { [Display(Name = “First name”)] [StringLength(100, MinimumLength = 3)]…