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;
 }
 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;
 }
 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;
 }
 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;
 }
 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;
 }
 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;
 }
 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;
 }
 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;
 }
 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;
 }
 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;
 }
 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;
 }
 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;
 }
 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;
 }
 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;
 }
 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;
 }
 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;
 }
 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;
 }
 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;
 }
 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;
 }