Skip to content

Commit

Permalink
[System,MOBILE] Add System.Text.RegularExpressions.RegexOptions.Compi…
Browse files Browse the repository at this point in the history
…led.

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
  • Loading branch information
jonpryor committed Aug 10, 2011
1 parent ff7c678 commit 298a6c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions mcs/class/System/System.Text.RegularExpressions/Regex.cs
Expand Up @@ -224,7 +224,7 @@ static void validate_options (RegexOptions options)
RegexOptions.IgnoreCase |
RegexOptions.Multiline |
RegexOptions.ExplicitCapture |
#if !NET_2_1
#if MOBILE || !NET_2_1
RegexOptions.Compiled |
#endif
RegexOptions.Singleline |
Expand All @@ -236,7 +236,7 @@ static void validate_options (RegexOptions options)
const RegexOptions ecmaopts =
RegexOptions.IgnoreCase |
RegexOptions.Multiline |
#if !NET_2_1
#if MOBILE || !NET_2_1
RegexOptions.Compiled |
#endif
RegexOptions.ECMAScript;
Expand Down
Expand Up @@ -35,7 +35,7 @@ public enum RegexOptions {
IgnoreCase = 0x001,
Multiline = 0x002,
ExplicitCapture = 0x004,
#if !NET_2_1
#if MOBILE || !NET_2_1
Compiled = 0x008,
#endif
Singleline = 0x010,
Expand Down

0 comments on commit 298a6c4

Please sign in to comment.