protected override void Process(DeleteArgs args)
        {
            Assert.ArgumentNotNull(args, "args");

              var localMachine = Registry.LocalMachine;
              Assert.IsNotNull(localMachine, "localMachine");

              var sitecoreNode = localMachine.OpenSubKey(SitecoreNodePath, true);
              if (sitecoreNode == null)
              {
            return;
              }

              foreach (var subKeyName in sitecoreNode.GetSubKeyNames())
              {
            Assert.IsNotNull(subKeyName, "subKeyName");

            var instanceNode = sitecoreNode.OpenSubKey(subKeyName);
            if (instanceNode == null)
            {
              continue;
            }

            var name = instanceNode.GetValue("IISSiteName") as string ?? string.Empty;
            var dir = (instanceNode.GetValue("InstanceDirectory") as string ?? string.Empty).TrimEnd('\\');
            if (name.Equals(args.InstanceName, StringComparison.OrdinalIgnoreCase) || dir.Equals(args.Instance.RootPath.TrimEnd('\\'), StringComparison.OrdinalIgnoreCase))
            {
              Log.Info(string.Format("Deleting {0}\\{1} key from registry", SitecoreNodePath, subKeyName), this);
              sitecoreNode.DeleteSubKey(subKeyName);

              return;
            }
              }
        }
    protected override void Process(DeleteArgs args)
    {
      Assert.ArgumentNotNull(args, nameof(args));

      var localMachine = Registry.LocalMachine;
      Assert.IsNotNull(localMachine, nameof(localMachine));

      var sitecoreNode = localMachine.OpenSubKey(SitecoreNodePath, true);
      if (sitecoreNode == null)
      {
        return;
      }

      foreach (var subKeyName in sitecoreNode.GetSubKeyNames())
      {
        Assert.IsNotNull(subKeyName, nameof(subKeyName));

        var instanceNode = sitecoreNode.OpenSubKey(subKeyName);
        if (instanceNode == null)
        {
          continue;
        }

        var name = instanceNode.GetValue("IISSiteName") as string ?? string.Empty;
        var dir = (instanceNode.GetValue("InstanceDirectory") as string ?? string.Empty).TrimEnd('\\');
        if (name.Equals(args.InstanceName, StringComparison.OrdinalIgnoreCase) || dir.Equals(args.Instance.RootPath.TrimEnd('\\'), StringComparison.OrdinalIgnoreCase))
        {
          Log.Info($"Deleting {SitecoreNodePath}\\{subKeyName} key from registry");
          sitecoreNode.DeleteSubKey(subKeyName);

          return;
        }
      }
    }
示例#3
0
        protected override void Process([NotNull] DeleteArgs args)
        {
            Assert.ArgumentNotNull(args, "args");

            var detectedDatabases = args.MongoDatabases;

            DeleteDatabasesHelper.Process(detectedDatabases, this.done);
        }
示例#4
0
        protected override void Process([NotNull] DeleteArgs args)
        {
            Assert.ArgumentNotNull(args, nameof(args));

            var detectedDatabases = args._MongoDatabases;

            DeleteDatabasesHelper.Process(detectedDatabases, _Done);
        }
示例#5
0
        protected override void Process([NotNull] DeleteArgs args)
        {
            Assert.ArgumentNotNull(args, "args");

            string path = args.InstanceDataFolderPath;

            FileSystem.FileSystem.Local.Directory.DeleteIfExists(path);
        }
        protected override void Process([NotNull] DeleteArgs args)
        {
            Assert.ArgumentNotNull(args, "args");

            string path = args.RootPath;

            if (!string.IsNullOrEmpty(path))
            {
                FileSystem.FileSystem.Local.Directory.DeleteIfExists(path);
            }
        }
 public void OnClick(Window mainWindow, Instance instance)
 {
     if (instance != null)
       {
     var connectionString = ProfileManager.GetConnectionString();
     var args = new DeleteArgs(instance, connectionString);
     args.OnCompleted += () => mainWindow.Dispatcher.Invoke(new Action(() => this.OnPipelineCompleted(args.RootPath)));
     var index = MainWindowHelper.GetListItemID(instance.ID);
     WizardPipelineManager.Start("delete", mainWindow, args, null, () => OnWizardCompleted(index));
       }
 }
        protected override void Process([NotNull] DeleteArgs args)
        {
            Assert.ArgumentNotNull(args, nameof(args));

            IEnumerable <Database> detectedDatabases = args.InstanceDatabases;
            var rootPath                   = args.RootPath.ToLower();
            var connectionString           = args.ConnectionString;
            var instanceName               = args.InstanceName;
            IPipelineController controller = this.Controller;

            DeleteDatabasesHelper.Process(detectedDatabases, rootPath, connectionString, instanceName, controller, this.done);
        }
        protected override void Process([NotNull] DeleteArgs args)
        {
            Assert.ArgumentNotNull(args, "args");

            try
            {
                args.InstanceStop();
            }
            catch (Exception ex)
            {
                Log.Warn("Cannot stop instance {0}. {1}".FormatWith(args.InstanceName, ex.Message), this.GetType(), ex);
            }
        }
        protected override void Process([NotNull] DeleteArgs args)
        {
            Assert.ArgumentNotNull(args, nameof(args));

            var cachedInstance = InstanceManager.PartiallyCachedInstances.SingleOrDefault(x => x.ID == args.InstanceID) as PartiallyCachedInstance;

            if (cachedInstance != null)
            {
                cachedInstance.Dispose();
            }

            FileSystem.FileSystem.Local.Directory.DeleteIfExists(args.WebRootPath);
        }
示例#11
0
        protected override void Process([NotNull] DeleteArgs args)
        {
            Assert.ArgumentNotNull(args, nameof(args));

            try
            {
                args.InstanceStop();
            }
            catch (Exception ex)
            {
                Log.Warn(ex, $"Cannot stop instance {args.InstanceName}. {ex.Message}");
            }
        }
        protected override void Process([NotNull] DeleteArgs args)
        {
            Assert.ArgumentNotNull(args, "args");

            try
            {
                args.InstanceStop();
            }
            catch (Exception ex)
            {
                Log.Warn(ex, "Cannot stop instance {0}. {1}", args.InstanceName, ex.Message);
            }
        }
        protected override void Process(DeleteArgs args)
        {
            Assert.ArgumentNotNull(args, "args");

            var localMachine = Registry.LocalMachine;
            Assert.IsNotNull(localMachine, "localMachine");

            var sitecoreKey = localMachine.OpenSubKey("SOFTWARE\\Wow6432Node\\Sitecore CMS", true);
            if (sitecoreKey == null)
            {
                return;
            }

            foreach (var subKeyName in sitecoreKey.GetSubKeyNames())
            {
                Assert.IsNotNull(subKeyName, "subKeyName");
                var subKey = sitecoreKey.OpenSubKey(subKeyName);

                if (subKey == null)
                {
                    continue;
                }

                var siteName = subKey.GetValue("IISSiteName") as string ?? string.Empty;
                var instanceDirectory = (subKey.GetValue("InstanceDirectory") as string ?? string.Empty).TrimEnd('\\');

                if (!siteName.Equals(args.InstanceName, StringComparison.OrdinalIgnoreCase))
                {
                    if (!instanceDirectory.Equals(args.Instance.RootPath.TrimEnd('\\'), StringComparison.OrdinalIgnoreCase))
                    {
                        continue;
                    }
                }

                Log.Info(string.Format("Deleting {0}\\{1} key from registry", "SOFTWARE\\Wow6432Node\\Sitecore CMS", subKeyName), this);
                sitecoreKey.DeleteSubKey(subKeyName);
                break;
            }
        }
示例#14
0
        protected override void Process([NotNull] DeleteArgs args)
        {
            Assert.ArgumentNotNull(args, nameof(args));

            WebServerManager.DeleteWebsite(args.InstanceID);
        }
 protected abstract void Process([NotNull] DeleteArgs args);
        protected override void Process([NotNull] DeleteArgs args)
        {
            Assert.ArgumentNotNull(args, "args");

            Hosts.Remove(args.InstanceHostNames);
        }
示例#17
0
 protected override void Process([NotNull] DeleteArgs args)
 {
     Assert.ArgumentNotNull(args, nameof(args));
     args.Initialize();
 }
示例#18
0
 protected override void Process([NotNull] DeleteArgs args)
 {
     Assert.ArgumentNotNull(args, "args");
     args.WebRootPath = args.Instance.WebRootPath;
     args.RootPath    = args.Instance.RootPath;
 }