public static async Task <OwinConfiguration> LoadConfiguration(string sectionName             = null,
                                                                       bool processConfigurationHooks = true)
        {
            var configManager = new OwinConfigurationManager();
            var configuration = new OwinConfiguration();
            await configManager.Initialize(configuration, sectionName);

            if (processConfigurationHooks)
            {
                await configManager.FindAndProcessConfigurationHooks(configuration);
            }
            return(configuration);
        }
        private static async Task <IAppBuilder> UsePlatibusMiddlewareAsync(this IAppBuilder app,
                                                                           string sectionName,
                                                                           Func <OwinConfiguration, Task> configure)
        {
            var configuration        = new OwinConfiguration();
            var configurationManager = new OwinConfigurationManager();
            await configurationManager.Initialize(configuration, sectionName);

#pragma warning disable 612
            await configurationManager.FindAndProcessConfigurationHooks(configuration);

#pragma warning restore 612
            if (configure != null)
            {
                await configure(configuration);
            }

            return(await app.UsePlatibusMiddlewareAsync(configuration));
        }