25 lines
694 B
C#
25 lines
694 B
C#
using Microsoft.AspNetCore.Components.Authorization;
|
|
using Microsoft.AspNetCore.Http;
|
|
using Microsoft.Extensions.Configuration;
|
|
using Serilog;
|
|
using System.Collections.Generic;
|
|
|
|
namespace ReserveManagementSystemUI.Helpers
|
|
{
|
|
public class IEHelpers
|
|
{
|
|
private IHttpContextAccessor _httpContextAccessor;
|
|
|
|
public IEHelpers(IHttpContextAccessor httpContextAccessor)
|
|
{
|
|
_httpContextAccessor = httpContextAccessor;
|
|
}
|
|
|
|
public bool IsIE()
|
|
{
|
|
string userAgent = _httpContextAccessor.HttpContext.Request.Headers["User-Agent"];
|
|
return userAgent.Contains("MSIE") || userAgent.Contains("Trident");
|
|
}
|
|
}
|
|
}
|