Exemple #1
0
 protected override void InternalValidate()
 {
     base.InternalValidate();
     try
     {
         ManageTenantOutboundConnectors.ValidateIfAcceptedDomainsCanBeRoutedWithConnectors(base.DataObject, base.DataSession, this, true);
         IEnumerable <TransportRule> source;
         if (Utils.TryGetTransportRules(base.DataSession, new Utils.TransportRuleSelectionDelegate(Utils.RuleHasOutboundConnectorReference), out source, base.DataObject.Name) && source.Any <TransportRule>())
         {
             base.WriteError(new ConnectorIncorrectUsageConnectorStillReferencedException(), ErrorCategory.InvalidOperation, null);
         }
     }
     catch (ParserException exception)
     {
         base.WriteError(exception, ErrorCategory.InvalidData, null);
     }
 }
Exemple #2
0
        protected override void InternalValidate()
        {
            TaskLogger.LogEnter();
            base.InternalValidate();
            if (base.HasErrors)
            {
                return;
            }
            LocalizedException ex = ManageTenantOutboundConnectors.ValidateConnectorNameReferences(this.DataObject, this.CurrentName, base.DataSession);

            if (ex != null)
            {
                base.WriteError(ex, ErrorCategory.InvalidArgument, null);
            }
            ManageTenantOutboundConnectors.ValidateOutboundConnectorDataObject(this.DataObject, this, base.DataSession, this.BypassValidation);
            ManageTenantOutboundConnectors.ValidateIfAcceptedDomainsCanBeRoutedWithConnectors(this.DataObject, base.DataSession, this, false);
            TaskLogger.LogExit();
        }
Exemple #3
0
        protected override void InternalValidate()
        {
            TaskLogger.LogEnter();
            base.InternalValidate();
            if (base.HasErrors)
            {
                return;
            }
            ManageTenantOutboundConnectors.ValidateOutboundConnectorDataObject(this.DataObject, this, base.DataSession, this.BypassValidation);
            IEnumerable <TenantOutboundConnector> enumerable = base.DataSession.FindPaged <TenantOutboundConnector>(null, ((IConfigurationSession)base.DataSession).GetOrgContainerId().GetDescendantId(this.DataObject.ParentPath), false, null, ADGenericPagedReader <TenantOutboundConnector> .DefaultPageSize);

            foreach (TenantOutboundConnector tenantOutboundConnector in enumerable)
            {
                if (StringComparer.OrdinalIgnoreCase.Equals(this.DataObject.Name, tenantOutboundConnector.Name))
                {
                    base.WriteError(new ErrorOutboundConnectorAlreadyExistsException(tenantOutboundConnector.Name), ErrorCategory.InvalidOperation, null);
                    break;
                }
            }
            ManageTenantOutboundConnectors.ValidateIfAcceptedDomainsCanBeRoutedWithConnectors(this.DataObject, base.DataSession, this, false);
            TaskLogger.LogExit();
        }