/// <summary> /// Initializes a new instance of the <see cref="T:PackageViewModel"/> class. /// </summary> public PackageViewModel( NuGetModel model, IPackage package, PackageViewModelAction packageAction) : this(model, package, false, packageAction) { }
/// <summary> /// Initializes a new instance of the <see cref="T:PackageViewModel"/> class for an installed package /// </summary> public PackageViewModel( NuGetModel model, IPackage package, bool shouldPullRemotePackage, PackageViewModelAction packageAction) { Debug.Assert(package != null, "package parameter should not be null"); this.Model = model; _package = package; _shouldPullRemotePackage = shouldPullRemotePackage; this.PackageAction = packageAction; this.LaunchUrlCommand = new RelayCommand(url => this.OpenUrl(url as Uri)); SetName(); SetSearchtext(); _authors = new Lazy<string>(GetAuthors); SetDependencies(); SetIconSource(); }
/// <summary> /// Initializes a new instance of the <see cref="T:PackageViewModel"/> class for an installed package /// </summary> public PackageViewModel( NuGetModel model, IPackage package, bool shouldPullRemotePackage, PackageViewModelAction packageAction) { Debug.Assert(package != null, "package parameter should not be null"); this.Model = model; _package = package; _shouldPullRemotePackage = shouldPullRemotePackage; this.PackageAction = packageAction; this.LaunchUrlCommand = new RelayCommand(url => this.OpenUrl(url as Uri)); SetName(); SetSearchtext(); _authors = new Lazy <string>(GetAuthors); SetDependencies(); SetIconSource(); }