/// <summary> /// Updates the services. /// </summary> private void UpdateAssociationData() { var listToRemo = new List <IModelBase>(); // associate this.pluginManager.AssociateWithNewProject( AuthtenticationHelper.AuthToken, this.AssociatedProject, this.OpenSolutionPath, this.SourceControl); foreach (IModelBase model in modelPool) { try { model.AssociateWithNewProject( AuthtenticationHelper.AuthToken, this.AssociatedProject, this.OpenSolutionPath, this.SourceControl, this.pluginManager.GetIssueTrackerPlugin()); } catch (Exception ex) { Debug.WriteLine(ex.Message); listToRemo.Add(model); } } foreach (var item in listToRemo) { modelPool.Remove(item); } }
/// <summary>The update associate command.</summary> /// <param name="sender">The sender.</param> /// <param name="e">The e.</param> private void LocalAssociationCompleted(object sender, EventArgs e) { if (!this.model.IsConnected) { return; } var listToRemo = new List <IModelBase>(); this.keyTranslator.SetLookupType(KeyLookupType.Invalid); if (string.IsNullOrEmpty(this.OpenSolutionPath)) { this.keyTranslator.SetProjectKeyAndBaseDir(this.AssociatedProject.Key, this.OpenSolutionPath, this.AssociatedProject.BranchName, ""); } else { this.keyTranslator.SetProjectKeyAndBaseDir(this.AssociatedProject.Key, this.OpenSolutionPath, this.AssociatedProject.BranchName, Path.Combine(this.OpenSolutionPath, this.OpenSolutionName)); } try { this.Profile = this.localAnalyserModule.GetProfile(this.AssociatedProject); } catch (Exception ex) { UserExceptionMessageBox.ShowException("Failed to retrieve Profile : Check Log and report : " + ex.Message, ex); return; } // sync data in plugins this.pluginManager.AssociateWithNewProject( this.AssociatedProject, this.OpenSolutionPath, this.sourcecontrol, this.Profile, this.vsVersion); foreach (IModelBase model in modelPool) { try { model.AssociateWithNewProject( this.AssociatedProject, this.OpenSolutionPath, this.sourcecontrol, this.Profile, this.vsVersion); } catch (Exception ex) { Debug.WriteLine(ex.Message); listToRemo.Add(model); } } foreach (var item in listToRemo) { modelPool.Remove(item); } }
/// <summary> /// Updates the services. /// </summary> private void UpdateAssociationData() { var listToRemo = new List <IModelBase>(); // associate this.pluginManager.AssociateWithNewProject( AuthtenticationHelper.AuthToken, this.AssociatedProject, this.OpenSolutionPath, this.SourceControl); this.keyTranslator.SetLookupType(KeyLookUpType.Invalid); this.keyTranslator.SetProjectKeyAndBaseDir(this.AssociatedProject.Key, this.OpenSolutionPath, this.currentBranchName); foreach (IModelBase model in modelPool) { try { model.AssociateWithNewProject( AuthtenticationHelper.AuthToken, this.AssociatedProject, this.OpenSolutionPath, this.SourceControl, this.pluginManager.GetIssueTrackerPlugin()); } catch (Exception ex) { Debug.WriteLine(ex.Message); listToRemo.Add(model); } } foreach (var item in listToRemo) { modelPool.Remove(item); } }