修改驼峰自定义
continuous-integration/drone/push Build is running

This commit is contained in:
2024-09-03 15:51:51 +08:00
parent 1072049741
commit dfba116268
9 changed files with 213 additions and 150 deletions
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IRaCIS.Core.Infrastructure.NewtonsoftJson
{
[AttributeUsage(AttributeTargets.Class)]
public class LowerCamelCaseJsonAttribute : Attribute
{
}
}
@@ -0,0 +1,18 @@
using Newtonsoft.Json.Serialization;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IRaCIS.Core.Infrastructure.NewtonsoftJson
{
public class LowerCamelCaseNamingStrategy : NamingStrategy
{
protected override string ResolvePropertyName(string name)
{
// 将属性名的首字母转换为小写
return char.ToLower(name[0]) + name.Substring(1);
}
}
}