/// <summary> /// Подключение к Active Directory /// </summary> public static AdConnection Instance(ILogger logger, IConfig config) { _logger = logger; _config = config; _instance = _instance ?? new AdConnection(); return(_instance); }
public void Connect() { _adConnection = AdConnection.Instance(_logger, _config); if (_adConnection != null) { if (_adConnection.TryConnect(out _adContext)) { _ad = new AdReader(_adContext); } } }