private static string Browser(NameValueCollection headers) { var ua = headers["HTTP_USER_AGENT"] ?? headers["User-Agent"]; if (ua != null) { return(BrowserDetection.Detect(ua)); } return(null); }
private static string Browser(HttpContext context) { var ua = context?.Request?.Headers["User-Agent"].ToString(); return(BrowserDetection.Detect(ua)); }