You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
699 B
25 lines
699 B
3 weeks ago
|
// Copyright (c) 2019 Sarin Na Wangkanai, All Rights Reserved.
|
||
|
// The Apache v2. See License.txt in the project root for license information.
|
||
|
|
||
|
namespace Wood.Util.Browser
|
||
|
{
|
||
|
public class Edge : BaseBrowser
|
||
|
{
|
||
|
private readonly string _agent;
|
||
|
|
||
|
public Edge(string agent)
|
||
|
{
|
||
|
_agent = agent.ToLower();
|
||
|
var edge = BrowserType.Edge.ToString().ToLower();
|
||
|
|
||
|
if (_agent.Contains(edge))
|
||
|
{
|
||
|
var first = _agent.IndexOf(edge);
|
||
|
var version = _agent.Substring(first + edge.Length + 1);
|
||
|
Version = ToVersion(version);
|
||
|
Type = BrowserType.Edge;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|