Skip to main content

Ling.Audit by Jing Ling

NuGet / site data

Nuget GitHub last commit GitHub Repo stars

Details

Info

info

Name: Ling.Audit

A source generator for audit properties.

Author: Jing Ling

NuGet: https://www.nuget.org/packages/Ling.Audit/

You can find more details at https://github.com/ling921/dotnet-lib/

Source: https://github.com/ling921/dotnet-lib/

Original Readme

note

Introduction

This is a dotnet library repository that contains the following public libraries

ProjectPackageDescription
Ling.CacheNuGetA cache library that can easily use memory cache or redis cache.
Ling.AuditNuGetA source generator to generate audit properties.
Ling.EntityFrameworkCoreNuGetAn extension library of Microsoft.EntityFrameworkCore.
Ling.EntityFrameworkCore.AuditNuGetAn extension library that can automatically record entity changes of Microsoft.EntityFrameworkCore.
Ling.BlazorNuGetA library for Blazor.
Ling.Blazor.AuthenticationNuGetA library that provides JWT authentication for Blazor applications.

License

This project is licensed under the Apache-2.0

About

note

Generating audit data from class implementation of interfaces

How to use

Example (source csproj, source files)

This is the CSharp Project that references Ling.Audit

<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Ling.Audit" Version="1.1.0" />
</ItemGroup>
<PropertyGroup>
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
<CompilerGeneratedFilesOutputPath>$(BaseIntermediateOutputPath)\GX</CompilerGeneratedFilesOutputPath>
</PropertyGroup>
</Project>

Generated Files

Those are taken from $(BaseIntermediateOutputPath)\GX

// <auto-generated/>

#nullable enable annotations
#nullable disable warnings

namespace LingDemo
{
partial class Person
{
/// <summary>
/// Gets or sets the creation time of this entity.
/// </summary>
public virtual global::System.DateTimeOffset CreationTime { get; set; }

/// <summary>
/// Gets or sets the creator Id of this entity.
/// </summary>
public virtual global::System.Nullable<global::System.Guid> CreatorId { get; set; }

/// <summary>
/// Gets or sets the last modification time of this entity.
/// </summary>
public virtual global::System.Nullable<global::System.DateTimeOffset> LastModificationTime { get; set; }

/// <summary>
/// Gets or sets the last modifier Id of this entity.
/// </summary>
public virtual global::System.Nullable<global::System.Guid> LastModifierId { get; set; }

/// <summary>
/// Gets or sets whether this entity is soft deleted.
/// </summary>
public virtual global::System.Boolean IsDeleted { get; set; }

/// <summary>
/// Gets or sets the deletion time of this entity.
/// </summary>
public virtual global::System.Nullable<global::System.DateTimeOffset> DeletionTime { get; set; }

/// <summary>
/// Get or set the deleter Id of this entity.
/// </summary>
public virtual global::System.Nullable<global::System.Guid> DeleterId { get; set; }
}
}

Useful

Download Example (.NET C#)

Share Ling.Audit

https://ignatandrei.github.io/RSCG_Examples/v2/docs/Ling.Audit

aaa

Category "EnhancementClass" has the following generators:

1 ApparatusAOT

2 AspectGenerator

3 CommonCodeGenerator

4 Comparison

5 DudNet

6 Enhanced.GetTypes

7 FastGenericNew

8 Immutype

9 Ling.Audit

10 Lombok.NET

11 M31.FluentAPI

12 MemberAccessor

13 MemoryPack

14 Meziantou.Polyfill

15 Microsoft.Extensions.Logging

16 Microsoft.Extensions.Options.Generators.OptionsValidatorGenerator

17 Microsoft.Interop.JavaScript.JSImportGenerator

18 OptionToStringGenerator

19 QueryStringGenerator

20 RSCG_Decorator

21 RSCG_UtilityTypes

22 StaticReflection

23 SyncMethodGenerator

24 System.Runtime.InteropServices

25 System.Text.RegularExpressions

26 TelemetryLogging

27 ThisClass

See category

EnhancementClass