public Task OnSubscribed(IStreamSubscriptionHandleFactory handleFactory) { StreamSubscriptionHandle <string> handle = handleFactory.Create <string>(); return((handle.StreamId.GetNamespace() == StreamBatchingTestConst.BatchingNameSpace) ? handle.ResumeAsync(OnNextBatch) : handle.ResumeAsync(OnNext)); }
public async Task OnSubscribed(IStreamSubscriptionHandleFactory handleFactory) { logger.Info("OnAdd"); this.onAddCalledCount++; var observer = new CounterObserver <IFruit>(this.logger); var newhandle = handleFactory.Create <IFruit>(); this.consumerHandles.Add(await newhandle.ResumeAsync(observer)); this.consumerObservers.Add(observer); }
//Jerk_ConsumerGrai would unsubscrube on any subscription added to it public async Task OnSubscribed(IStreamSubscriptionHandleFactory handleFactory) { var handle = handleFactory.Create <int>(); await handle.UnsubscribeAsync(); }
/// <summary> /// Initialize Stream Subscription /// </summary> /// <param name="handleFactory">stream factory</param> public Task OnSubscribed(IStreamSubscriptionHandleFactory handleFactory) { var handle = handleFactory.Create <int>(); return(handle.ResumeAsync(observer)); }
public async Task OnSubscribed(IStreamSubscriptionHandleFactory handleFactory) { // Plug our LoggerObserver to the stream var handle = handleFactory.Create <ISensorTelemetryEntity>(); await handle.ResumeAsync(this); }
public async Task OnSubscribed(IStreamSubscriptionHandleFactory handleFactory) { var handle = handleFactory.Create <string>(); await handle.ResumeAsync(observer); }
// Called when a subscription is added public async Task OnSubscribed(IStreamSubscriptionHandleFactory handleFactory) { // Plug our LoggerObserver to the stream var handle = handleFactory.Create <int>(); await handle.ResumeAsync(_observer); }