public string GetNativeConnectionString(string instanceName, string username = "******", string password = "******") { Virtuoso v = _instances[instanceName]; int? port = PortUtils.GetPort(v.Configuration.Parameters.ServerPort); return("Server=localhost:" + port + ";uid=" + username + ";pwd=" + password + ";Charset=utf-8"); }
public string GetConnectionString(string instanceName, string username = "******", string password = "******") { Virtuoso v = _instances[instanceName]; int?port = PortUtils.GetPort(v.Configuration.Parameters.ServerPort); return(string.Format("provider=virtuoso;host=localhost;port={0};uid={1};pw={2}", port, username, password)); }
/// <summary> /// Starts the /// </summary> public bool Start(bool waitOnStartup = true, TimeSpan?timeout = null) { bool res = false; if (_starter == null) { int?port; if (AutoPort) { do { port = 35000 + _rnd.Next(10, 60); } while (!PortUtils.TestPort(port.Value)); Configuration.Parameters.ServerPort = string.Format("localhost:{0}", port.Value); Configuration.SaveConfigFile(); } else { port = PortUtils.GetPort(_config.Parameters.ServerPort); if (!port.HasValue) { throw new ArgumentException("No valid port given."); } } _config.Locked = true; string param = ""; if (Environment.OSVersion.Platform == PlatformID.Unix || Environment.OSVersion.Platform == PlatformID.MacOSX) { _starter = new UnixVirtuosoStarter(port.Value, _binary.Directory, _configFile.Directory); param = string.Format("-f -c \"{0}\"", _configFile.FullName); } else { _starter = new Win32VirtuosoStarter(port.Value, _binary.Directory, _configFile.Directory); param = string.Format("-f -c \"{0}\"", _configFile.FullName); } _starter.Executable = _binary.FullName; _starter.Parameter = param; res = _starter.Start(waitOnStartup, timeout); } return(res); }
public string GetAdoNetConnectionString(string username = "******", string password = "******") { int?port = PortUtils.GetPort(Configuration.Parameters.ServerPort); return("Server=localhost:" + port + ";uid=" + username + ";pwd=" + password + ";Charset=utf-8"); }