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 ControllerPostfixes { get; set; } public static List ActionPostfixes { get; set; } public static List FormBodyBindingIgnoredTypes { get; set; } public static Dictionary HttpVerbs { get; set; } public static NamingConventionEnum NamingConvention { get; set; } = NamingConventionEnum.KebabCase; public static Func GetRestFulControllerName { get; set; } public static Func GetRestFulActionName { get; set; } public static Dictionary AssemblyDynamicApiOptions { get; set; } static AppConsts() { HttpVerbs=new Dictionary() { ["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", }; } }