/// <summary> /// Creates a connection using a processor client's ConnectionFactory and returns its ConnectionOptions. /// </summary> /// /// <typeparam name="T">The partition type to which the processor is bound.</typeparam> /// /// <param name="processor">The processor instance to operate on.</param> /// /// <returns>The set of options used by the connection.</returns> /// private static EventHubConnectionOptions GetConnectionOptions <T>(EventProcessor <T> processor) where T : EventProcessorPartition, new() => (EventHubConnectionOptions) typeof(EventHubConnection) .GetProperty("Options", BindingFlags.Instance | BindingFlags.NonPublic) .GetValue(processor.CreateConnection());