private void ValidateUnnecessaryRemoteDomainsAreRemoved(ITaskContext taskContext)
        {
            taskContext.Logger.LogInformation(HybridStrings.HybridInfoValidatingUnnecessaryRemoteDomainsAreRemoved);
            DomainContentConfig domainContentConfig = (from x in taskContext.OnPremisesSession.GetRemoteDomain()
                                                       where (x.Name ?? string.Empty).StartsWith("Hybrid Domain -")
                                                       select x).FirstOrDefault <DomainContentConfig>();

            if (domainContentConfig != null)
            {
                throw new LocalizedException(HybridStrings.ErrorHybridOnPremRemoteDomainNotRemoved(domainContentConfig.Name));
            }
            DomainContentConfig domainContentConfig2 = (from x in taskContext.TenantSession.GetRemoteDomain()
                                                        where (x.Name ?? string.Empty).StartsWith("Hybrid Domain -")
                                                        select x).FirstOrDefault <DomainContentConfig>();

            if (domainContentConfig2 != null)
            {
                throw new LocalizedException(HybridStrings.ErrorHybridTenantRemoteDomainNotRemoved(domainContentConfig2.Name));
            }
        }