/// <summary> /// The update data context. /// </summary> /// <param name="dataModelIn"> /// The data model in. /// </param> public void UpdateDataContext(SonarQubeViewModel dataModelIn) { // bind data with view model this.dataModel = dataModelIn; this.DataContext = null; this.DataContext = dataModelIn; }
/// <summary> /// Initializes a new instance of the <see cref="SonarQubeUserControlVs"/> class. /// </summary> /// <param name="model"> /// The model. /// </param> public SonarQubeUserControlVs(SonarQubeViewModel model) { this.DataContext = model; try { this.InitializeComponent(); } catch (Exception ex) { Debug.WriteLine(ex.Message); } }
/// <summary> /// Startups the model with vs version. /// </summary> /// <param name="version">The version.</param> /// <returns>returns model</returns> public static SonarQubeViewModel StartupModelWithVsVersion(string version) { if (model == null) { model = new VSSonarExtensionUi.ViewModel.SonarQubeViewModel(version); } return model; }
/// <summary> /// Startups the model with vs version. /// </summary> /// <param name="version">The version.</param> /// <returns>returns model</returns> public static SonarQubeViewModel StartupModelWithVsVersion(string version, IServiceProvider provider) { if (model == null) { model = new SonarQubeViewModel(version, new VsConfigurationHelper(version)); } return model; }