25 lines
705 B
C#
25 lines
705 B
C#
|
|
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>();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|