Castle.Core.AsyncInterceptor icon indicating copy to clipboard operation
Castle.Core.AsyncInterceptor copied to clipboard

Allow to intercept IAsyncEnumerable

Open gentledepp opened this issue 1 year ago • 0 comments

Hi!

this project is used (among others) in abp.io and is used for client side http-proxy creation based on interfaces.

The poblem I am having is that I would like to "stream" data from the server to the client. I.e. I would like to return an IAsyncEnumerable<WeatherInfo> GetCurrentWeather(string region)

Unfortunately, Castle.DynamicProxy.AsyncInterceptorBase seems to not recognize the return type IAsyncEnumerable<T> and thus calls ProceedSynchronous[IAsyncEnumerable'1]

image

I am not too proficient in using Castle DynamicProxy, but if you give me some hints I am willing to try to contribute this as PR!

Any thoughts?

gentledepp avatar Dec 07 '23 08:12 gentledepp