public override AppDomain CreateAppDomainWithPolicy(string appDomainName, Evidence evidence, AppDomainSetup setupInfo, SandboxCasPolicySettings casSettings) { return(AppDomain.CurrentDomain); }
public override AssemblyLoadContext CreateAssemblyLoadContextWithPolicy(string appDomainName, Evidence evidence, AppDomainSetup setupInfo, SandboxCasPolicySettings casSettings) { AssemblyLoadContext assemblyLoadContext = new AssemblyLoadContext(appDomainName, true); return(assemblyLoadContext); }
internal ReportRuntimeSetupHandler() { m_executeInSandbox = TriState.Unknown; m_isAppDomainCasPolicyEnabled = TriState.Unknown; m_sandboxCasSettings = new SandboxCasPolicySettings(); }
public override AppDomain CreateAppDomainWithPolicy(string appDomainName, Evidence evidence, SandboxCasPolicySettings casSettings) { PermissionSet permissionSet = casSettings.BasePermissions; if (permissionSet == null) { permissionSet = new PermissionSet(PermissionState.None); permissionSet.AddPermission(new SecurityPermission(SecurityPermissionFlag.Execution)); } StrongName[] baseFullTrustAssemblies = ControlPolicyManager.GetBaseFullTrustAssemblies(); int num = baseFullTrustAssemblies.Length; if (casSettings.FullTrustAssemblies != null) { num += casSettings.FullTrustAssemblies.Count; } StrongName[] array = new StrongName[num]; Array.Copy(baseFullTrustAssemblies, array, baseFullTrustAssemblies.Length); if (casSettings.FullTrustAssemblies != null) { casSettings.FullTrustAssemblies.CopyTo(array, baseFullTrustAssemblies.Length); } return(AppDomain.CreateDomain(appDomainName)); }