/// <summary> /// Populates the nuget actions. /// </summary> /// <param name="viewModel">The view model.</param> internal void PopulateNugetActions(NugetPackagesBaseViewModel viewModel) { if (viewModel != null) { NugetActions nugetActions = viewModel.GetNugetActions(); this.commands += nugetActions.NugetCommands; this.postNugetCommands.AddRange(nugetActions.PostNugetCommands); this.postNugetFileOperations.AddRange(nugetActions.PostNugetFileOperations); } }
/// <summary> /// Gets the nuget actions. /// </summary> /// <returns>A NugetActions.</returns> public NugetActions GetNugetActions() { TraceService.WriteLine("NugetPackagesBaseViewModel::GetNugetActions"); var nugetActions = new NugetActions { NugetCommands = this.GetNugetCommands(), PostNugetCommands = this.pluginsService.GetPostNugetCommands(this.GetRequiredNugetPackages()), PostNugetFileOperations = this.pluginsService.GetPostNugetFileOperations(this.GetRequiredNugetPackages()) }; return(nugetActions); }
/// <summary> /// Populates the nuget actions. /// </summary> /// <param name="viewModel">The view model.</param> internal void PopulateNugetActions(NugetPackagesBaseViewModel viewModel) { string viewModelName = string.Empty; string step = string.Empty; try { if (viewModel != null) { viewModelName = viewModel.DisplayName; TraceService.WriteLine("ProjectsController::PopulateNugetActions viewModel=" + viewModelName); NugetActions nugetActions = viewModel.GetNugetActions(); step = "NugetCommands"; if (nugetActions.NugetCommands != string.Empty) { this.commands += nugetActions.NugetCommands; } step = "PostNugetCommands"; if (nugetActions.PostNugetCommands != null) { this.postNugetCommands.AddRange(nugetActions.PostNugetCommands); } step = "PostNugetFileOperations"; if (nugetActions.PostNugetFileOperations != null) { this.postNugetFileOperations.AddRange(nugetActions.PostNugetFileOperations); } } } catch (Exception exception) { TraceService.WriteError("Error Adding Nuget Actions viewModel=" + viewModelName + "step=" + step + " exception=" + exception.Message); } }
/// <summary> /// Gets the nuget actions. /// </summary> /// <returns>A NugetActions.</returns> public NugetActions GetNugetActions() { TraceService.WriteLine("NugetPackagesBaseViewModel::GetNugetActions"); var nugetActions = new NugetActions { NugetCommands = this.GetNugetCommands(), PostNugetCommands = this.pluginsService.GetPostNugetCommands(this.GetRequiredNugetPackages()), PostNugetFileOperations = this.pluginsService.GetPostNugetFileOperations(this.GetRequiredNugetPackages()) }; return nugetActions; }