internal async Task CanUninstall_NuGetPackage()
        {
            using Bootstrapper bootstrapper = BootstrapperFactory.GetBootstrapper();
            InstallRequest installRequest = new InstallRequest("Microsoft.DotNet.Common.ProjectTemplates.5.0", "5.0.0");

            IReadOnlyList <InstallResult> result = await bootstrapper.InstallTemplatePackagesAsync(new[] { installRequest }, InstallationScope.Global, CancellationToken.None).ConfigureAwait(false);

            Assert.Equal(1, result.Count);
            Assert.True(result[0].Success);
            IManagedTemplatePackage source = result[0].TemplatePackage;

            IReadOnlyList <IManagedTemplatePackage> managedTemplatesPackages = await bootstrapper.GetManagedTemplatePackages(CancellationToken.None).ConfigureAwait(false);

            Assert.Equal(1, managedTemplatesPackages.Count);
            managedTemplatesPackages[0].Should().BeEquivalentTo(source);

            IReadOnlyList <UninstallResult> uninstallResults = await bootstrapper.UninstallTemplatePackagesAsync(new[] { source }, CancellationToken.None).ConfigureAwait(false);

            Assert.Equal(1, uninstallResults.Count);
            Assert.True(uninstallResults[0].Success);
            Assert.Equal(InstallerErrorCode.Success, uninstallResults[0].Error);
            uninstallResults[0].ErrorMessage.Should().BeNullOrEmpty();
            Assert.Equal(source, uninstallResults[0].TemplatePackage);

            IReadOnlyList <ITemplatePackage> templatePackages = await bootstrapper.GetTemplatePackages(CancellationToken.None).ConfigureAwait(false);

            Assert.Equal(0, templatePackages.Count);
        }
        internal async Task CanInstall_Folder()
        {
            using Bootstrapper bootstrapper = BootstrapperFactory.GetBootstrapper();
            string templateLocation = TestUtils.GetTestTemplateLocation("TemplateWithSourceName");

            InstallRequest installRequest = new InstallRequest(Path.GetFullPath(templateLocation));

            IReadOnlyList <InstallResult> result = await bootstrapper.InstallTemplatePackagesAsync(new[] { installRequest }, InstallationScope.Global, CancellationToken.None).ConfigureAwait(false);

            Assert.Equal(1, result.Count);
            Assert.True(result[0].Success);
            Assert.Equal(InstallerErrorCode.Success, result[0].Error);
            result[0].ErrorMessage.Should().BeNullOrEmpty();
            Assert.Equal(installRequest, result[0].InstallRequest);

            IManagedTemplatePackage source = result[0].TemplatePackage;

            Assert.Equal(Path.GetFullPath(templateLocation), source.Identifier);
            Assert.Equal("Global Settings", source.Provider.Factory.DisplayName);
            Assert.Equal("Folder", source.Installer.Factory.Name);
            source.Version.Should().BeNullOrEmpty();

            IReadOnlyList <IManagedTemplatePackage> managedTemplatesPackages = await bootstrapper.GetManagedTemplatePackages(CancellationToken.None).ConfigureAwait(false);

            Assert.Equal(1, managedTemplatesPackages.Count);
            managedTemplatesPackages[0].Should().BeEquivalentTo(source);

            IReadOnlyList <ITemplatePackage> templatePackages = await bootstrapper.GetTemplatePackages(CancellationToken.None).ConfigureAwait(false);

            Assert.Equal(1, templatePackages.Count);
            Assert.IsAssignableFrom <IManagedTemplatePackage>(templatePackages[0]);
            templatePackages[0].Should().BeEquivalentTo((ITemplatePackage)source);
        }
        internal async Task CanInstall_LocalNuGetPackage()
        {
            using Bootstrapper bootstrapper = BootstrapperFactory.GetBootstrapper();
            string packageLocation = await _packageManager.GetNuGetPackage("Microsoft.DotNet.Common.ProjectTemplates.5.0").ConfigureAwait(false);

            InstallRequest installRequest = new InstallRequest(Path.GetFullPath(packageLocation));

            IReadOnlyList <InstallResult> result = await bootstrapper.InstallTemplatePackagesAsync(new[] { installRequest }, InstallationScope.Global, CancellationToken.None).ConfigureAwait(false);

            Assert.Equal(1, result.Count);
            Assert.True(result[0].Success);
            Assert.Equal(InstallerErrorCode.Success, result[0].Error);
            result[0].ErrorMessage.Should().BeNullOrEmpty();
            Assert.Equal(installRequest, result[0].InstallRequest);

            IManagedTemplatePackage source = result[0].TemplatePackage;

            Assert.Equal("Microsoft.DotNet.Common.ProjectTemplates.5.0", source.Identifier);
            Assert.Equal("Global Settings", source.Provider.Factory.DisplayName);
            Assert.Equal("NuGet", source.Installer.Factory.Name);
            Assert.Equal("Microsoft", source.GetDetails()["Author"]);
            source.Version.Should().NotBeNullOrEmpty();

            IReadOnlyList <IManagedTemplatePackage> managedTemplatesPackages = await bootstrapper.GetManagedTemplatePackages(CancellationToken.None).ConfigureAwait(false);

            Assert.Equal(1, managedTemplatesPackages.Count);
            managedTemplatesPackages[0].Should().BeEquivalentTo(source);

            IReadOnlyList <ITemplatePackage> templatePackages = await bootstrapper.GetTemplatePackages(CancellationToken.None).ConfigureAwait(false);

            Assert.Equal(1, templatePackages.Count);
            Assert.IsAssignableFrom <IManagedTemplatePackage>(templatePackages[0]);
            templatePackages[0].Should().BeEquivalentTo((ITemplatePackage)source);
        }
        internal async Task CanUninstall_Folder()
        {
            using Bootstrapper bootstrapper = BootstrapperFactory.GetBootstrapper();
            string templateLocation = TestUtils.GetTestTemplateLocation("TemplateWithSourceName");

            InstallRequest installRequest = new InstallRequest(Path.GetFullPath(templateLocation));

            IReadOnlyList <InstallResult> result = await bootstrapper.InstallTemplatePackagesAsync(new[] { installRequest }, InstallationScope.Global, CancellationToken.None).ConfigureAwait(false);

            Assert.Equal(1, result.Count);
            Assert.True(result[0].Success);
            IManagedTemplatePackage source = result[0].TemplatePackage;

            Assert.Equal(templateLocation, source.MountPointUri);

            IReadOnlyList <IManagedTemplatePackage> managedTemplatesPackages = await bootstrapper.GetManagedTemplatePackages(CancellationToken.None).ConfigureAwait(false);

            Assert.Equal(1, managedTemplatesPackages.Count);
            managedTemplatesPackages[0].Should().BeEquivalentTo(source);

            IReadOnlyList <UninstallResult> uninstallResults = await bootstrapper.UninstallTemplatePackagesAsync(new[] { source }, CancellationToken.None).ConfigureAwait(false);

            Assert.Equal(1, uninstallResults.Count);
            Assert.True(uninstallResults[0].Success);
            Assert.Equal(InstallerErrorCode.Success, uninstallResults[0].Error);
            uninstallResults[0].ErrorMessage.Should().BeNullOrEmpty();
            Assert.Equal(source, uninstallResults[0].TemplatePackage);

            IReadOnlyList <ITemplatePackage> templatePackages = await bootstrapper.GetTemplatePackages(CancellationToken.None).ConfigureAwait(false);

            Assert.Equal(0, templatePackages.Count);

            Directory.Exists(templateLocation);
        }
Ejemplo n.º 5
0
 private CheckUpdateResult(string?latestVersion, bool isLatest, IManagedTemplatePackage templatePackage)
     : base(templatePackage)
 {
     TemplatePackage = templatePackage;
     LatestVersion   = latestVersion;
     IsLatestVersion = isLatest;
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Creates successful result for the operation.
 /// </summary>
 /// <param name="templatePackage">the uninstalled <see cref="IManagedTemplatePackage"/>.</param>
 /// <returns></returns>
 public static UninstallResult CreateSuccess(IManagedTemplatePackage templatePackage)
 {
     return(new UninstallResult()
     {
         Error = InstallerErrorCode.Success,
         TemplatePackage = templatePackage
     });
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Creates failure result for the operation.
 /// </summary>
 /// <param name="templatePackage">the template package attempted to be uninstalled.</param>
 /// <param name="error">error code, see <see cref="InstallerErrorCode"/> for details.</param>
 /// <param name="localizedFailureMessage">detailed error message.</param>
 /// <returns></returns>
 public static UninstallResult CreateFailure(IManagedTemplatePackage templatePackage, InstallerErrorCode error, string localizedFailureMessage)
 {
     return(new UninstallResult()
     {
         TemplatePackage = templatePackage,
         Error = error,
         ErrorMessage = localizedFailureMessage
     });
 }
 public UpdateRequest(IManagedTemplatePackage templatePackage, string targetVersion)
 {
     TemplatePackage = templatePackage ?? throw new ArgumentNullException(nameof(templatePackage));
     if (string.IsNullOrWhiteSpace(targetVersion))
     {
         throw new ArgumentException("Version cannot be null or empty", nameof(targetVersion));
     }
     Version = targetVersion;
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Creates successful result for the operation.
 /// </summary>
 /// <param name="request">the processed <see cref="UpdateRequest"/>.</param>
 /// <param name="templatePackage">the updated <see cref="IManagedTemplatePackage"/>.</param>
 /// <returns></returns>
 public static UpdateResult CreateSuccess(UpdateRequest request, IManagedTemplatePackage templatePackage)
 {
     return(new UpdateResult()
     {
         UpdateRequest = request,
         Error = InstallerErrorCode.Success,
         TemplatePackage = templatePackage
     });
 }
 /// <summary>
 /// Creates successful result for the operation.
 /// </summary>
 /// <param name="templatePackage">the package that was checked for update.</param>
 /// <param name="version">the latest version of the package.</param>
 /// <param name="isLatest">indication if installed version is latest or higher.</param>
 /// <returns></returns>
 public static CheckUpdateResult CreateSuccess(IManagedTemplatePackage templatePackage, string version, bool isLatest)
 {
     return(new CheckUpdateResult()
     {
         Error = InstallerErrorCode.Success,
         TemplatePackage = templatePackage,
         LatestVersion = version,
         IsLatestVersion = isLatest,
     });
 }
Ejemplo n.º 11
0
        public TemplatePackageData Serialize(IManagedTemplatePackage templatePackage)
        {
            _ = templatePackage ?? throw new ArgumentNullException(nameof(templatePackage));
            NuGetManagedTemplatePackage nuGetTemplatePackage = templatePackage as NuGetManagedTemplatePackage
                                                               ?? throw new ArgumentException($"{nameof(templatePackage)} should be of type {nameof(NuGetManagedTemplatePackage)}", nameof(templatePackage));

            return(new TemplatePackageData(
                       Factory.Id,
                       nuGetTemplatePackage.MountPointUri,
                       nuGetTemplatePackage.LastChangeTime,
                       nuGetTemplatePackage.Details));
        }
Ejemplo n.º 12
0
        public TemplatePackageData Serialize(IManagedTemplatePackage templatePackage)
        {
            _ = templatePackage ?? throw new ArgumentNullException(nameof(templatePackage));
            if (!(templatePackage is FolderManagedTemplatePackage))
            {
                throw new ArgumentException($"{nameof(templatePackage)} should be of type {nameof(FolderManagedTemplatePackage)}", nameof(templatePackage));
            }

            FolderManagedTemplatePackage folderTemplatePackage = templatePackage as FolderManagedTemplatePackage
                                                                 ?? throw new ArgumentException($"{nameof(templatePackage)} should be of type {nameof(FolderManagedTemplatePackage)}", nameof(templatePackage));

            return(new TemplatePackageData(Factory.Id, folderTemplatePackage.MountPointUri, folderTemplatePackage.LastChangeTime, null));
        }
 public Task <UninstallResult> UninstallAsync(IManagedTemplatePackage templatePackage, IManagedTemplatePackageProvider provider, CancellationToken cancellationToken)
 {
     _ = templatePackage ?? throw new ArgumentNullException(nameof(templatePackage));
     if (!(templatePackage is NuGetManagedTemplatePackage))
     {
         return(Task.FromResult(UninstallResult.CreateFailure(templatePackage, InstallerErrorCode.UnsupportedRequest, $"{templatePackage.Identifier} is not supported by {Factory.Name}")));
     }
     try
     {
         _environmentSettings.Host.FileSystem.FileDelete(templatePackage.MountPointUri);
         return(Task.FromResult(UninstallResult.CreateSuccess(templatePackage)));
     }
     catch (Exception ex)
     {
         _environmentSettings.Host.LogDiagnosticMessage($"Uninstalling {templatePackage.DisplayName} failed.", DebugLogCategory);
         _environmentSettings.Host.LogDiagnosticMessage($"Details:{ex.ToString()}", DebugLogCategory);
         return(Task.FromResult(UninstallResult.CreateFailure(templatePackage, InstallerErrorCode.GenericError, $"Failed to uninstall {templatePackage.DisplayName}, reason: {ex.Message}")));
     }
 }
        internal async Task CanCheckForLatestVersion_NuGetPackage()
        {
            using Bootstrapper bootstrapper = BootstrapperFactory.GetBootstrapper();
            InstallRequest installRequest = new InstallRequest("Microsoft.DotNet.Common.ProjectTemplates.5.0", "5.0.0");

            IReadOnlyList <InstallResult> result = await bootstrapper.InstallTemplatePackagesAsync(new[] { installRequest }, InstallationScope.Global, CancellationToken.None).ConfigureAwait(false);

            Assert.Equal(1, result.Count);
            Assert.True(result[0].Success);
            IManagedTemplatePackage source = result[0].TemplatePackage;

            IReadOnlyList <CheckUpdateResult> checkUpdateResults = await bootstrapper.GetLatestVersionsAsync(new[] { source }, CancellationToken.None).ConfigureAwait(false);

            Assert.Equal(1, checkUpdateResults.Count);
            Assert.True(checkUpdateResults[0].Success);
            Assert.Equal(InstallerErrorCode.Success, checkUpdateResults[0].Error);
            Assert.True(string.IsNullOrEmpty(checkUpdateResults[0].ErrorMessage));
            Assert.Equal(source, checkUpdateResults[0].TemplatePackage);
            Assert.False(checkUpdateResults[0].IsLatestVersion);
            Assert.NotEqual("5.0.0", checkUpdateResults[0].LatestVersion);
        }
        internal async Task CanCheckForLatestVersion_Folder()
        {
            using Bootstrapper bootstrapper = BootstrapperFactory.GetBootstrapper();
            string templateLocation = TestUtils.GetTestTemplateLocation("TemplateWithSourceName");

            InstallRequest installRequest = new InstallRequest(Path.GetFullPath(templateLocation));

            IReadOnlyList <InstallResult> result = await bootstrapper.InstallTemplatePackagesAsync(new[] { installRequest }, InstallationScope.Global, CancellationToken.None).ConfigureAwait(false);

            Assert.Equal(1, result.Count);
            Assert.True(result[0].Success);
            IManagedTemplatePackage source = result[0].TemplatePackage;

            IReadOnlyList <CheckUpdateResult> checkUpdateResults = await bootstrapper.GetLatestVersionsAsync(new[] { source }, CancellationToken.None).ConfigureAwait(false);

            Assert.Equal(1, checkUpdateResults.Count);
            Assert.True(checkUpdateResults[0].Success);
            Assert.Equal(InstallerErrorCode.Success, checkUpdateResults[0].Error);
            Assert.True(string.IsNullOrEmpty(checkUpdateResults[0].ErrorMessage));
            Assert.Equal(source, checkUpdateResults[0].TemplatePackage);
            Assert.True(checkUpdateResults[0].IsLatestVersion);
        }
        internal async Task CanInstall_RemoteNuGetPackage()
        {
            using Bootstrapper bootstrapper = BootstrapperFactory.GetBootstrapper();
            InstallRequest installRequest = new InstallRequest(
                "Take.Blip.Client.Templates",
                "0.5.135",
                details: new Dictionary <string, string>
            {
                { InstallerConstants.NuGetSourcesKey, "https://api.nuget.org/v3/index.json" }
            });

            IReadOnlyList <InstallResult> result = await bootstrapper.InstallTemplatePackagesAsync(new[] { installRequest }, InstallationScope.Global, CancellationToken.None).ConfigureAwait(false);

            Assert.Equal(1, result.Count);
            Assert.True(result[0].Success);
            Assert.Equal(InstallerErrorCode.Success, result[0].Error);
            Assert.True(string.IsNullOrEmpty(result[0].ErrorMessage));
            Assert.Equal(installRequest, result[0].InstallRequest);

            IManagedTemplatePackage source = result[0].TemplatePackage;

            Assert.Equal("Take.Blip.Client.Templates", source.Identifier);
            Assert.Equal("Global Settings", source.Provider.Factory.DisplayName);
            Assert.Equal("NuGet", source.Installer.Factory.Name);
            source.GetDetails()["Author"].Should().NotBeNullOrEmpty();
            Assert.Equal("https://api.nuget.org/v3/index.json", source.GetDetails()["NuGetSource"]);
            Assert.Equal("0.5.135", source.Version);

            IReadOnlyList <IManagedTemplatePackage> managedTemplatesPackages = await bootstrapper.GetManagedTemplatePackages(CancellationToken.None).ConfigureAwait(false);

            Assert.Equal(1, managedTemplatesPackages.Count);
            managedTemplatesPackages[0].Should().BeEquivalentTo(source);

            IReadOnlyList <ITemplatePackage> templatePackages = await bootstrapper.GetTemplatePackages(CancellationToken.None).ConfigureAwait(false);

            Assert.Equal(1, templatePackages.Count);
            Assert.IsAssignableFrom <IManagedTemplatePackage>(templatePackages[0]);
            templatePackages[0].Should().BeEquivalentTo((ITemplatePackage)source);
        }
        internal async Task CanUpdate_NuGetPackage()
        {
            using Bootstrapper bootstrapper = BootstrapperFactory.GetBootstrapper();
            InstallRequest installRequest = new InstallRequest("Microsoft.DotNet.Common.ProjectTemplates.5.0", "5.0.0");

            IReadOnlyList <InstallResult> result = await bootstrapper.InstallTemplatePackagesAsync(new[] { installRequest }, InstallationScope.Global, CancellationToken.None).ConfigureAwait(false);

            Assert.Equal(1, result.Count);
            Assert.True(result[0].Success);
            IManagedTemplatePackage source = result[0].TemplatePackage;

            UpdateRequest updateRequest = new UpdateRequest(source, "5.0.1");

            IReadOnlyList <UpdateResult> updateResults = await bootstrapper.UpdateTemplatePackagesAsync(new[] { updateRequest }, CancellationToken.None).ConfigureAwait(false);

            Assert.Equal(1, updateResults.Count);
            Assert.True(updateResults[0].Success);
            Assert.Equal(InstallerErrorCode.Success, updateResults[0].Error);
            Assert.True(string.IsNullOrEmpty(updateResults[0].ErrorMessage));
            Assert.Equal(updateRequest, updateResults[0].UpdateRequest);

            IManagedTemplatePackage updatedSource = updateResults[0].TemplatePackage;

            Assert.Equal("Global Settings", updatedSource.Provider.Factory.DisplayName);
            Assert.Equal("NuGet", updatedSource.Installer.Factory.Name);
            Assert.Equal("5.0.1", updatedSource.Version);

            IReadOnlyList <IManagedTemplatePackage> managedTemplatesPackages = await bootstrapper.GetManagedTemplatePackages(CancellationToken.None).ConfigureAwait(false);

            Assert.Equal(1, managedTemplatesPackages.Count);
            managedTemplatesPackages[0].Should().BeEquivalentTo(updatedSource);

            IReadOnlyList <ITemplatePackage> templatePackages = await bootstrapper.GetTemplatePackages(CancellationToken.None).ConfigureAwait(false);

            Assert.Equal(1, templatePackages.Count);
            Assert.IsAssignableFrom <IManagedTemplatePackage>(templatePackages[0]);
            templatePackages[0].Should().BeEquivalentTo((ITemplatePackage)updatedSource);
        }
Ejemplo n.º 18
0
 public Task <UninstallResult> UninstallAsync(IManagedTemplatePackage templatePackage, IManagedTemplatePackageProvider provider, CancellationToken cancellationToken)
 {
     _ = templatePackage ?? throw new ArgumentNullException(nameof(templatePackage));
     if (!(templatePackage is NuGetManagedTemplatePackage))
     {
         return(Task.FromResult(UninstallResult.CreateFailure(
                                    templatePackage,
                                    InstallerErrorCode.UnsupportedRequest,
                                    string.Format(LocalizableStrings.NuGetInstaller_InstallResut_Error_PackageNotSupported, templatePackage.DisplayName, Factory.Name))));
     }
     try
     {
         _environmentSettings.Host.FileSystem.FileDelete(templatePackage.MountPointUri);
         return(Task.FromResult(UninstallResult.CreateSuccess(templatePackage)));
     }
     catch (Exception e)
     {
         _logger.LogDebug("Uninstalling {0} failed. Details:{1}", templatePackage.DisplayName, e);
         return(Task.FromResult(UninstallResult.CreateFailure(
                                    templatePackage,
                                    InstallerErrorCode.GenericError,
                                    string.Format(LocalizableStrings.NuGetInstaller_InstallResut_Error_UninstallGeneric, templatePackage.DisplayName, e.Message))));
     }
 }
Ejemplo n.º 19
0
 private UninstallResult(IManagedTemplatePackage templatePackage)
     : base(templatePackage)
 {
     TemplatePackage = templatePackage;
 }
Ejemplo n.º 20
0
 /// <summary>
 /// Creates failure result for the operation.
 /// </summary>
 /// <param name="templatePackage">the package that was checked for update.</param>
 /// <param name="error">error code, see <see cref="InstallerErrorCode"/> for details.</param>
 /// <param name="localizedFailureMessage">detailed error message.</param>
 /// <returns></returns>
 public static CheckUpdateResult CreateFailure(IManagedTemplatePackage templatePackage, InstallerErrorCode error, string localizedFailureMessage)
 {
     return(new CheckUpdateResult(error, localizedFailureMessage, templatePackage));
 }
Ejemplo n.º 21
0
 /// <summary>
 /// Creates successful result for the operation.
 /// </summary>
 /// <param name="templatePackage">the package that was checked for update.</param>
 /// <param name="version">the latest version of the package.</param>
 /// <param name="isLatest">indication if installed version is latest or higher.</param>
 /// <returns></returns>
 public static CheckUpdateResult CreateSuccess(IManagedTemplatePackage templatePackage, string?version, bool isLatest)
 {
     return(new CheckUpdateResult(version, isLatest, templatePackage));
 }
Ejemplo n.º 22
0
 private UpdateResult(UpdateRequest request, IManagedTemplatePackage templatePackage)
     : base(templatePackage)
 {
     UpdateRequest = request;
 }
Ejemplo n.º 23
0
 /// <summary>
 /// Creates successful result for the operation.
 /// </summary>
 /// <param name="request">the processed <see cref="UpdateRequest"/>.</param>
 /// <param name="templatePackage">the updated <see cref="IManagedTemplatePackage"/>.</param>
 /// <returns></returns>
 public static UpdateResult CreateSuccess(UpdateRequest request, IManagedTemplatePackage templatePackage)
 {
     return(new UpdateResult(request, templatePackage));
 }
Ejemplo n.º 24
0
 protected InstallerOperationResult(IManagedTemplatePackage managedTemplatePackage)
 {
     Error           = InstallerErrorCode.Success;
     TemplatePackage = managedTemplatePackage;
 }
Ejemplo n.º 25
0
 /// <summary>
 /// Creates successful result for the operation.
 /// </summary>
 /// <param name="request">the processed installation request.</param>
 /// <param name="templatePackage">the installed <see cref="IManagedTemplatePackage"/>.</param>
 /// <returns></returns>
 public static InstallResult CreateSuccess(InstallRequest request, IManagedTemplatePackage templatePackage)
 {
     return(new InstallResult(request, templatePackage));
 }
Ejemplo n.º 26
0
 private UninstallResult(InstallerErrorCode error, string errorMessage, IManagedTemplatePackage templatePackage)
     : base(error, errorMessage, templatePackage)
 {
     TemplatePackage = templatePackage;
 }
Ejemplo n.º 27
0
        public Task <UninstallResult> UninstallAsync(IManagedTemplatePackage templatePackage, IManagedTemplatePackageProvider provider, CancellationToken cancellationToken)
        {
            _ = templatePackage ?? throw new ArgumentNullException(nameof(templatePackage));

            return(Task.FromResult(UninstallResult.CreateSuccess(templatePackage)));
        }
Ejemplo n.º 28
0
 /// <summary>
 /// Creates successful result for the operation.
 /// </summary>
 /// <param name="templatePackage">the uninstalled <see cref="IManagedTemplatePackage"/>.</param>
 /// <returns></returns>
 public static UninstallResult CreateSuccess(IManagedTemplatePackage templatePackage)
 {
     return(new UninstallResult(templatePackage));
 }
Ejemplo n.º 29
0
 private InstallResult(InstallRequest request, IManagedTemplatePackage templatePackage)
     : base(templatePackage)
 {
     InstallRequest = request;
 }