Esempio n. 1
0
 /// <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)
 {
 }
Esempio n. 2
0
 /// <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)
 {
 }
Esempio n. 3
0
        /// <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();
        }
Esempio n. 4
0
        /// <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();
        }