remove settings
This commit is contained in:
@@ -240,7 +240,6 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Modules\Index.cs" />
|
<Compile Include="Modules\Index.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Settings.cs" />
|
|
||||||
<Compile Include="Startup.cs" />
|
<Compile Include="Startup.cs" />
|
||||||
<Compile Include="AppStart\Bootstrap.cs" />
|
<Compile Include="AppStart\Bootstrap.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Web;
|
|
||||||
|
|
||||||
namespace AboutMe.Web
|
|
||||||
{
|
|
||||||
public static class Settings
|
|
||||||
{
|
|
||||||
public static IEnumerable<string> Phones = new[] {"iphone","ppc",
|
|
||||||
"windows ce","blackberry",
|
|
||||||
"opera mini","mobile","palm",
|
|
||||||
"portable","opera mobi", "android" };
|
|
||||||
|
|
||||||
public static bool IsMobile(string userAgent)
|
|
||||||
{
|
|
||||||
if (string.IsNullOrWhiteSpace(userAgent))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
var agent = userAgent.ToLower();
|
|
||||||
return Phones.Any(x => agent.Contains(x));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user