Ejemplo n.º 1
0
 private Func <IAdapter <TKey, TValue>, IObservable <IEvent> > Apply(Command.Produce <TKey, TValue> produce)
 {
     return(adapter => adapter.Produce(produce, _scheduler));
 }
Ejemplo n.º 2
0
 public IObservable<IEvent> Produce(Command.Produce<TKey, TValue> produce, IScheduler scheduler)
 {
     return Observable
         .Start(() => _producer.Produce(produce.Topic, produce.Message, dr => _events.OnNext(new Event.Delivered<TKey, TValue>(dr))), scheduler)
         .SelectMany(_ => Observable.Empty<IEvent>());
 }