static RegexCompiler() {
new ReflectionPermission(PermissionState.Unrestricted).Assert();
try {
// note some fields
_textbegF = RegexRunnerField("runtextbeg");
_textendF = RegexRunnerField("runtextend");
_textstartF = RegexRunnerField("runtextstart");
_textposF = RegexRunnerField("runtextpos");
_textF = RegexRunnerField("runtext");
_trackposF = RegexRunnerField("runtrackpos");
_trackF = RegexRunnerField("runtrack");
_stackposF = RegexRunnerField("runstackpos");
_stackF = RegexRunnerField("runstack");
_trackcountF = RegexRunnerField("runtrackcount");
// note some methods
_ensurestorageM = RegexRunnerMethod("EnsureStorage");
_captureM = RegexRunnerMethod("Capture");
_transferM = RegexRunnerMethod("TransferCapture");
_uncaptureM = RegexRunnerMethod("Uncapture");
_ismatchedM = RegexRunnerMethod("IsMatched");
_matchlengthM = RegexRunnerMethod("MatchLength");
_matchindexM = RegexRunnerMethod("MatchIndex");
_isboundaryM = RegexRunnerMethod("IsBoundary");
_charInSetM = RegexRunnerMethod("CharInClass");
_isECMABoundaryM= RegexRunnerMethod("IsECMABoundary");
_crawlposM = RegexRunnerMethod("Crawlpos");
_chartolowerM = typeof(Char).GetMethod("ToLower", new Type[] {typeof(Char), typeof(CultureInfo)});
_getcharM = typeof(String).GetMethod("get_Chars", new Type[] {typeof(int)});
_getCurrentCulture = typeof(CultureInfo).GetMethod("get_CurrentCulture");
_getInvariantCulture = typeof(CultureInfo).GetMethod("get_InvariantCulture");
#if DBG
_dumpstateM = RegexRunnerMethod("DumpState");
#endif
}
finally {
CodeAccessPermission.RevertAssert();
}
}