internal RegexTypeCompiler(AssemblyName an, CustomAttributeBuilder[] attribs, String resourceFile, Evidence evidence) {
new ReflectionPermission(PermissionState.Unrestricted).Assert();
try {
Debug.Assert(an != null, "AssemblyName should not be null");
_assembly = AppDomain.CurrentDomain.DefineDynamicAssembly(an, AssemblyBuilderAccess.RunAndSave, evidence);
_module = _assembly.DefineDynamicModule(an.Name + ".dll");
if (attribs != null) {
for (int i=0; i<attribs.Length; i++) {
_assembly.SetCustomAttribute(attribs[i]);
}
}
if (resourceFile != null) {
// unmanaged resources are not supported
throw new ArgumentOutOfRangeException("resourceFile");
}
}
finally {
CodeAccessPermission.RevertAssert();
}
}