Exemplo 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)
 {
 }
Exemplo 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)
 {
 }
Exemplo 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();
        }
Exemplo 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();
        }