Admin.Core/src/platform/ZhonTai.DynamicApi/AppConsts.cs
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Reflection;
using ZhonTai.DynamicApi.Enums;
namespace ZhonTai.DynamicApi;
public static class AppConsts
{
public static string DefaultHttpVerb { get; set; }
public static string DefaultAreaName { get; set; }
public static string DefaultApiPreFix { get; set; }
public static List<string> ControllerPostfixes { get; set; }
public static List<string> ActionPostfixes { get; set; }
public static List<Type> FormBodyBindingIgnoredTypes { get; set; }
public static Dictionary<string,string> HttpVerbs { get; set; }
public static NamingConventionEnum NamingConvention { get; set; } = NamingConventionEnum.KebabCase;
public static Func<string, string> GetRestFulControllerName { get; set; }
public static Func<string, string> GetRestFulActionName { get; set; }
public static Dictionary<Assembly, AssemblyDynamicApiOptions> AssemblyDynamicApiOptions { get; set; }
public static bool FormatResult { get; set; } = true;
public static Type FormatResultType { get; set; } = FormatResultContext.FormatResultType;
static AppConsts()
{
HttpVerbs=new Dictionary<string, string>()
{
["add"] = "POST",
["create"] = "POST",
["insert"] = "POST",
["submit"] = "POST",
["post"] = "POST",
["get"] = "GET",
["find"] = "GET",
["fetch"] = "GET",
["query"] = "GET",
["update"] = "PUT",
["change"] = "PUT",
["put"] = "PUT",
["batch"] = "PUT",
["delete"] = "DELETE",
["soft"] = "DELETE",
["remove"] = "DELETE",
["clear"] = "DELETE",
};
}
后面还有 1 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
