public static void ValidateSourceServers(ForeignConnector connector, IConfigurationSession session, Task task) { ADObjectId sourceRoutingGroup = connector.SourceRoutingGroup; bool flag; bool flag2; LocalizedException ex = ManageSendConnectors.ValidateTransportServers(session, connector, ref sourceRoutingGroup, false, true, task, out flag, out flag2); if (ex != null) { throw ex; } if (flag2) { throw new MultiSiteSourceServersException(); } }
private static LocalizedException ValidateSourceServers(SmtpSendConnectorConfig connector, IConfigurationSession session, Server localServer, Task task, out bool edgeConnector, out bool multiSiteConnector) { edgeConnector = false; multiSiteConnector = false; MultiValuedProperty <ADObjectId> sourceTransportServers = connector.SourceTransportServers; if (localServer == null || !localServer.IsEdgeServer) { ADObjectId sourceRoutingGroup = connector.SourceRoutingGroup; return(ManageSendConnectors.ValidateTransportServers(session, connector, ref sourceRoutingGroup, true, true, task, out edgeConnector, out multiSiteConnector)); } if (sourceTransportServers != null && sourceTransportServers.Count > 0) { return(new SendConnectorSourceServersSetForEdgeException()); } edgeConnector = true; return(null); }
protected override void InternalValidate() { base.InternalValidate(); ADObjectId sourceRoutingGroup = this.DataObject.SourceRoutingGroup; bool flag; bool flag2; LocalizedException ex = ManageSendConnectors.ValidateTransportServers((IConfigurationSession)base.DataSession, this.DataObject, ref sourceRoutingGroup, true, true, this, out flag, out flag2); if (ex != null) { base.WriteError(ex, ErrorCategory.InvalidOperation, this.DataObject); return; } if (flag2) { this.WriteWarning(Strings.WarningMultiSiteSourceServers); } }
protected override void InternalValidate() { base.InternalValidate(); if (TopologyProvider.IsAdamTopology()) { base.WriteError(new LocalizedException(Strings.CannotRunDeliveryAgentConnectorTaskOnEdge), ErrorCategory.InvalidOperation, null); } ADObjectId sourceRoutingGroup = this.DataObject.SourceRoutingGroup; bool flag; bool flag2; LocalizedException ex = ManageSendConnectors.ValidateTransportServers((IConfigurationSession)base.DataSession, this.DataObject, ref sourceRoutingGroup, false, true, this, out flag, out flag2); if (ex != null) { base.WriteError(ex, ErrorCategory.InvalidOperation, this.DataObject); return; } if (flag2) { this.WriteWarning(Strings.WarningMultiSiteSourceServers); } }
public static LocalizedException ValidateTransportServers(IConfigurationSession session, SendConnector sendConnector, ref ADObjectId routingGroupId, Task task, bool sourceValidation, out bool multiSiteConnector) { bool flag; return ManageSendConnectors.ValidateTransportServers(session, sendConnector, ref routingGroupId, false, sourceValidation, task, out flag, out multiSiteConnector); }