public void UninstallSubscription(SubscriptionState subState) { using (this.AcquireSubscriptionWriterLock(subState)) { this.CheckInstalledAndShellVisible(subState); if (subState.CurrentApplicationManifest != null) { string productName = 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); RemoveSubscriptionExposure(subState); OnDeploymentRemoved(subState); } }