Esempio n. 1
0
 public override TargetConnection CreateTargetConnection(TargetServerConfig targetServerConfig, SyncTreeType type, TestShutdownAndLeaseDelegate testShutdownAndLease, EdgeSyncLogSession logSession)
 {
     if (type == SyncTreeType.Configuration)
     {
         return(new EhfConfigTargetConnection(EdgeSyncSvc.EdgeSync.Topology.LocalServer.VersionNumber, (EhfTargetServerConfig)targetServerConfig, this.ConfigurationSyncInterval, logSession));
     }
     if (type == SyncTreeType.Recipients)
     {
         return(new EhfRecipientTargetConnection(EdgeSyncSvc.EdgeSync.Topology.LocalServer.VersionNumber, (EhfTargetServerConfig)targetServerConfig, this, logSession));
     }
     throw new NotSupportedException("Only config and recipient synchronization is supported by EHF sync provider");
 }
        public static TargetConnection Create(Server localHub, TargetServerConfig targetServerConfig, NetworkCredential credential, SyncTreeType type, EdgeSyncLogSession logSession)
        {
            TargetConnection result;

            try
            {
                result = new LdapTargetConnection(localHub.VersionNumber, targetServerConfig, credential, type, logSession);
            }
            catch (ExDirectoryException ex)
            {
                if (ex.InnerException is LdapException)
                {
                    LdapException ex2 = ex.InnerException as LdapException;
                    if (ex2.ErrorCode == 49)
                    {
                        string userName = credential.UserName;
                        string host     = targetServerConfig.Host;
                    }
                }
                throw;
            }
            return(result);
        }
 public override TargetConnection CreateTargetConnection(TargetServerConfig targetServerConfig, SyncTreeType type, TestShutdownAndLeaseDelegate testShutdownAndLease, EdgeSyncLogSession logSession)
 {
     return(new MserveTargetConnection(EdgeSyncSvc.EdgeSync.Topology.LocalServer.VersionNumber, targetServerConfig as MserveTargetServerConfig, this.RecipientSyncInterval, testShutdownAndLease, logSession));
 }