castleproject / Core

Castle Core, including Castle DynamicProxy, Logging Services and DictionaryAdapter
http://www.castleproject.org/
Other
2.2k stars 467 forks source link

Allow to intercept IAsyncEnumerable #674

Closed gentledepp closed 9 months ago

gentledepp commented 9 months ago

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 commented 9 months ago

sorry - i created this issue in the wrong github project.... https://github.com/JSkimming/Castle.Core.AsyncInterceptor/issues/226

cheers!