25 lines
705 B
C#
Raw Permalink Normal View History

2024-12-19 16:07:07 +08:00
using Microsoft.Extensions.Options;
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Abp.DynamicProxy;
namespace JiShe.CollectBus.Interceptors
{
public static class ProtocolInspectInterceptorRegistrar
{
public static void RegisterIfNeeded(IOnServiceRegistredContext context)
{
if (context.ImplementationType.GetMethods().Any(a=>a.IsDefined(typeof(ProtocolInspectAttribute), true)))
{
context.Interceptors.TryAdd<ProtocolInspectInterceptor>();
}
}
}
}