Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Exploring Autofac interceptors that repeatedly call invocation target until it succeeds

License

Notifications You must be signed in to change notification settings

SemaphoreSlim1/ReentrantInterception

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ReentrantInterception

This repo explores combining polly retry policies with Autofac interceptors to repeatedly call invocation targets until they succeed

Autofac, like many containers, allows for aspect-oriented programming in the form of interceptors.

Interceptors allow us to execute cross-cutting concern code before and after the target of invocation, without having to manually place it in our target method

Autofac's interceptors were built for a model where target invocations are synchronous - but what if we wanted to build something around an async model?

Maybe, we want to add some resiliency, and retry invoking the target method multiple times, invisible to the caller?

It should be easy to build an interceptor around that model right?

Some links that are inspiring this code:

https://autofaccn.readthedocs.io/en/latest/advanced/interceptors.html https://www.hanselman.com/blog/AddingResilienceAndTransientFaultHandlingToYourNETCoreHttpClientWithPolly.aspx http://www.primordialcode.com/blog/post/castle-dynamicproxy-dirty-trick-call-invocation-proceed-multiple-times-interceptor http://www.thepollyproject.org https://github.com/App-vNext/Polly

About

Exploring Autofac interceptors that repeatedly call invocation target until it succeeds

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages