[System,MOBILE] Add System.Text.RegularExpressions.RegexOptions.Compiled.
authorJonathan Pryor <jonpryor@vt.edu>
Wed, 10 Aug 2011 01:19:09 +0000 (21:19 -0400)
committerJonathan Pryor <jonpryor@vt.edu>
Wed, 10 Aug 2011 01:19:09 +0000 (21:19 -0400)
Add the RegexOptions.Compiled enumeration value to the MOBILE profile.

Fixes: http://bugzilla.xamarin.com/show_bug.cgi?id=149

MonoTouch and Mono for Android still use `PatternCompiler`, which is
interpreted. Thus RegexOptions.Compiled is ignored, and is present only for
compatibility with Windows Phone 7, which states [0]:

Present only in Silverlight for Windows Phone, but not supported.

[0] http://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regexoptions(VS.96).aspx

mcs/class/System/System.Text.RegularExpressions/Regex.cs
mcs/class/System/System.Text.RegularExpressions/RegexOptions.cs

index 48d2f27273cce00fbb6d9aa558211710cdde7733..c518934c51242cbba9ae50e518decfe2608e7f0c 100644 (file)
@@ -224,7 +224,7 @@ namespace System.Text.RegularExpressions {
                                RegexOptions.IgnoreCase |
                                RegexOptions.Multiline |
                                RegexOptions.ExplicitCapture |
-#if !NET_2_1
+#if MOBILE || !NET_2_1
                                RegexOptions.Compiled |
 #endif
                                RegexOptions.Singleline |
@@ -236,7 +236,7 @@ namespace System.Text.RegularExpressions {
                        const RegexOptions ecmaopts =
                                RegexOptions.IgnoreCase |
                                RegexOptions.Multiline |
-#if !NET_2_1
+#if MOBILE || !NET_2_1
                                RegexOptions.Compiled |
 #endif
                                RegexOptions.ECMAScript;
index e1a893fc9ff0c1dfe40d238de67f03a05bc78022..1a2599d64a5c477e71cc6c65790ff2eeff034ee9 100644 (file)
@@ -35,7 +35,7 @@ namespace System.Text.RegularExpressions {
                IgnoreCase                      = 0x001,
                Multiline                       = 0x002,
                ExplicitCapture                 = 0x004,
-#if !NET_2_1
+#if MOBILE || !NET_2_1
                Compiled                        = 0x008,
 #endif
                Singleline                      = 0x010,