• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Configuration.RegexWorker类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中System.Web.Configuration.RegexWorker的典型用法代码示例。如果您正苦于以下问题:C# RegexWorker类的具体用法?C# RegexWorker怎么用?C# RegexWorker使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



RegexWorker类属于System.Web.Configuration命名空间,在下文中一共展示了RegexWorker类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: IeProcess

 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;
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:46,代码来源:BrowserCapabilitiesFactory.cs


示例2: ChromeProcess

 private bool ChromeProcess(NameValueCollection headers, HttpBrowserCapabilities browserCaps)
 {
     IDictionary capabilities = browserCaps.Capabilities;
     string target = browserCaps[string.Empty];
     RegexWorker worker = new RegexWorker(browserCaps);
     if (!worker.ProcessRegex(target, @"Chrome/(?'version'(?'major'\d+)(\.(?'minor'\d+)?)\w*)"))
     {
         return false;
     }
     worker.ProcessRegex(browserCaps[string.Empty], @"AppleWebKit/(?'layoutVersion'\d+)");
     capabilities["layoutEngine"] = "WebKit";
     capabilities["layoutEngineVersion"] = worker["${layoutVersion}"];
     capabilities["browser"] = "Chrome";
     capabilities["majorversion"] = worker["${major}"];
     capabilities["minorversion"] = worker["${minor}"];
     capabilities["type"] = worker["Chrome${major}"];
     capabilities["version"] = worker["${version}"];
     capabilities["ecmascriptversion"] = "3.0";
     capabilities["javascript"] = "true";
     capabilities["javascriptversion"] = "1.7";
     capabilities["w3cdomversion"] = "1.0";
     capabilities["supportsAccesskeyAttribute"] = "true";
     capabilities["tagwriter"] = "System.Web.UI.HtmlTextWriter";
     capabilities["cookies"] = "true";
     capabilities["frames"] = "true";
     capabilities["javaapplets"] = "true";
     capabilities["supportsCallback"] = "true";
     capabilities["supportsDivNoWrap"] = "false";
     capabilities["supportsFileUpload"] = "true";
     capabilities["supportsMaintainScrollPositionOnPostback"] = "true";
     capabilities["supportsMultilineTextBoxDisplay"] = "true";
     capabilities["supportsXmlHttp"] = "true";
     capabilities["tables"] = "true";
     browserCaps.AddBrowser("Chrome");
     this.ChromeProcessGateways(headers, browserCaps);
     bool ignoreApplicationBrowsers = false;
     this.ChromeProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
     return true;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:39,代码来源:BrowserCapabilitiesFactory.cs


示例3: BlackberryProcess

 private bool BlackberryProcess(NameValueCollection headers, HttpBrowserCapabilities browserCaps)
 {
     IDictionary capabilities = browserCaps.Capabilities;
     string target = browserCaps[string.Empty];
     RegexWorker worker = new RegexWorker(browserCaps);
     if (!worker.ProcessRegex(target, @"BlackBerry(?'deviceName'\w+)/(?'version'(?'major'\d+)(\.(?'minor'\d+)?)\w*)"))
     {
         return false;
     }
     capabilities["layoutEngine"] = "BlackBerry";
     capabilities["browser"] = "BlackBerry";
     capabilities["majorversion"] = worker["${major}"];
     capabilities["minorversion"] = worker["${minor}"];
     capabilities["type"] = worker["BlackBerry${major}"];
     capabilities["mobileDeviceModel"] = worker["${deviceName}"];
     capabilities["isMobileDevice"] = "true";
     capabilities["version"] = worker["${version}"];
     capabilities["ecmascriptversion"] = "3.0";
     capabilities["javascript"] = "true";
     capabilities["javascriptversion"] = "1.3";
     capabilities["w3cdomversion"] = "1.0";
     capabilities["supportsAccesskeyAttribute"] = "true";
     capabilities["tagwriter"] = "System.Web.UI.HtmlTextWriter";
     capabilities["cookies"] = "true";
     capabilities["frames"] = "true";
     capabilities["javaapplets"] = "true";
     capabilities["supportsCallback"] = "true";
     capabilities["supportsDivNoWrap"] = "false";
     capabilities["supportsFileUpload"] = "true";
     capabilities["supportsMultilineTextBoxDisplay"] = "true";
     capabilities["supportsXmlHttp"] = "true";
     capabilities["tables"] = "true";
     capabilities["canInitiateVoiceCall"] = "true";
     browserCaps.AddBrowser("BlackBerry");
     this.BlackberryProcessGateways(headers, browserCaps);
     bool ignoreApplicationBrowsers = false;
     this.BlackberryProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps);
     return true;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:39,代码来源:BrowserCapabilitiesFactory.cs


示例4: Firefox35Process

 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;
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:20,代码来源:BrowserCapabilitiesFactory.cs


示例5: Ie6plusProcess

 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;
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:39,代码来源:BrowserCapabilitiesFactory.cs


示例6: ChromeProcess

 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;
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:41,代码来源:BrowserCapabilitiesFactory.cs


示例7: Opera8plusProcess

 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;
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:31,代码来源:BrowserCapabilitiesFactory.cs


示例8: IebetaProcess

 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;
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:20,代码来源:BrowserCapabilitiesFactory.cs


示例9: WindowsphoneProcess

 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;
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:22,代码来源:BrowserCapabilitiesFactory.cs


示例10: IemobileProcess

 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;
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:53,代码来源:BrowserCapabilitiesFactory.cs


示例11: WebkitmobileProcess

 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;
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:38,代码来源:BrowserCapabilitiesFactory.cs


示例12: WebkitProcess

 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;
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:36,代码来源:BrowserCapabilitiesFactory.cs


示例13: MozillaProcess

 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;
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:69,代码来源:BrowserCapabilitiesFactory.cs


示例14: GenericdownlevelProcess

 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;
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:26,代码来源:BrowserCapabilitiesFactory.cs


示例15: PlatformmacppcProcess

 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;
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:20,代码来源:BrowserCapabilitiesFactory.cs


示例16: UcbrowserProcess

 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;
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:36,代码来源:BrowserCapabilitiesFactory.cs


示例17: DefaultXhtmlmpProcess

 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;
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:32,代码来源:BrowserCapabilitiesFactory.cs


示例18: MonoProcess

 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;
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:26,代码来源:BrowserCapabilitiesFactory.cs


示例19: InternetexplorerProcess

 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;
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:36,代码来源:BrowserCapabilitiesFactory.cs


示例20: PixelsProcess

 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;
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:26,代码来源:BrowserCapabilitiesFactory.cs



注:本文中的System.Web.Configuration.RegexWorker类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# DynamicData.DynamicDataManager类代码示例发布时间:2022-05-26
下一篇:
C# Configuration.MachineKeySection类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap