Ejemplo n.º 1
0
 public static async Task UninstallPackageAsync(
     this Project project,
     string packageId,
     UninstallationContext uninstallContext,
     CancellationToken token)
 {
     var message = new UninstallPackageParams {
         ProjectFileName    = project.FileName,
         PackageId          = packageId,
         Force              = uninstallContext.ForceRemove,
         RemoveDependencies = uninstallContext.RemoveDependencies
     };
     await JsonRpcProvider.Rpc.InvokeWithCancellationAsync(
         Methods.ProjectUninstallPackage,
         new [] { message },
         token);
 }
Ejemplo n.º 2
0
        public static async Task <IEnumerable <PackageActionInfo> > PreviewUninstallPackageAsync(
            this Project project,
            string packageId,
            UninstallationContext uninstallContext,
            CancellationToken token)
        {
            var message = new UninstallPackageParams {
                ProjectFileName    = project.FileName,
                PackageId          = packageId,
                Force              = uninstallContext.ForceRemove,
                RemoveDependencies = uninstallContext.RemoveDependencies
            };
            var list = await JsonRpcProvider.Rpc.InvokeWithParameterObjectAsync <PackageActionList> (
                Methods.ProjectPreviewUninstallPackage,
                message,
                token);

            return(list.Actions);
        }
 public UninstallPackageMessageHandler(DotNetProject project, UninstallPackageParams message)
 {
     this.project = project;
     this.message = message;
 }