コード例 #1
0
        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);
        }
コード例 #2
0
 public bool Connect(ConnectionParams cp)
 {
     return(Connect(cp.Server, cp.Database, cp.Login, cp.Password, String.IsNullOrWhiteSpace(cp.Password)));
 }