Initial_commit_SecMPS_v2
This commit is contained in:
29
api_sqlsugar/VolPro.Core/Log/ActionChangeExtensions.cs
Normal file
29
api_sqlsugar/VolPro.Core/Log/ActionChangeExtensions.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.StaticFiles;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Options;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VolPro.Core.SignalR;
|
||||
|
||||
namespace VolPro.Core.Log
|
||||
{
|
||||
public static class ActionChangeExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// 注册审计日志
|
||||
/// </summary>
|
||||
/// <param name="services"></param>
|
||||
/// <returns></returns>
|
||||
public static IServiceCollection AddActionLog(this IServiceCollection services)
|
||||
{
|
||||
services.AddSingleton<ActionChangeChannel>();
|
||||
services.AddScoped<ActionChangeLog>();
|
||||
services.AddHostedService<ActionChangeBackgroundService>();
|
||||
return services;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user