添加特性自动依赖注入

This commit is contained in:
陈淳
2022-10-09 17:32:44 +08:00
parent cf37f7c950
commit 0672698ba7
11 changed files with 149 additions and 8 deletions

View File

@@ -8,6 +8,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yi.Framework.Common.Attribute;
using Yi.Framework.Common.Helper;
using Yi.Framework.Common.Models;
using Yi.Framework.Interface;

View File

@@ -1,42 +0,0 @@
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.IdentityModel.JsonWebTokens;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Yi.Framework.Common.Const;
using Yi.Framework.Common.Enum;
namespace Yi.Framework.WebCore.AttributeExtend
{
[AttributeUsage(AttributeTargets.Method)]
public class LogAttribute : Attribute
{
/// <summary>
/// 操作类型
/// </summary>
public OperEnum OperType { get; set; }
/// <summary>
/// 日志标题(模块)
/// </summary>
public string Title { get; set; }
/// <summary>
/// 是否保存请求数据
/// </summary>
public bool IsSaveRequestData { get; set; } = true;
/// <summary>
/// 是否保存返回数据
/// </summary>
public bool IsSaveResponseData { get; set; } = true;
public LogAttribute(string title, OperEnum operationType)
{
this.Title = title;
this.OperType = operationType;
}
}
}