public PackageUpdateViewModel(IPackage current, IPackage latest, IPackageOptions packageOptions, bool isSelf)
 {
     Ensure.NotNull(current, "current");
     Ensure.NotNull(latest, "latest");
     Current = new PackageViewModel(current, packageOptions);
     Target  = latest;
     IsSelf  = isSelf;
 }
Exemplo n.º 2
0
 public PackageViewModel(IPackage model, IPackageOptions packageOptions)
 {
     Ensure.NotNull(model, "model");
     Ensure.NotNull(packageOptions, "packageOptions");
     this.model          = model;
     this.packageOptions = packageOptions;
     LoadVersions        = new AsyncDelegateCommand(OnLoadVersionsAsync, CanLoadVersions);
 }
Exemplo n.º 3
0
        public PackageOptions()
        {
            Mock <IPackageOptions> mock = new Mock <IPackageOptions>();

            mock
            .Setup(p => p.IsPrereleaseIncluded)
            .Returns(() => false);

            Object = mock.Object;
        }