/// <summary> /// Finds models' compatibility levels (and preps databases on workspace servers for comparison). This overload to be used when client is not Visual Studio - e.g. command line. /// </summary> /// <param name="compatibilityLevelSource"></param> /// <param name="compatibilityLevelTarget"></param> public void InitializeCompatibilityLevels() { if (_credsProvided) { ConnectionInfoSource.CredsProvided = true; ConnectionInfoSource.Username = _sourceUsername; ConnectionInfoSource.Password = _sourcePassword; ConnectionInfoTarget.CredsProvided = true; ConnectionInfoTarget.Username = _targetUsername; ConnectionInfoTarget.Password = _targetPassword; if (_workspaceServerProvided) { ConnectionInfoSource.WorkspaceServerProvided = true; ConnectionInfoSource.WorkspaceServer = _workspaceServer; ConnectionInfoTarget.WorkspaceServerProvided = true; ConnectionInfoTarget.WorkspaceServer = _workspaceServer; } } ConnectionInfoSource.InitializeCompatibilityLevel(); ConnectionInfoTarget.InitializeCompatibilityLevel(); PopulateDatabaseProperties(); }
/// <summary> /// Finds models' compatibility levels (and preps databases on workspace servers for comparison). This overload to be used when client is not Visual Studio - e.g. command line. /// </summary> /// <param name="compatibilityLevelSource"></param> /// <param name="compatibilityLevelTarget"></param> public void InitializeCompatibilityLevels() { ConnectionInfoSource.InitializeCompatibilityLevel(); ConnectionInfoTarget.InitializeCompatibilityLevel(); PopulateDatabaseProperties(); }
/// <summary> /// Finds models' compatibility levels (and preps databases on workspace servers for comparison). This overload to be used when client is not Visual Studio - e.g. command line. /// </summary> public void InitializeCompatibilityLevels(string sourceUsername, string sourcePassword, string targetUsername, string targetPassword, string workspaceServer) { ConnectionInfoSource.CredsProvided = true; ConnectionInfoSource.Username = sourceUsername; ConnectionInfoSource.Password = sourcePassword; ConnectionInfoSource.InitializeCompatibilityLevel(workspaceServer: workspaceServer); ConnectionInfoTarget.CredsProvided = true; ConnectionInfoTarget.Username = targetUsername; ConnectionInfoTarget.Password = targetPassword; ConnectionInfoTarget.InitializeCompatibilityLevel(workspaceServer: workspaceServer); PopulateDatabaseProperties(); }
/// <summary> /// Finds model compatibility levels (and preps databases on workspace servers for comparison). This overload to be used when running in Visual Studio. Allows user to cancel if doesn't want to close .bim file(s). /// </summary> /// <param name="compatibilityLevelSource"></param> /// <param name="compatibilityLevelTarget"></param> /// <param name="userCancelled"></param> public void InitializeCompatibilityLevels(out bool userCancelled) { //Check if any open bim files that need to be closed bool closedSourceBimFile; bool closedTargetBimFile; CloseProjectBimFiles(out closedSourceBimFile, out closedTargetBimFile, out userCancelled); if (userCancelled) { return; } //Passing closedSourceBimFile so doesn't run bim file script if user just closed it (more efficient) ConnectionInfoSource.InitializeCompatibilityLevel(closedSourceBimFile); ConnectionInfoTarget.InitializeCompatibilityLevel(closedTargetBimFile); PopulateDatabaseProperties(); }