c# - Observable from chained Tasks -
i'm trying create observable each item produced via asynchronous task. next item should produced via async call on result of previous item (co-recursion). in "generate" parlance - except generate not support async (nor support delegate on initial state. var ob = observable.generate( async () => await producefirst(), // task<t> producefirst() prev => continue(prev) // bool continue(t); async prev => await producenext(prev) // task<t> producenext(t) item => item ); as more concrete example, peek messages servicebus queue fetching them 100 messages @ time, implement producefirst, continue , producenext follows: task<ienumerable<brokeredmessage>> producefirst() { const int batchsize = 100; return _servicebusreceiver.peekbatchasync(batchsize); } bool continue(ienumerable<brokeredmessage> prev) { return prev.any(); } async task<ienumerable<brokeredmessage>...