Files
tnb.server/common/Tnb.Common/Utils/SkipNormalizationAttributeConventionalRegistrar.cs
2023-11-06 19:35:59 +08:00

20 lines
733 B
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
namespace Tnb.Common.Utils
{
//public class SkipNormalizationAttributeConventionalRegistrar : IConventionalRegistrar
//{
// public void Register(IServiceCollection services, IConfiguration configuration)
// {
// // 注册规范化过滤器时跳过带有SkipNormalizationAttribute特性的方法
// services.Configure<ApiOptions>(options =>
// {
// options.Normalizers.Add<ApiActionFilter>(descriptor =>
// {
// var shouldSkip = descriptor.GetMethodInfo().IsDefined(typeof(SkipNormalizationAttribute), inherit: true);
// return !shouldSkip;
// });
// });
// }
//}
}