public static void FetchRelayDomains(DataRow inputRow, DataTable dataTable, DataObjectStore store, PowerShellResults[] results) { PowerShellResults <PSObject> powerShellResults = (PowerShellResults <PSObject>)results[0]; if (powerShellResults.Succeeded) { dataTable.Rows[0]["_AcceptedDomains"] = MigrationBatchService.FilterAcceptedDomains(powerShellResults.Output, (Microsoft.Exchange.Data.Directory.SystemConfiguration.AcceptedDomain domain) => domain.DomainType != AcceptedDomainType.Authoritative); } }
public static void FetchAcceptedDomains(DataRow inputRow, DataTable dataTable, DataObjectStore store, PowerShellResults[] results) { PowerShellResults <PSObject> powerShellResults = (PowerShellResults <PSObject>)results[0]; if (!powerShellResults.Succeeded) { return; } bool flag = false; if (!DBNull.Value.Equals(dataTable.Rows[0]["IsDedicated"])) { flag = (bool)dataTable.Rows[0]["IsDedicated"]; } if (flag) { dataTable.Rows[0]["_AcceptedDomains"] = MigrationBatchService.FilterAcceptedDomains(powerShellResults.Output, (Microsoft.Exchange.Data.Directory.SystemConfiguration.AcceptedDomain domain) => domain.DomainType == AcceptedDomainType.Authoritative); return; } bool flag2 = false; if (!DBNull.Value.Equals(dataTable.Rows[0]["IsMultiTenant"])) { flag2 = (bool)dataTable.Rows[0]["IsMultiTenant"]; } if (flag2) { string[] array = MigrationBatchService.FilterAcceptedDomains(powerShellResults.Output, (Microsoft.Exchange.Data.Directory.SystemConfiguration.AcceptedDomain domain) => domain.IsCoexistenceDomain); if (array.Length > 0) { dataTable.Rows[0]["TargetDeliveryDomain"] = array[0]; dataTable.Rows[0]["_AcceptedDomains"] = array; } return; } dataTable.Rows[0]["_AcceptedDomains"] = MigrationBatchService.FilterAcceptedDomains(powerShellResults.Output, (Microsoft.Exchange.Data.Directory.SystemConfiguration.AcceptedDomain domain) => true); }