Example #1
0
        private static string Browser(NameValueCollection headers)
        {
            var ua = headers["HTTP_USER_AGENT"] ?? headers["User-Agent"];

            if (ua != null)
            {
                return(BrowserDetection.Detect(ua));
            }

            return(null);
        }
Example #2
0
        private static string Browser(HttpContext context)
        {
            var ua = context?.Request?.Headers["User-Agent"].ToString();

            return(BrowserDetection.Detect(ua));
        }