Ejemplo n.º 1
0
 public void UninstallCustomUXSubscription(SubscriptionState subState)
 {
     using (this.AcquireSubscriptionWriterLock(subState))
     {
         SubscriptionStore.CheckInstalled(subState);
         if (subState.appType != AppType.CustomUX)
         {
             throw new InvalidOperationException(Resources.GetString("Ex_CannotCallUninstallCustomUXApplication"));
         }
         if (subState.CurrentApplicationManifest != null)
         {
             string productName = (string)null;
             if (subState.CurrentDeploymentManifest != null && subState.CurrentDeploymentManifest.Description != null)
             {
                 productName = subState.CurrentDeploymentManifest.Description.Product;
             }
             if (productName == null)
             {
                 productName = subState.SubscriptionId.Name;
             }
             ShellExposure.RemoveShellExtensions(subState.SubscriptionId, subState.CurrentApplicationManifest, productName);
         }
         this._compStore.RemoveSubscription(subState);
         SubscriptionStore.OnDeploymentRemoved(subState);
     }
 }
Ejemplo n.º 2
0
 public void RollbackSubscription(SubscriptionState subState)
 {
     using (this.AcquireSubscriptionWriterLock(subState))
     {
         this.CheckInstalledAndShellVisible(subState);
         if (subState.RollbackDeployment == null)
         {
             throw new DeploymentException(ExceptionTypes.SubscriptionState, Resources.GetString("Ex_SubNoRollbackDeployment"));
         }
         if (subState.CurrentApplicationManifest != null)
         {
             string productName = (string)null;
             if (subState.CurrentDeploymentManifest != null && subState.CurrentDeploymentManifest.Description != null)
             {
                 productName = subState.CurrentDeploymentManifest.Description.Product;
             }
             if (productName == null)
             {
                 productName = subState.SubscriptionId.Name;
             }
             ShellExposure.RemoveShellExtensions(subState.SubscriptionId, subState.CurrentApplicationManifest, productName);
         }
         this._compStore.RollbackSubscription(subState);
         this.UpdateSubscriptionExposure(subState);
         SubscriptionStore.OnDeploymentRemoved(subState);
     }
 }
Ejemplo n.º 3
0
 public void UninstallCustomHostSpecifiedSubscription(SubscriptionState subState)
 {
     using (this.AcquireSubscriptionWriterLock(subState))
     {
         SubscriptionStore.CheckInstalled(subState);
         if (subState.appType != AppType.CustomHostSpecified)
         {
             throw new InvalidOperationException(Resources.GetString("Ex_CannotCallUninstallCustomAddIn"));
         }
         this._compStore.RemoveSubscription(subState);
         SubscriptionStore.OnDeploymentRemoved(subState);
     }
 }
Ejemplo n.º 4
0
 public void UninstallSubscription(SubscriptionState subState)
 {
     using (this.AcquireSubscriptionWriterLock(subState))
     {
         this.CheckInstalledAndShellVisible(subState);
         if (subState.CurrentApplicationManifest != null)
         {
             string productName = (string)null;
             if (subState.CurrentDeploymentManifest != null && subState.CurrentDeploymentManifest.Description != null)
             {
                 productName = subState.CurrentDeploymentManifest.Description.Product;
             }
             if (productName == null)
             {
                 productName = subState.SubscriptionId.Name;
             }
             ShellExposure.RemoveShellExtensions(subState.SubscriptionId, subState.CurrentApplicationManifest, productName);
             ShellExposure.RemovePins(subState);
         }
         this._compStore.RemoveSubscription(subState);
         SubscriptionStore.RemoveSubscriptionExposure(subState);
         SubscriptionStore.OnDeploymentRemoved(subState);
     }
 }