/// <summary>
        /// 启用全局静态化HttpContext
        /// </summary>
        /// <param name="app"></param>
        /// <returns></returns>
        public static IApplicationBuilder UseGlobalHttpContext(this IApplicationBuilder app)
        {
            var httpContextAccessor = app.ApplicationServices.GetRequiredService <IHttpContextAccessor>();

            GlobalHttpContext.Configure(httpContextAccessor);
            return(app);
        }
        public Task Invoke(GlobalHttpContext context)
        {
            Task.Factory.StartNew(async() => {
                // Get services
                var geo = context.RequestServices.GetRequiredService <IGeolocationProvider>();

                // Get significant arguments
                var url         = context.Request.Scheme + "://" + context.Request.Host + "/" + context.Request.Path;
                var ip          = context.Connection.RemoteIpAddress.ToString();
                var geolocation = await geo.GeolocateAsync(ip);
            });
            return(Task.FromResult(0));
        }