public async Task CloseAsync(
                AzurePartitionContext context,
                AzureCloseReason reason)
            {
                IEventHubPartitionContext partitionContext =
                    new EventHubPartitionContext(context);
                EventProcessorCloseReason closeReason =
                    reason.ToEventProcessorCloseReason();

                await this.eventProcessor.CloseAsync(
                    partitionContext,
                    closeReason);
            }
예제 #2
0
        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);
        }