public async Task Invoke(HttpContext context)
        {
            ILogger logger = context.RequestServices.GetService <ILogger>();

            IRequestInformationProvider requestInformationProvider = context.RequestServices.GetService <IRequestInformationProvider>();

            LogRequestInformationMiddleware.LogRequest(logger, requestInformationProvider);

            await Next.Invoke(context);
        }
        public Task Invoke(HttpContext context)
        {
            ILogger logger = context.RequestServices.GetRequiredService <ILogger>();

            IRequestInformationProvider requestInformationProvider = context.RequestServices.GetRequiredService <IRequestInformationProvider>();

            LogRequestInformationMiddleware.LogRequest(logger, requestInformationProvider);

            return(_next.Invoke(context));
        }