Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to register interfaces in batches #133

Open
apchenjun opened this issue Sep 2, 2021 · 0 comments
Open

How to register interfaces in batches #133

apchenjun opened this issue Sep 2, 2021 · 0 comments

Comments

@apchenjun
Copy link

I have many interfaces how to register in batches, for example, I want to register all warehouse interfaces.
inherit AsyncInterceptorBase or IAsyncInterceptor ,can not be used .EnableInterfaceInterceptors().InterceptedBy(typeof(TransactionalInterceptor))

var myClass = new ClasThatImplementsIMyInterface();
var generator = new ProxyGenerator();
var interceptor = new ClasThatExtendsAsyncInterceptorBase();
IMyInterface proxy = generator.CreateInterfaceProxyWithTargetInterface<IMyInterface>(myClass, interceptor)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant