示例#1
0
 public TService CreateClassProxy <TService>(TService implementationInstance, IInterceptronInterceptor[] interceptors) where TService : class
 {
     return(generator.CreateClassProxyWithTarget(implementationInstance, DynamicProxyGeneratorHelper.ToDynamicProxyInterceptors(interceptors)));
 }
示例#2
0
 public TService CreateInterfaceProxy <TService>(TService implementationInstance, InterceptronProxyGenerationOptions proxyGenerationOptions, IInterceptronInterceptor[] interceptors) where TService : class
 {
     return(generator.CreateInterfaceProxyWithTarget(implementationInstance, new DynamicProxyGenerationOptionAdapter(proxyGenerationOptions), DynamicProxyGeneratorHelper.ToDynamicProxyInterceptors(interceptors)));
 }