internal SBRTEConnector(ConnectionParams connectionParams) { var lp = new LoginPoint(); var connectionString = ""; if (string.IsNullOrWhiteSpace(connectionParams.Login)) { connectionString = $"ServerName={connectionParams.Server};DBName={connectionParams.Database};IsOSAuth=true;AuthType=OS"; } else { connectionString = $"ServerName={connectionParams.Server};DBName={connectionParams.Database};UserName={connectionParams.Login};Password={connectionParams.Password}"; } connectionString = connectionString + ";KeepLoginPoint=True"; Application = lp.GetApplication(connectionString); }
public bool Connect(ConnectionParams cp) { return(Connect(cp.Server, cp.Database, cp.Login, cp.Password, String.IsNullOrWhiteSpace(cp.Password))); }