public async Task CloseAsync( AzurePartitionContext context, AzureCloseReason reason) { IEventHubPartitionContext partitionContext = new EventHubPartitionContext(context); EventProcessorCloseReason closeReason = reason.ToEventProcessorCloseReason(); await this.eventProcessor.CloseAsync( partitionContext, closeReason); }
public async Task CloseAsync( IEventHubPartitionContext partitionContext, EventProcessorCloseReason closeReason) { Lazy <EventProcessorEventArgs> lazyEventArgs = new Lazy <EventProcessorEventArgs>( () => new EventProcessorEventArgs( EventProcessorEventType.Closed, partitionContext, closeReason: closeReason)); await this.InvokeEventHandler(this.OnClosed, lazyEventArgs); }