Esempio n. 1
0
        public void BeforeScenario()
        {
            lock (_obj)
            {
                if (_ldapServer == null)
                {
                    var path = Path.Combine(Directory.GetCurrentDirectory(), "LDIF.txt");
                    var serviceCollection = new ServiceCollection();
                    serviceCollection.AddLdapServer().ImportLDIF(path);
                    _serviceProvider = serviceCollection.BuildServiceProvider();
                    _ldapServer      = _serviceProvider.GetService <ILdapServer>();
                    _ldapServer.Start();
                }

                var client = new TcpClient("127.0.0.1", 389);
                _stream = client.GetStream();
                _manualResetEvent.WaitOne();
            }
        }
Esempio n. 2
0
 public AccountModel(DBINTEGRASI_MASTER_BAYUPPKU2Context db, ILdapServer ldap, IConfiguration config)
 {
     _db     = db;
     _ldap   = ldap;
     _config = config;
 }