private void InitWithRestrictedPermissions(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord) { // Run configuration section handlers as if user code was on the stack bool revertPermitOnly = false; try { PermissionSet permissionSet = configRecord.GetRestrictedPermissions(); if (permissionSet != null) { permissionSet.PermitOnly(); revertPermitOnly = true; } Init(configRecord, factoryRecord); } finally { if (revertPermitOnly) { CodeAccessPermission.RevertPermitOnly(); } } }
private void InitWithRestrictedPermissions(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord) { bool flag = false; try { PermissionSet restrictedPermissions = configRecord.GetRestrictedPermissions(); if (restrictedPermissions != null) { restrictedPermissions.PermitOnly(); flag = true; } this.Init(configRecord, factoryRecord); } finally { if (flag) { CodeAccessPermission.RevertPermitOnly(); } } }
private object CreateSectionWithRestrictedPermissions( RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord, SectionRecord sectionRecord, object parentConfig, ConfigXmlReader reader) { // run configuration section handlers as if user code was on the stack bool revertPermitOnly = false; try { PermissionSet permissionSet = configRecord.GetRestrictedPermissions(); if (permissionSet != null) { permissionSet.PermitOnly(); revertPermitOnly = true; } return(CreateSectionImpl(configRecord, factoryRecord, sectionRecord, parentConfig, reader)); } finally { if (revertPermitOnly) { CodeAccessPermission.RevertPermitOnly(); } } }
private object CreateSectionWithRestrictedPermissions(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord, SectionRecord sectionRecord, object parentConfig, ConfigXmlReader reader) { object obj2; bool flag = false; try { PermissionSet restrictedPermissions = configRecord.GetRestrictedPermissions(); if (restrictedPermissions != null) { restrictedPermissions.PermitOnly(); flag = true; } obj2 = this.CreateSectionImpl(configRecord, factoryRecord, sectionRecord, parentConfig, reader); } finally { if (flag) { CodeAccessPermission.RevertPermitOnly(); } } return(obj2); }
private object CreateSectionWithRestrictedPermissions( RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord, SectionRecord sectionRecord, object parentConfig, ConfigXmlReader reader) { // run configuration section handlers as if user code was on the stack bool revertPermitOnly = false; try { PermissionSet permissionSet = configRecord.GetRestrictedPermissions(); if (permissionSet != null) { permissionSet.PermitOnly(); revertPermitOnly = true; } return CreateSectionImpl(configRecord, factoryRecord, sectionRecord, parentConfig, reader); } finally { if (revertPermitOnly) { CodeAccessPermission.RevertPermitOnly(); } } }
private void InitWithRestrictedPermissions(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord) { // Run configuration section handlers as if user code was on the stack bool revertPermitOnly = false; try { PermissionSet permissionSet = configRecord.GetRestrictedPermissions(); if (permissionSet != null) { permissionSet.PermitOnly(); revertPermitOnly = true; } Init(configRecord, factoryRecord); } finally { if (revertPermitOnly) { CodeAccessPermission.RevertPermitOnly(); } } }
private void InitWithRestrictedPermissions(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord) { bool flag = false; try { PermissionSet restrictedPermissions = configRecord.GetRestrictedPermissions(); if (restrictedPermissions != null) { restrictedPermissions.PermitOnly(); flag = true; } this.Init(configRecord, factoryRecord); } finally { if (flag) { CodeAccessPermission.RevertPermitOnly(); } } }
private object CreateSectionWithRestrictedPermissions(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord, SectionRecord sectionRecord, object parentConfig, ConfigXmlReader reader) { object obj2; bool flag = false; try { PermissionSet restrictedPermissions = configRecord.GetRestrictedPermissions(); if (restrictedPermissions != null) { restrictedPermissions.PermitOnly(); flag = true; } obj2 = this.CreateSectionImpl(configRecord, factoryRecord, sectionRecord, parentConfig, reader); } finally { if (flag) { CodeAccessPermission.RevertPermitOnly(); } } return obj2; }