|
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17274
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace System.Web.Configuration {
using System.Collections;
using System.Collections.Specialized;
using System.Diagnostics.CodeAnalysis;
using System.Web;
public class BrowserCapabilitiesFactory : System.Web.Configuration.BrowserCapabilitiesFactoryBase {
public override void ConfigureBrowserCapabilities(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
this.DefaultProcess(headers, browserCaps);
if ((this.IsBrowserUnknown(browserCaps) == false)) {
return;
}
this.DefaultDefaultProcess(headers, browserCaps);
}
protected virtual void IeProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void IeProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool IeProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "MSIE (?\'version\'(?\'major\'\\d+)(\\.(?\'minor\'\\d+)?)(?\'letters\'\\w*))(?\'extra\'[^)]*)");
if ((result == false)) {
return false;
}
headerValue = ((string)(browserCaps[string.Empty]));
result = regexWorker.ProcessRegex(headerValue, "IEMobile");
if ((result == true)) {
return false;
}
// Capture: header values
regexWorker.ProcessRegex(((string)(browserCaps[string.Empty])), "Trident/(?\'layoutVersion\'\\d+)");
// Capabilities: set capabilities
dictionary["browser"] = "IE";
dictionary["layoutEngine"] = "Trident";
dictionary["layoutEngineVersion"] = regexWorker["${layoutVersion}"];
dictionary["extra"] = regexWorker["${extra}"];
dictionary["isColor"] = "true";
dictionary["letters"] = regexWorker["${letters}"];
dictionary["majorversion"] = regexWorker["${major}"];
dictionary["minorversion"] = regexWorker["${minor}"];
dictionary["screenBitDepth"] = "8";
dictionary["type"] = regexWorker["IE${major}"];
dictionary["version"] = regexWorker["${version}"];
browserCaps.AddBrowser("IE");
this.IeProcessGateways(headers, browserCaps);
// gateway, parent=IE
this.IebetaProcess(headers, browserCaps);
bool ignoreApplicationBrowsers = true;
// browser, parent=IE
if (this.Ie6plusProcess(headers, browserCaps)) {
}
else {
ignoreApplicationBrowsers = false;
}
this.IeProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void Ie6plusProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void Ie6plusProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool Ie6plusProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check capability matches
string headerValue;
headerValue = ((string)(dictionary["majorversion"]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "^[6-9]|\\d{2,}$");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
dictionary["jscriptversion"] = "5.6";
dictionary["msdomversion"] = regexWorker["${majorversion}.${minorversion}"];
dictionary["ExchangeOmaSupported"] = "true";
dictionary["activexcontrols"] = "true";
dictionary["backgroundsounds"] = "true";
dictionary["javaapplets"] = "true";
dictionary["supportsVCard"] = "true";
dictionary["supportsAccessKeyAttribute"] = "true";
dictionary["vbscript"] = "true";
browserCaps.AddBrowser("IE6Plus");
this.Ie6plusProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = true;
// browser, parent=IE6Plus
if (this.Ie6to9Process(headers, browserCaps)) {
}
else {
if (this.Ie10plusProcess(headers, browserCaps)) {
}
else {
ignoreApplicationBrowsers = false;
}
}
this.Ie6plusProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void Ie6to9ProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void Ie6to9ProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool Ie6to9Process(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check capability matches
string headerValue;
headerValue = ((string)(dictionary["majorversion"]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "^[6-9]$");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
browserCaps.AddBrowser("IE6to9");
this.Ie6to9ProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = true;
// browser, parent=IE6to9
if (this.Ie7Process(headers, browserCaps)) {
}
else {
if (this.Ie8Process(headers, browserCaps)) {
}
else {
if (this.Ie9Process(headers, browserCaps)) {
}
else {
ignoreApplicationBrowsers = false;
}
}
}
this.Ie6to9ProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void Ie7ProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void Ie7ProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool Ie7Process(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check capability matches
string headerValue;
headerValue = ((string)(dictionary["majorversion"]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "^7$");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
dictionary["jscriptversion"] = "5.7";
browserCaps.AddBrowser("IE7");
this.Ie7ProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.Ie7ProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void Ie8ProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void Ie8ProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool Ie8Process(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check capability matches
string headerValue;
headerValue = ((string)(dictionary["majorversion"]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "^8$");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
dictionary["jscriptversion"] = "6.0";
browserCaps.AddBrowser("IE8");
this.Ie8ProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.Ie8ProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void Ie9ProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void Ie9ProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool Ie9Process(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check capability matches
string headerValue;
headerValue = ((string)(dictionary["majorversion"]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "^9$");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
dictionary["jscriptversion"] = "6.0";
browserCaps.AddBrowser("IE9");
this.Ie9ProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.Ie9ProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void Ie10plusProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void Ie10plusProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool Ie10plusProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check capability matches
string headerValue;
headerValue = ((string)(dictionary["majorversion"]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "\\d{2,}");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
dictionary["jscriptversion"] = "6.0";
browserCaps.AddBrowser("IE10Plus");
this.Ie10plusProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.Ie10plusProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void IebetaProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void IebetaProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool IebetaProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check capability matches
string headerValue;
headerValue = ((string)(dictionary["letters"]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "^([bB]|ab)");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
dictionary["beta"] = "true";
this.IebetaProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.IebetaProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly",
Justification = "Matches ie.browser definition file. Casing is changed by code generating tool.")]
protected virtual void InternetexplorerProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly",
Justification = "Matches ie.browser definition file. Casing is changed by code generating tool.")]
protected virtual void InternetexplorerProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly",
Justification = "Matches ie.browser definition file. Casing is changed by code generating tool.")]
private bool InternetexplorerProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "Trident/(?\'layoutVersion\'[7-9]|0*[1-9]\\d+)(\\.\\d+)?;(.*;)?\\s*rv:(?\'version\'(?\'major\'\\d+)(\\.(?\'minor\'\\d+)))");
if ((result == false)) {
return false;
}
headerValue = ((string)(browserCaps[string.Empty]));
result = regexWorker.ProcessRegex(headerValue, "IEMobile");
if ((result == true)) {
return false;
}
result = regexWorker.ProcessRegex(headerValue, "MSIE ");
if ((result == true)) {
return false;
}
// Capabilities: set capabilities
dictionary["browser"] = "InternetExplorer";
dictionary["version"] = regexWorker["${version}"];
dictionary["majorversion"] = regexWorker["${major}"];
dictionary["minorversion"] = regexWorker["${minor}"];
dictionary["layoutEngine"] = "Trident";
dictionary["layoutEngineVersion"] = regexWorker["${layoutVersion}"];
dictionary["type"] = regexWorker["InternetExplorer${major}"];
browserCaps.AddBrowser("InternetExplorer");
this.InternetexplorerProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.InternetexplorerProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void BlackberryProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void BlackberryProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool BlackberryProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "BlackBerry(?\'deviceName\'\\w+)/(?\'version\'(?\'major\'\\d+)(\\.(?\'minor\'\\d+)?)\\w*)");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
dictionary["layoutEngine"] = "BlackBerry";
dictionary["browser"] = "BlackBerry";
dictionary["majorversion"] = regexWorker["${major}"];
dictionary["minorversion"] = regexWorker["${minor}"];
dictionary["type"] = regexWorker["BlackBerry${major}"];
dictionary["mobileDeviceModel"] = regexWorker["${deviceName}"];
dictionary["isMobileDevice"] = "true";
dictionary["version"] = regexWorker["${version}"];
dictionary["ecmascriptversion"] = "3.0";
dictionary["javascript"] = "true";
dictionary["javascriptversion"] = "1.3";
dictionary["w3cdomversion"] = "1.0";
dictionary["supportsAccesskeyAttribute"] = "true";
dictionary["tagwriter"] = "System.Web.UI.HtmlTextWriter";
dictionary["cookies"] = "true";
dictionary["frames"] = "true";
dictionary["javaapplets"] = "true";
dictionary["supportsCallback"] = "true";
dictionary["supportsDivNoWrap"] = "false";
dictionary["supportsFileUpload"] = "true";
dictionary["supportsMultilineTextBoxDisplay"] = "true";
dictionary["supportsXmlHttp"] = "true";
dictionary["tables"] = "true";
dictionary["canInitiateVoiceCall"] = "true";
browserCaps.AddBrowser("BlackBerry");
this.BlackberryProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.BlackberryProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void OperaProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void OperaProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool OperaProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "Opera[ /](?\'version\'(?\'major\'\\d+)(\\.(?\'minor\'\\d+)?)(?\'letters\'\\w*))");
if ((result == false)) {
return false;
}
// Capture: header values
regexWorker.ProcessRegex(((string)(browserCaps[string.Empty])), "Presto/(?\'layoutVersion\'\\d+)");
// Capabilities: set capabilities
dictionary["browser"] = "Opera";
dictionary["majorversion"] = regexWorker["${major}"];
dictionary["minorversion"] = regexWorker["${minor}"];
dictionary["type"] = regexWorker["Opera${major}"];
dictionary["version"] = regexWorker["${version}"];
dictionary["layoutEngine"] = "Presto";
dictionary["layoutEngineVersion"] = regexWorker["${layoutVersion}"];
dictionary["ecmascriptversion"] = "3.0";
dictionary["javascript"] = "true";
dictionary["javascriptversion"] = "1.5";
dictionary["letters"] = regexWorker["${letters}"];
dictionary["w3cdomversion"] = "1.0";
dictionary["tagwriter"] = "System.Web.UI.HtmlTextWriter";
dictionary["cookies"] = "true";
dictionary["frames"] = "true";
dictionary["javaapplets"] = "true";
dictionary["supportsAccesskeyAttribute"] = "true";
dictionary["supportsCallback"] = "true";
dictionary["supportsFileUpload"] = "true";
dictionary["supportsMultilineTextBoxDisplay"] = "true";
dictionary["supportsXmlHttp"] = "true";
dictionary["tables"] = "true";
dictionary["inputType"] = "keyboard";
dictionary["isColor"] = "true";
dictionary["isMobileDevice"] = "false";
dictionary["maximumRenderedPageSize"] = "300000";
dictionary["screenBitDepth"] = "8";
dictionary["supportsBold"] = "true";
dictionary["supportsCss"] = "true";
dictionary["supportsDivNoWrap"] = "true";
dictionary["supportsFontName"] = "true";
dictionary["supportsFontSize"] = "true";
dictionary["supportsImageSubmit"] = "true";
dictionary["supportsItalic"] = "true";
browserCaps.AddBrowser("Opera");
this.OperaProcessGateways(headers, browserCaps);
// gateway, parent=Opera
this.OperaminiProcess(headers, browserCaps);
// gateway, parent=Opera
this.OperamobileProcess(headers, browserCaps);
bool ignoreApplicationBrowsers = true;
// browser, parent=Opera
if (this.Opera8plusProcess(headers, browserCaps)) {
}
else {
ignoreApplicationBrowsers = false;
}
this.OperaProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void OperaminiProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void OperaminiProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool OperaminiProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "Opera Mini");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
dictionary["isMobileDevice"] = "true";
this.OperaminiProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.OperaminiProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void OperamobileProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void OperamobileProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool OperamobileProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "Opera Mobi");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
dictionary["isMobileDevice"] = "true";
this.OperamobileProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.OperamobileProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void Opera8plusProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void Opera8plusProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool Opera8plusProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check capability matches
string headerValue;
headerValue = ((string)(dictionary["majorversion"]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "^[8-9]|\\d{2,}$");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
dictionary["supportsMaintainScrollPositionOnPostback"] = "true";
browserCaps.AddBrowser("Opera8Plus");
this.Opera8plusProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = true;
// browser, parent=Opera8Plus
if (this.Opera8to9Process(headers, browserCaps)) {
}
else {
if (this.Opera10Process(headers, browserCaps)) {
}
else {
ignoreApplicationBrowsers = false;
}
}
this.Opera8plusProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void Opera8to9ProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void Opera8to9ProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool Opera8to9Process(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check capability matches
string headerValue;
headerValue = ((string)(dictionary["majorversion"]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "^[8-9]$");
if ((result == false)) {
return false;
}
headerValue = ((string)(dictionary["Version"]));
result = regexWorker.ProcessRegex(headerValue, "^9.80$");
if ((result == true)) {
return false;
}
// Capabilities: set capabilities
browserCaps.AddBrowser("Opera8to9");
this.Opera8to9ProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.Opera8to9ProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void Opera10ProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void Opera10ProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool Opera10Process(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "Opera/10\\.|Version/10\\.");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
dictionary["version"] = "10.00";
dictionary["majorversion"] = "10";
dictionary["minorversion"] = "00";
browserCaps.AddBrowser("Opera10");
this.Opera10ProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.Opera10ProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void ChromeProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void ChromeProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool ChromeProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "Chrome/(?\'version\'(?\'major\'\\d+)(\\.(?\'minor\'\\d+)?)\\w*)");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
dictionary["browser"] = "Chrome";
dictionary["majorversion"] = regexWorker["${major}"];
dictionary["minorversion"] = regexWorker["${minor}"];
dictionary["type"] = regexWorker["Chrome${major}"];
dictionary["version"] = regexWorker["${version}"];
dictionary["ecmascriptversion"] = "3.0";
dictionary["javascript"] = "true";
dictionary["javascriptversion"] = "1.7";
dictionary["w3cdomversion"] = "1.0";
dictionary["supportsAccesskeyAttribute"] = "true";
dictionary["tagwriter"] = "System.Web.UI.HtmlTextWriter";
dictionary["cookies"] = "true";
dictionary["frames"] = "true";
dictionary["javaapplets"] = "true";
dictionary["supportsCallback"] = "true";
dictionary["supportsDivNoWrap"] = "false";
dictionary["supportsFileUpload"] = "true";
dictionary["supportsMaintainScrollPositionOnPostback"] = "true";
dictionary["supportsMultilineTextBoxDisplay"] = "true";
dictionary["supportsXmlHttp"] = "true";
dictionary["tables"] = "true";
browserCaps.AddBrowser("Chrome");
this.ChromeProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.ChromeProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void DefaultProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void DefaultProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool DefaultProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Capabilities: set capabilities
dictionary["activexcontrols"] = "false";
dictionary["aol"] = "false";
dictionary["backgroundsounds"] = "false";
dictionary["beta"] = "false";
dictionary["browser"] = "Unknown";
dictionary["canCombineFormsInDeck"] = "true";
dictionary["canInitiateVoiceCall"] = "false";
dictionary["canRenderAfterInputOrSelectElement"] = "true";
dictionary["canRenderEmptySelects"] = "true";
dictionary["canRenderInputAndSelectElementsTogether"] = "true";
dictionary["canRenderMixedSelects"] = "true";
dictionary["canRenderOneventAndPrevElementsTogether"] = "true";
dictionary["canRenderPostBackCards"] = "true";
dictionary["canRenderSetvarZeroWithMultiSelectionList"] = "true";
dictionary["canSendMail"] = "true";
dictionary["cdf"] = "false";
dictionary["cookies"] = "true";
dictionary["crawler"] = "false";
dictionary["defaultSubmitButtonLimit"] = "1";
dictionary["ecmascriptversion"] = "0.0";
dictionary["frames"] = "false";
dictionary["gatewayMajorVersion"] = "0";
dictionary["gatewayMinorVersion"] = "0";
dictionary["gatewayVersion"] = "None";
dictionary["hasBackButton"] = "true";
dictionary["hidesRightAlignedMultiselectScrollbars"] = "false";
dictionary["inputType"] = "telephoneKeypad";
dictionary["isColor"] = "false";
dictionary["isMobileDevice"] = "false";
dictionary["javaapplets"] = "false";
dictionary["javascript"] = "false";
dictionary["jscriptversion"] = "0.0";
dictionary["majorversion"] = "0";
dictionary["maximumHrefLength"] = "10000";
dictionary["maximumRenderedPageSize"] = "2000";
dictionary["maximumSoftkeyLabelLength"] = "5";
dictionary["minorversion"] = "0";
dictionary["mobileDeviceManufacturer"] = "Unknown";
dictionary["mobileDeviceModel"] = "Unknown";
dictionary["msdomversion"] = "0.0";
dictionary["numberOfSoftkeys"] = "0";
dictionary["platform"] = "Unknown";
dictionary["preferredImageMime"] = "image/gif";
dictionary["preferredRenderingMime"] = "text/html";
dictionary["preferredRenderingType"] = "html32";
dictionary["rendersBreakBeforeWmlSelectAndInput"] = "false";
dictionary["rendersBreaksAfterHtmlLists"] = "true";
dictionary["rendersBreaksAfterWmlAnchor"] = "false";
dictionary["rendersBreaksAfterWmlInput"] = "false";
dictionary["rendersWmlDoAcceptsInline"] = "true";
dictionary["rendersWmlSelectsAsMenuCards"] = "false";
dictionary["requiredMetaTagNameValue"] = "";
dictionary["requiresAbsolutePostbackUrl"] = "false";
dictionary["requiresAdaptiveErrorReporting"] = "false";
dictionary["requiresAttributeColonSubstitution"] = "false";
dictionary["requiresContentTypeMetaTag"] = "false";
dictionary["requiresControlStateInSession"] = "false";
dictionary["requiresDBCSCharacter"] = "false";
dictionary["requiresFullyQualifiedRedirectUrl"] = "false";
dictionary["requiresLeadingPageBreak"] = "false";
dictionary["requiresNoBreakInFormatting"] = "false";
dictionary["requiresOutputOptimization"] = "false";
dictionary["requiresPhoneNumbersAsPlainText"] = "false";
dictionary["requiresPostRedirectionHandling"] = "false";
dictionary["requiresSpecialViewStateEncoding"] = "false";
dictionary["requiresUniqueFilePathSuffix"] = "false";
dictionary["requiresUniqueHtmlCheckboxNames"] = "false";
dictionary["requiresUniqueHtmlInputNames"] = "false";
dictionary["requiresUrlEncodedPostfieldValues"] = "false";
dictionary["requiresXhtmlCssSuppression"] = "false";
dictionary["screenBitDepth"] = "1";
dictionary["supportsAccesskeyAttribute"] = "false";
dictionary["supportsBodyColor"] = "true";
dictionary["supportsBold"] = "false";
dictionary["supportsCallback"] = "false";
dictionary["supportsCacheControlMetaTag"] = "true";
dictionary["supportsCss"] = "false";
dictionary["supportsDivAlign"] = "true";
dictionary["supportsDivNoWrap"] = "false";
dictionary["supportsEmptyStringInCookieValue"] = "true";
dictionary["supportsFileUpload"] = "false";
dictionary["supportsFontColor"] = "true";
dictionary["supportsFontName"] = "false";
dictionary["supportsFontSize"] = "false";
dictionary["supportsImageSubmit"] = "false";
dictionary["supportsIModeSymbols"] = "false";
dictionary["supportsInputIStyle"] = "false";
dictionary["supportsInputMode"] = "false";
dictionary["supportsItalic"] = "false";
dictionary["supportsJPhoneMultiMediaAttributes"] = "false";
dictionary["supportsJPhoneSymbols"] = "false";
dictionary["SupportsMaintainScrollPositionOnPostback"] = "false";
dictionary["supportsMultilineTextBoxDisplay"] = "false";
dictionary["supportsQueryStringInFormAction"] = "true";
dictionary["supportsRedirectWithCookie"] = "true";
dictionary["supportsSelectMultiple"] = "true";
dictionary["supportsUncheck"] = "true";
dictionary["supportsVCard"] = "false";
dictionary["tables"] = "false";
dictionary["tagwriter"] = "System.Web.UI.Html32TextWriter";
dictionary["type"] = "Unknown";
dictionary["vbscript"] = "false";
dictionary["version"] = "0.0";
dictionary["w3cdomversion"] = "0.0";
dictionary["win16"] = "false";
dictionary["win32"] = "false";
browserCaps.AddBrowser("Default");
this.DefaultProcessGateways(headers, browserCaps);
// gateway, parent=Default
this.CrawlerProcess(headers, browserCaps);
// gateway, parent=Default
this.PlatformProcess(headers, browserCaps);
// gateway, parent=Default
this.WinProcess(headers, browserCaps);
bool ignoreApplicationBrowsers = true;
// browser, parent=Default
if (this.BlackberryProcess(headers, browserCaps)) {
}
else {
if (this.OperaProcess(headers, browserCaps)) {
}
else {
if (this.GenericdownlevelProcess(headers, browserCaps)) {
}
else {
if (this.MozillaProcess(headers, browserCaps)) {
}
else {
if (this.UcbrowserProcess(headers, browserCaps)) {
}
else {
ignoreApplicationBrowsers = false;
}
}
}
}
}
this.DefaultProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void FirefoxProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void FirefoxProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool FirefoxProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "Firefox\\/(?\'version\'(?\'major\'\\d+)(\\.(?\'minor\'\\d+)?)\\w*)");
if ((result == false)) {
return false;
}
// Capture: header values
regexWorker.ProcessRegex(((string)(browserCaps[string.Empty])), "Gecko/(?\'layoutVersion\'\\d+)");
// Capabilities: set capabilities
dictionary["browser"] = "Firefox";
dictionary["majorversion"] = regexWorker["${major}"];
dictionary["minorversion"] = regexWorker["${minor}"];
dictionary["version"] = regexWorker["${version}"];
dictionary["type"] = regexWorker["Firefox${major}"];
dictionary["layoutEngine"] = "Gecko";
dictionary["layoutEngineVersion"] = regexWorker["${layoutVersion}"];
dictionary["supportsAccesskeyAttribute"] = "true";
dictionary["javaapplets"] = "true";
dictionary["supportsDivNoWrap"] = "false";
browserCaps.AddBrowser("Firefox");
this.FirefoxProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = true;
// browser, parent=Firefox
if (this.Firefox3plusProcess(headers, browserCaps)) {
}
else {
ignoreApplicationBrowsers = false;
}
this.FirefoxProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void Firefox3plusProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void Firefox3plusProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool Firefox3plusProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check capability matches
string headerValue;
headerValue = ((string)(dictionary["majorversion"]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "[3-9]|\\d{2,}");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
dictionary["javascriptversion"] = "1.8";
browserCaps.AddBrowser("Firefox3Plus");
this.Firefox3plusProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = true;
// browser, parent=Firefox3Plus
if (this.Firefox3Process(headers, browserCaps)) {
}
else {
ignoreApplicationBrowsers = false;
}
this.Firefox3plusProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void Firefox3ProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void Firefox3ProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool Firefox3Process(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check capability matches
string headerValue;
headerValue = ((string)(dictionary["majorversion"]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "^3$");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
browserCaps.AddBrowser("Firefox3");
this.Firefox3ProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = true;
// browser, parent=Firefox3
if (this.Firefox35Process(headers, browserCaps)) {
}
else {
ignoreApplicationBrowsers = false;
}
this.Firefox3ProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void Firefox35ProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void Firefox35ProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool Firefox35Process(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check capability matches
string headerValue;
headerValue = ((string)(dictionary["minorversion"]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "^[5-9]");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
browserCaps.AddBrowser("Firefox35");
this.Firefox35ProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.Firefox35ProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void CrawlerProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void CrawlerProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool CrawlerProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "crawler|Crawler|Googlebot|bingbot");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
dictionary["crawler"] = "true";
this.CrawlerProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.CrawlerProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void PlatformProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void PlatformProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool PlatformProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
if (string.IsNullOrEmpty(headerValue)) {
return false;
}
// Capabilities: set capabilities
this.PlatformProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = true;
// browser, parent=Platform
if (this.PlatformwinntProcess(headers, browserCaps)) {
}
else {
if (this.Platformwin2000bProcess(headers, browserCaps)) {
}
else {
if (this.Platformwin95Process(headers, browserCaps)) {
}
else {
if (this.Platformwin98Process(headers, browserCaps)) {
}
else {
if (this.Platformwin16Process(headers, browserCaps)) {
}
else {
if (this.PlatformwinceProcess(headers, browserCaps)) {
}
else {
if (this.Platformmac68kProcess(headers, browserCaps)) {
}
else {
if (this.PlatformmacppcProcess(headers, browserCaps)) {
}
else {
if (this.PlatformunixProcess(headers, browserCaps)) {
}
else {
if (this.PlatformwebtvProcess(headers, browserCaps)) {
}
else {
ignoreApplicationBrowsers = false;
}
}
}
}
}
}
}
}
}
}
this.PlatformProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void PlatformwinntProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void PlatformwinntProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool PlatformwinntProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "Windows NT|WinNT|Windows XP");
if ((result == false)) {
return false;
}
headerValue = ((string)(browserCaps[string.Empty]));
result = regexWorker.ProcessRegex(headerValue, "WinCE|Windows CE");
if ((result == true)) {
return false;
}
// Capabilities: set capabilities
dictionary["platform"] = "WinNT";
this.PlatformwinntProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = true;
// browser, parent=PlatformWinnt
if (this.PlatformwinxpProcess(headers, browserCaps)) {
}
else {
if (this.Platformwin2000aProcess(headers, browserCaps)) {
}
else {
ignoreApplicationBrowsers = false;
}
}
this.PlatformwinntProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void PlatformwinxpProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void PlatformwinxpProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool PlatformwinxpProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "Windows (NT 5\\.1|XP)");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
dictionary["platform"] = "WinXP";
this.PlatformwinxpProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.PlatformwinxpProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void Platformwin2000aProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void Platformwin2000aProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool Platformwin2000aProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "Windows NT 5\\.0");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
dictionary["platform"] = "Win2000";
this.Platformwin2000aProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.Platformwin2000aProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void Platformwin2000bProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void Platformwin2000bProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool Platformwin2000bProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "Windows 2000");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
dictionary["platform"] = "Win2000";
this.Platformwin2000bProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.Platformwin2000bProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void Platformwin95ProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void Platformwin95ProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool Platformwin95Process(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "Win(dows )?95");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
dictionary["platform"] = "Win95";
this.Platformwin95ProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.Platformwin95ProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void Platformwin98ProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void Platformwin98ProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool Platformwin98Process(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "Win(dows )?98");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
dictionary["platform"] = "Win98";
this.Platformwin98ProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.Platformwin98ProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void Platformwin16ProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void Platformwin16ProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool Platformwin16Process(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "Win(dows 3\\.1|16)");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
dictionary["platform"] = "Win16";
this.Platformwin16ProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.Platformwin16ProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void PlatformwinceProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void PlatformwinceProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool PlatformwinceProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "Win(dows )?CE");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
dictionary["platform"] = "WinCE";
this.PlatformwinceProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.PlatformwinceProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void Platformmac68kProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void Platformmac68kProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool Platformmac68kProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "Mac(_68(000|K)|intosh.*68K)");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
dictionary["platform"] = "Mac68K";
this.Platformmac68kProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.Platformmac68kProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void PlatformmacppcProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void PlatformmacppcProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool PlatformmacppcProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "Mac(_PowerPC|intosh.*PPC|_PPC)|PPC Mac");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
dictionary["platform"] = "MacPPC";
this.PlatformmacppcProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.PlatformmacppcProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void PlatformunixProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void PlatformunixProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool PlatformunixProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "X11");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
dictionary["platform"] = "UNIX";
this.PlatformunixProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.PlatformunixProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void PlatformwebtvProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void PlatformwebtvProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool PlatformwebtvProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "WebTV");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
dictionary["platform"] = "WebTV";
this.PlatformwebtvProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.PlatformwebtvProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void WinProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void WinProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool WinProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
if (string.IsNullOrEmpty(headerValue)) {
return false;
}
// Capabilities: set capabilities
this.WinProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = true;
// browser, parent=Win
if (this.Win32Process(headers, browserCaps)) {
}
else {
if (this.Win16Process(headers, browserCaps)) {
}
else {
ignoreApplicationBrowsers = false;
}
}
this.WinProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void Win32ProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void Win32ProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool Win32Process(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "Win(dows )?(9[58]|NT|32)");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
dictionary["win32"] = "true";
this.Win32ProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.Win32ProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void Win16ProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void Win16ProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool Win16Process(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "16bit|Win(dows 3\\.1|16)");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
dictionary["win16"] = "true";
this.Win16ProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.Win16ProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void GenericdownlevelProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void GenericdownlevelProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool GenericdownlevelProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "^Generic Downlevel$");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
dictionary["cookies"] = "false";
dictionary["ecmascriptversion"] = "1.0";
dictionary["tables"] = "true";
dictionary["type"] = "Downlevel";
browserCaps.Adapters["System.Web.UI.WebControls.Menu, System.Web, Version=4.0.0.0, Culture=neutral, Pub" +
"licKeyToken=b03f5f7f11d50a3a"] = "System.Web.UI.WebControls.Adapters.MenuAdapter";
browserCaps.AddBrowser("GenericDownlevel");
this.GenericdownlevelProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.GenericdownlevelProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void MozillaProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void MozillaProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool MozillaProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "Mozilla");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
dictionary["browser"] = "Mozilla";
dictionary["cookies"] = "true";
dictionary["ecmascriptversion"] = "3.0";
dictionary["frames"] = "true";
dictionary["inputType"] = "keyboard";
dictionary["isColor"] = "true";
dictionary["isMobileDevice"] = "false";
dictionary["javascript"] = "true";
dictionary["javascriptversion"] = "1.5";
dictionary["maximumRenderedPageSize"] = "300000";
dictionary["screenBitDepth"] = "8";
dictionary["supportsBold"] = "true";
dictionary["supportsCallback"] = "true";
dictionary["supportsCss"] = "true";
dictionary["supportsDivNoWrap"] = "true";
dictionary["supportsFileUpload"] = "true";
dictionary["supportsFontName"] = "true";
dictionary["supportsFontSize"] = "true";
dictionary["supportsImageSubmit"] = "true";
dictionary["supportsItalic"] = "true";
dictionary["supportsMaintainScrollPositionOnPostback"] = "true";
dictionary["supportsMultilineTextBoxDisplay"] = "true";
dictionary["supportsXmlHttp"] = "true";
dictionary["tables"] = "true";
dictionary["tagwriter"] = "System.Web.UI.HtmlTextWriter";
dictionary["type"] = "Mozilla";
dictionary["w3cdomversion"] = "1.0";
browserCaps.AddBrowser("Mozilla");
this.MozillaProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = true;
// browser, parent=Mozilla
if (this.IeProcess(headers, browserCaps)) {
}
else {
if (this.InternetexplorerProcess(headers, browserCaps)) {
}
else {
if (this.FirefoxProcess(headers, browserCaps)) {
}
else {
if (this.WebkitProcess(headers, browserCaps)) {
}
else {
if (this.IemobileProcess(headers, browserCaps)) {
}
else {
ignoreApplicationBrowsers = false;
}
}
}
}
}
this.MozillaProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void WebkitProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void WebkitProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool WebkitProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "AppleWebKit");
if ((result == false)) {
return false;
}
// Capture: header values
regexWorker.ProcessRegex(((string)(browserCaps[string.Empty])), "AppleWebKit/(?\'layoutVersion\'\\d+)");
// Capabilities: set capabilities
dictionary["layoutEngine"] = "WebKit";
dictionary["layoutEngineVersion"] = regexWorker["${layoutVersion}"];
browserCaps.AddBrowser("WebKit");
this.WebkitProcessGateways(headers, browserCaps);
// gateway, parent=WebKit
this.WebkitmobileProcess(headers, browserCaps);
bool ignoreApplicationBrowsers = true;
// browser, parent=WebKit
if (this.ChromeProcess(headers, browserCaps)) {
}
else {
if (this.SafariProcess(headers, browserCaps)) {
}
else {
ignoreApplicationBrowsers = false;
}
}
this.WebkitProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void WebkitmobileProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void WebkitmobileProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool WebkitmobileProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "Mobile( Safari)?/(?\'iOSVersion\'[^ ]+)");
if ((result == false)) {
return false;
}
// Capture: header values
regexWorker.ProcessRegex(((string)(browserCaps[string.Empty])), "Mozilla/5.0 \\((?\'deviceName\'[^;]+)");
// Capabilities: set capabilities
dictionary["mobileDeviceModel"] = regexWorker["${deviceName}"];
dictionary["isMobileDevice"] = "true";
dictionary["ecmascriptversion"] = "3.0";
dictionary["javascript"] = "true";
dictionary["javascriptversion"] = "1.6";
dictionary["w3cdomversion"] = "1.0";
dictionary["supportsAccesskeyAttribute"] = "true";
dictionary["tagwriter"] = "System.Web.UI.HtmlTextWriter";
dictionary["cookies"] = "true";
dictionary["frames"] = "true";
dictionary["supportsCallback"] = "true";
dictionary["supportsDivNoWrap"] = "false";
dictionary["supportsFileUpload"] = "true";
dictionary["supportsMaintainScrollPositionOnPostback"] = "true";
dictionary["supportsMultilineTextBoxDisplay"] = "true";
dictionary["supportsXmlHttp"] = "true";
dictionary["tables"] = "true";
this.WebkitmobileProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.WebkitmobileProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void IemobileProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void IemobileProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool IemobileProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "IEMobile.(?\'version\'(?\'major\'\\d+)(\\.(?\'minor\'\\d+)?)\\w*)");
if ((result == false)) {
return false;
}
// Capture: header values
regexWorker.ProcessRegex(((string)(browserCaps[string.Empty])), "MSIE (?\'msieMajorVersion\'\\d+)");
// Capabilities: set capabilities
dictionary["layoutEngine"] = "Trident";
dictionary["browser"] = "IEMobile";
dictionary["majorversion"] = regexWorker["${major}"];
dictionary["minorversion"] = regexWorker["${minor}"];
dictionary["type"] = regexWorker["IEMobile${msieMajorVersion}"];
dictionary["isMobileDevice"] = "true";
dictionary["version"] = regexWorker["${version}"];
dictionary["jscriptversion"] = "5.6";
dictionary["msdomversion"] = regexWorker["${majorversion}.${minorversion}"];
dictionary["supportsAccesskeyAttribute"] = "true";
dictionary["javaapplets"] = "true";
dictionary["supportsDivNoWrap"] = "false";
dictionary["vbscript"] = "true";
dictionary["inputType"] = "virtualKeyboard";
dictionary["numberOfSoftkeys"] = "2";
browserCaps.AddBrowser("IEMobile");
this.IemobileProcessGateways(headers, browserCaps);
// gateway, parent=IEMobile
this.MonoProcess(headers, browserCaps);
// gateway, parent=IEMobile
this.PixelsProcess(headers, browserCaps);
// gateway, parent=IEMobile
this.OsProcess(headers, browserCaps);
// gateway, parent=IEMobile
this.CpuProcess(headers, browserCaps);
// gateway, parent=IEMobile
this.VoiceProcess(headers, browserCaps);
bool ignoreApplicationBrowsers = true;
// browser, parent=IEMobile
if (this.WindowsphoneProcess(headers, browserCaps)) {
}
else {
ignoreApplicationBrowsers = false;
}
this.IemobileProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void WindowsphoneProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void WindowsphoneProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool WindowsphoneProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "Windows Phone OS");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
dictionary["javaapplets"] = "false";
dictionary["jscriptversion"] = "5.7";
browserCaps.AddBrowser("WindowsPhone");
this.WindowsphoneProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.WindowsphoneProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void MonoProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void MonoProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool MonoProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(headers["UA-COLOR"]));
if (string.IsNullOrEmpty(headerValue)) {
return false;
}
headerValue = ((string)(headers["UA-COLOR"]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "mono(?\'colorDepth\'\\d+)");
if ((result == false)) {
return false;
}
browserCaps.DisableOptimizedCacheKey();
// Capabilities: set capabilities
dictionary["isColor"] = "false";
dictionary["screenBitDepth"] = regexWorker["${colorDepth}"];
this.MonoProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.MonoProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void PixelsProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void PixelsProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool PixelsProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(headers["UA-PIXELS"]));
if (string.IsNullOrEmpty(headerValue)) {
return false;
}
headerValue = ((string)(headers["UA-PIXELS"]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "(?\'screenWidth\'\\d+)x(?\'screenHeight\'\\d+)");
if ((result == false)) {
return false;
}
browserCaps.DisableOptimizedCacheKey();
// Capabilities: set capabilities
dictionary["screenPixelsHeight"] = regexWorker["${screenHeight}"];
dictionary["screenPixelsWidth"] = regexWorker["${screenWidth}"];
this.PixelsProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.PixelsProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
// NOTE: when updating browser caps, do not lowercase OS->Os as we shipped 4.0 with this casing, so we differ from the
// autogenerated browser caps file.
[SuppressMessage("Microsoft.Naming", "CA1706:ShortAcronymsShouldBeUppercase", MessageId = "This is auto-generated method.")]
protected virtual void OSProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
[SuppressMessage("Microsoft.Naming", "CA1706:ShortAcronymsShouldBeUppercase", MessageId = "This is auto-generated method.")]
protected virtual void OSProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool OsProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(headers["UA-OS"]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "(?\'os\'.+)");
if ((result == false)) {
return false;
}
browserCaps.DisableOptimizedCacheKey();
// Capabilities: set capabilities
dictionary["platform"] = regexWorker["${os}"];
this.OSProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.OSProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void CpuProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void CpuProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool CpuProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(headers["UA-CPU"]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "(?\'cpu\'.+)");
if ((result == false)) {
return false;
}
browserCaps.DisableOptimizedCacheKey();
// Capabilities: set capabilities
dictionary["cpu"] = regexWorker["${cpu}"];
this.CpuProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.CpuProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void VoiceProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void VoiceProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool VoiceProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(headers["UA-VOICE"]));
if (string.IsNullOrEmpty(headerValue)) {
return false;
}
headerValue = ((string)(headers["UA-VOICE"]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "(?i:TRUE)");
if ((result == false)) {
return false;
}
browserCaps.DisableOptimizedCacheKey();
// Capabilities: set capabilities
dictionary["canInitiateVoiceCall"] = "true";
this.VoiceProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.VoiceProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void IphoneProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void IphoneProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool IphoneProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "iPhone");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
dictionary["isMobileDevice"] = "true";
dictionary["mobileDeviceManufacturer"] = "Apple";
dictionary["mobileDeviceModel"] = "IPhone";
dictionary["canInitiateVoiceCall"] = "true";
this.IphoneProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.IphoneProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void IpodProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void IpodProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool IpodProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "iPod");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
dictionary["isMobileDevice"] = "true";
dictionary["mobileDeviceManufacturer"] = "Apple";
dictionary["mobileDeviceModel"] = "IPod";
this.IpodProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.IpodProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void IpadProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void IpadProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool IpadProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "iPad");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
dictionary["isMobileDevice"] = "true";
dictionary["mobileDeviceManufacturer"] = "Apple";
dictionary["mobileDeviceModel"] = "IPad";
this.IpadProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.IpadProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void SafariProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void SafariProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool SafariProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "Safari");
if ((result == false)) {
return false;
}
headerValue = ((string)(browserCaps[string.Empty]));
result = regexWorker.ProcessRegex(headerValue, "Chrome");
if ((result == true)) {
return false;
}
headerValue = ((string)(browserCaps[string.Empty]));
result = regexWorker.ProcessRegex(headerValue, "Android");
if ((result == true)) {
return false;
}
// Capabilities: set capabilities
dictionary["browser"] = "Safari";
dictionary["type"] = "Safari";
browserCaps.AddBrowser("Safari");
this.SafariProcessGateways(headers, browserCaps);
// gateway, parent=Safari
this.IphoneProcess(headers, browserCaps);
// gateway, parent=Safari
this.IpodProcess(headers, browserCaps);
// gateway, parent=Safari
this.IpadProcess(headers, browserCaps);
bool ignoreApplicationBrowsers = true;
// browser, parent=Safari
if (this.Safari3plusProcess(headers, browserCaps)) {
}
else {
ignoreApplicationBrowsers = false;
}
this.SafariProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void Safari3plusProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void Safari3plusProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool Safari3plusProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "Version/(?\'version\'(?\'major\'[3-9]|\\d{2,})(\\.(?\'minor\'\\d+)?)\\w*)");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
dictionary["version"] = regexWorker["${version}"];
dictionary["majorversion"] = regexWorker["${major}"];
dictionary["minorversion"] = regexWorker["${minor}"];
dictionary["type"] = regexWorker["Safari${major}"];
dictionary["ecmascriptversion"] = "3.0";
dictionary["javascript"] = "true";
dictionary["javascriptversion"] = "1.6";
dictionary["w3cdomversion"] = "1.0";
dictionary["tagwriter"] = "System.Web.UI.HtmlTextWriter";
dictionary["cookies"] = "true";
dictionary["frames"] = "true";
dictionary["javaapplets"] = "true";
dictionary["supportsAccesskeyAttribute"] = "true";
dictionary["supportsCallback"] = "true";
dictionary["supportsDivNoWrap"] = "false";
dictionary["supportsFileUpload"] = "true";
dictionary["supportsMaintainScrollPositionOnPostback"] = "true";
dictionary["supportsMultilineTextBoxDisplay"] = "true";
dictionary["supportsXmlHttp"] = "true";
dictionary["tables"] = "true";
browserCaps.AddBrowser("Safari3Plus");
this.Safari3plusProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = true;
// browser, parent=Safari3Plus
if (this.Safari3to4Process(headers, browserCaps)) {
}
else {
ignoreApplicationBrowsers = false;
}
this.Safari3plusProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void Safari3to4ProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void Safari3to4ProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool Safari3to4Process(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check capability matches
string headerValue;
headerValue = ((string)(dictionary["majorversion"]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "^[3-4]$");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
browserCaps.AddBrowser("Safari3to4");
this.Safari3to4ProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = true;
// browser, parent=Safari3to4
if (this.Safari4Process(headers, browserCaps)) {
}
else {
ignoreApplicationBrowsers = false;
}
this.Safari3to4ProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void Safari4ProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void Safari4ProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool Safari4Process(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check capability matches
string headerValue;
headerValue = ((string)(dictionary["majorversion"]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "^4$");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
dictionary["javascriptversion"] = "1.7";
browserCaps.AddBrowser("Safari4");
this.Safari4ProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.Safari4ProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void UcbrowserProcessGateways(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
protected virtual void UcbrowserProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool UcbrowserProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(browserCaps[string.Empty]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "(UC Browser |UCWEB)(?\'version\'(?\'major\'\\d+)(\\.(?\'minor\'[\\d\\.]+)?)\\w*)");
if ((result == false)) {
return false;
}
// Capabilities: set capabilities
dictionary["browser"] = "UCBrowser";
dictionary["majorversion"] = regexWorker["${major}"];
dictionary["minorversion"] = regexWorker["${minor}"];
dictionary["isMobileDevice"] = "true";
dictionary["version"] = regexWorker["${version}"];
dictionary["ecmascriptversion"] = "3.0";
dictionary["javascript"] = "true";
dictionary["javascriptversion"] = "1.5";
dictionary["tagwriter"] = "System.Web.UI.HtmlTextWriter";
dictionary["cookies"] = "true";
dictionary["frames"] = "true";
dictionary["supportsCallback"] = "true";
dictionary["supportsFileUpload"] = "true";
dictionary["supportsMultilineTextBoxDisplay"] = "true";
dictionary["supportsXmlHttp"] = "true";
dictionary["tables"] = "true";
browserCaps.AddBrowser("UCBrowser");
this.UcbrowserProcessGateways(headers, browserCaps);
bool ignoreApplicationBrowsers = false;
this.UcbrowserProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void DefaultDefaultProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool DefaultDefaultProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Capabilities: set capabilities
dictionary["ecmascriptversion"] = "0.0";
dictionary["javascript"] = "false";
dictionary["jscriptversion"] = "0.0";
bool ignoreApplicationBrowsers = true;
// browser, parent=Default
if (this.DefaultWmlProcess(headers, browserCaps)) {
}
else {
if (this.DefaultXhtmlmpProcess(headers, browserCaps)) {
}
else {
ignoreApplicationBrowsers = false;
}
}
this.DefaultDefaultProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void DefaultWmlProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool DefaultWmlProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(headers["Accept"]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "text/vnd\\.wap\\.wml|text/hdml");
if ((result == false)) {
return false;
}
headerValue = ((string)(headers["Accept"]));
result = regexWorker.ProcessRegex(headerValue, "application/xhtml\\+xml; profile|application/vnd\\.wap\\.xhtml\\+xml");
if ((result == true)) {
return false;
}
browserCaps.DisableOptimizedCacheKey();
// Capabilities: set capabilities
dictionary["preferredRenderingMime"] = "text/vnd.wap.wml";
dictionary["preferredRenderingType"] = "wml11";
bool ignoreApplicationBrowsers = false;
this.DefaultWmlProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected virtual void DefaultXhtmlmpProcessBrowsers(bool ignoreApplicationBrowsers, System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
}
private bool DefaultXhtmlmpProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) {
System.Collections.IDictionary dictionary;
dictionary = browserCaps.Capabilities;
// Identification: check header matches
string headerValue;
headerValue = ((string)(headers["Accept"]));
bool result;
RegexWorker regexWorker;
regexWorker = new RegexWorker(browserCaps);
result = regexWorker.ProcessRegex(headerValue, "application/xhtml\\+xml; profile|application/vnd\\.wap\\.xhtml\\+xml");
if ((result == false)) {
return false;
}
headerValue = ((string)(headers["Accept"]));
result = regexWorker.ProcessRegex(headerValue, "text/hdml");
if ((result == true)) {
return false;
}
headerValue = ((string)(headers["Accept"]));
result = regexWorker.ProcessRegex(headerValue, "text/vnd\\.wap\\.wml");
if ((result == true)) {
return false;
}
browserCaps.DisableOptimizedCacheKey();
// Capabilities: set capabilities
dictionary["preferredRenderingMime"] = "text/html";
dictionary["preferredRenderingType"] = "xhtml-mp";
browserCaps.HtmlTextWriter = "System.Web.UI.XhtmlTextWriter";
bool ignoreApplicationBrowsers = false;
this.DefaultXhtmlmpProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
return true;
}
protected override void PopulateMatchedHeaders(System.Collections.IDictionary dictionary) {
base.PopulateMatchedHeaders(dictionary);
dictionary[""] = null;
dictionary["UA-COLOR"] = null;
dictionary["UA-PIXELS"] = null;
dictionary["UA-OS"] = null;
dictionary["UA-CPU"] = null;
dictionary["UA-VOICE"] = null;
dictionary["Accept"] = null;
}
protected override void PopulateBrowserElements(System.Collections.IDictionary dictionary) {
base.PopulateBrowserElements(dictionary);
dictionary["Default"] = new System.Web.UI.Triplet(null, string.Empty, 0);
dictionary["BlackBerry"] = new System.Web.UI.Triplet("Default", string.Empty, 1);
dictionary["Opera"] = new System.Web.UI.Triplet("Default", string.Empty, 1);
dictionary["Opera8Plus"] = new System.Web.UI.Triplet("Opera", string.Empty, 2);
dictionary["Opera8to9"] = new System.Web.UI.Triplet("Opera8plus", string.Empty, 3);
dictionary["Opera10"] = new System.Web.UI.Triplet("Opera8plus", string.Empty, 3);
dictionary["GenericDownlevel"] = new System.Web.UI.Triplet("Default", string.Empty, 1);
dictionary["Mozilla"] = new System.Web.UI.Triplet("Default", string.Empty, 1);
dictionary["IE"] = new System.Web.UI.Triplet("Mozilla", string.Empty, 2);
dictionary["IE6Plus"] = new System.Web.UI.Triplet("Ie", string.Empty, 3);
dictionary["IE6to9"] = new System.Web.UI.Triplet("Ie6plus", string.Empty, 4);
dictionary["IE7"] = new System.Web.UI.Triplet("Ie6to9", string.Empty, 5);
dictionary["IE8"] = new System.Web.UI.Triplet("Ie6to9", string.Empty, 5);
dictionary["IE9"] = new System.Web.UI.Triplet("Ie6to9", string.Empty, 5);
dictionary["IE10Plus"] = new System.Web.UI.Triplet("Ie6plus", string.Empty, 4);
dictionary["InternetExplorer"] = new System.Web.UI.Triplet("Mozilla", string.Empty, 2);
dictionary["Firefox"] = new System.Web.UI.Triplet("Mozilla", string.Empty, 2);
dictionary["Firefox3Plus"] = new System.Web.UI.Triplet("Firefox", string.Empty, 3);
dictionary["Firefox3"] = new System.Web.UI.Triplet("Firefox3plus", string.Empty, 4);
dictionary["Firefox35"] = new System.Web.UI.Triplet("Firefox3", string.Empty, 5);
dictionary["WebKit"] = new System.Web.UI.Triplet("Mozilla", string.Empty, 2);
dictionary["Chrome"] = new System.Web.UI.Triplet("Webkit", string.Empty, 3);
dictionary["Safari"] = new System.Web.UI.Triplet("Webkit", string.Empty, 3);
dictionary["Safari3Plus"] = new System.Web.UI.Triplet("Safari", string.Empty, 4);
dictionary["Safari3to4"] = new System.Web.UI.Triplet("Safari3plus", string.Empty, 5);
dictionary["Safari4"] = new System.Web.UI.Triplet("Safari3to4", string.Empty, 6);
dictionary["IEMobile"] = new System.Web.UI.Triplet("Mozilla", string.Empty, 2);
dictionary["WindowsPhone"] = new System.Web.UI.Triplet("Iemobile", string.Empty, 3);
dictionary["UCBrowser"] = new System.Web.UI.Triplet("Default", string.Empty, 1);
}
}
}
|