protected override void InternalProcessRecord() { int priority = 0; bool flag = false; int clientAccessRulesLimit = AppSettings.Current.ClientAccessRulesLimit; ClientAccessRulesPriorityManager clientAccessRulesPriorityManager = new ClientAccessRulesPriorityManager(ClientAccessRulesStorageManager.GetClientAccessRules((IConfigurationSession)base.DataSession)); if (clientAccessRulesPriorityManager.ADClientAccessRules.Count >= clientAccessRulesLimit) { base.WriteError(new InvalidOperationException(RulesTasksStrings.ClientAccessRulesLimitError(clientAccessRulesLimit)), ErrorCategory.InvalidOperation, null); } if (!ClientAccessRulesStorageManager.IsADRuleValid(this.DataObject)) { base.WriteError(new InvalidOperationException(RulesTasksStrings.ClientAccessRulesAuthenticationTypeInvalid), ErrorCategory.InvalidOperation, null); } this.DataObject.InternalPriority = clientAccessRulesPriorityManager.GetInternalPriority(this.Priority, this.DatacenterAdminsOnly, out priority, out flag); this.DataObject.RuleName = this.DataObject.Name; this.DataObject.Priority = priority; if (flag) { ClientAccessRulesStorageManager.SaveRules((IConfigurationSession)base.DataSession, clientAccessRulesPriorityManager.ADClientAccessRules); } base.CreateParentContainerIfNeeded(this.DataObject); base.InternalProcessRecord(); }