/// <summary> /// Initializes a new instance of the <see cref="SonarQubeViewModel" /> class. Plugins are initialized in InitModelFromPackageInitialization below /// </summary> /// <param name="vsverionIn">The vs version.</param> public SonarQubeViewModel(string vsverionIn) { this.vsversion = vsverionIn; this.ToolsProvidedByPlugins = new ObservableCollection <MenuItem>(); this.AvailableBranches = new List <Resource>(); this.notificationManager = new NotifyCationManager(this, vsverionIn); this.configurationHelper = new ConfigurationHelper(vsverionIn); this.sonarKeyTranslator = new SQKeyTranslator(); this.sonarRestConnector = new SonarRestService(new JsonSonarConnector()); this.VSonarQubeOptionsViewData = new VSonarQubeOptionsViewModel(this.sonarRestConnector, this.configurationHelper, this.notificationManager); this.VSonarQubeOptionsViewData.ResetUserData(); this.CanConnectEnabled = true; this.ConnectionTooltip = "Not Connected"; this.BackGroundColor = Colors.White; this.ForeGroundColor = Colors.Black; this.IsExtensionBusy = false; this.InitCommands(); }
/// <summary> /// Initializes a new instance of the <see cref="SonarQubeViewModel" /> class. /// </summary> /// <param name="vsverionIn">The vsverion in.</param> /// <param name="helper">The helper.</param> public SonarQubeViewModel(string vsverionIn, IConfigurationHelper helper) { this.vsversion = vsverionIn; this.ToolsProvidedByPlugins = new ObservableCollection<MenuItem>(); this.AvailableBranches = new List<Resource>(); this.configurationHelper = helper; this.notificationManager = new NotifyCationManager(this, vsverionIn); this.sonarKeyTranslator = new SQKeyTranslator(); this.sonarRestConnector = new SonarRestService(new JsonSonarConnector()); this.VSonarQubeOptionsViewData = new VSonarQubeOptionsViewModel(this.sonarRestConnector, this.configurationHelper, this.notificationManager); this.VSonarQubeOptionsViewData.ResetUserData(); this.CanConnectEnabled = true; this.ConnectionTooltip = "Not Connected"; this.BackGroundColor = Colors.White; this.ForeGroundColor = Colors.Black; this.ErrorIsFound = true; this.IsExtensionBusy = false; this.InitCommands(); }