internal virtual object GetProtectionDomain() { #if STATIC_COMPILER || FIRST_PASS || STUB_GENERATOR return(null); #else if (protectionDomain == null) { java.net.URL codebase; try { codebase = new java.net.URL(assemblyLoader.Assembly.CodeBase); } catch (NotSupportedException) { // dynamic assemblies don't have a codebase codebase = null; } catch (java.net.MalformedURLException) { codebase = null; } java.security.Permissions permissions = new java.security.Permissions(); permissions.add(new java.security.AllPermission()); object pd = new java.security.ProtectionDomain(new java.security.CodeSource(codebase, (java.security.cert.Certificate[])null), permissions, (java.lang.ClassLoader)GetJavaClassLoader(), null); lock (this) { if (protectionDomain == null) { protectionDomain = pd; } } } return(protectionDomain); #endif }
internal virtual object GetProtectionDomain() { #if STATIC_COMPILER || FIRST_PASS || STUB_GENERATOR return null; #else if (protectionDomain == null) { java.net.URL codebase; try { codebase = new java.net.URL(assemblyLoader.Assembly.CodeBase); } catch (NotSupportedException) { // dynamic assemblies don't have a codebase codebase = null; } catch (java.net.MalformedURLException) { codebase = null; } java.security.Permissions permissions = new java.security.Permissions(); permissions.add(new java.security.AllPermission()); object pd = new java.security.ProtectionDomain(new java.security.CodeSource(codebase, (java.security.cert.Certificate[])null), permissions, (java.lang.ClassLoader)GetJavaClassLoader(), null); lock (this) { if (protectionDomain == null) { protectionDomain = pd; } } } return protectionDomain; #endif }