상속: SIM.Pipelines.Processors.ProcessorArgs
 protected override void Process(ReinstallArgs args)
 {
     if (Settings.CoreInstallCreateServerTxt.Value)
     {
         File.WriteAllText(Path.Combine(args.WebRootPath, "server.txt"), $"{Environment.MachineName}-{args.InstanceName}");
     }
 }
    protected override void Process(ReinstallArgs args)
    {
      Assert.ArgumentNotNull(args, "args");

      var defaultConnectionString = args.ConnectionString;
      Assert.IsNotNull(defaultConnectionString, "SQL Connection String isn't set in the Settings dialog");

      string instanceName = args.instanceName;
      var instance = InstanceManager.GetInstance(instanceName);
      var controller = this.Controller;
      foreach (ConnectionString connectionString in instance.Configuration.ConnectionStrings)
      {
        if (this.done.Contains(connectionString.Name))
        {
          continue;
        }

        AttachDatabasesHelper.AttachDatabase(connectionString, defaultConnectionString, args.Name, args.DatabasesFolderPath, args.InstanceName, controller);

        if (controller != null)
        {
          controller.IncrementProgress(AttachDatabasesHelper.StepsCount / args.ConnectionString.Count);
        }
        
        this.done.Add(connectionString.Name);
      }
    }
예제 #3
0
        protected override void Process(ReinstallArgs args)
        {
            Assert.ArgumentNotNull(args, nameof(args));

            var defaultConnectionString = args.ConnectionString;

            Assert.IsNotNull(defaultConnectionString, "SQL Connection String isn't set in the Settings dialog");

            var instanceName = args.instanceName;
            var instance     = InstanceManager.GetInstance(instanceName);
            var controller   = this.Controller;

            var sqlPrefix = args.SqlPrefix;

            foreach (ConnectionString connectionString in instance.Configuration.ConnectionStrings)
            {
                if (this.done.Contains(connectionString.Name))
                {
                    continue;
                }

                AttachDatabasesHelper.AttachDatabase(connectionString, defaultConnectionString, args.Name, sqlPrefix, true, args.DatabasesFolderPath, args.InstanceName, controller);

                if (controller != null)
                {
                    controller.IncrementProgress(AttachDatabasesHelper.StepsCount / args.ConnectionString.Count);
                }

                this.done.Add(connectionString.Name);
            }
        }
예제 #4
0
        protected override void Process([NotNull] ReinstallArgs args)
        {
            Assert.ArgumentNotNull(args, "args");

            string path = args.DataFolderPath;

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

      var installRadControls = Directory.Exists(Path.Combine(args.WebRootPath, InstallHelper.RadControls));
      var installDictionaries = Directory.Exists(Path.Combine(args.WebRootPath, InstallHelper.Dictionaries));

      InstallHelper.ExtractFile(args.PackagePath, args.WebRootPath, args.DatabasesFolderPath, args.DataFolderPath, installRadControls, installDictionaries, this.Controller);
    }
        protected override void Process(ReinstallArgs args)
        {
            Assert.ArgumentNotNull(args, "args");

            var installRadControls  = Directory.Exists(Path.Combine(args.WebRootPath, InstallHelper.RadControls));
            var installDictionaries = Directory.Exists(Path.Combine(args.WebRootPath, InstallHelper.Dictionaries));

            InstallHelper.ExtractFile(args.PackagePath, args.WebRootPath, args.DatabasesFolderPath, args.DataFolderPath, installRadControls, installDictionaries, this.Controller);
        }
예제 #7
0
        protected override void Process([NotNull] ReinstallArgs args)
        {
            Assert.ArgumentNotNull(args, "args");

            string name                  = args.Name;
            var    bindings              = args.Bindings;
            string webRootPath           = args.WebRootPath;
            bool   enable32BitAppOnWin64 = args.Is32Bit;
            bool   forceNetFramework4    = args.ForceNetFramework4;
            bool   isClassic             = args.IsClassic;

            SetupWebsiteHelper.SetupWebsite(enable32BitAppOnWin64, webRootPath, forceNetFramework4, isClassic, bindings, name);
        }
예제 #8
0
        protected override void Process([NotNull] ReinstallArgs args)
        {
            Assert.ArgumentNotNull(args, "args");

            string path = args.RootPath;

            if (!string.IsNullOrEmpty(path))
            {
                FileSystem.FileSystem.Local.Directory.DeleteIfExists(path);

                FileSystem.FileSystem.Local.Directory.CreateDirectory(path);
            }
        }
    protected override void Process(ReinstallArgs args)
    {
      Assert.ArgumentNotNull(args, "args");

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

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

            try
            {
                args.StopInstance(true);
            }
            catch (Exception ex)
            {
                Log.Warn(ex, $"Cannot stop instance {args.InstanceName}. {ex.Message}");
            }
        }
예제 #12
0
        protected override void Process([NotNull] ReinstallArgs args)
        {
            Assert.ArgumentNotNull(args, "args");

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

            DeleteDatabasesHelper.Process(detectedDatabases, rootPath, connectionString, instanceName, controller, this.done);

            if (controller != null)
            {
                controller.IncrementProgress(args.InstanceDatabases.Count - 1);
            }
        }
        protected override void Process(ReinstallArgs args)
        {
            InstanceManager.Initialize();

            var instance = InstanceManager.GetInstance(args.InstanceName);

            Assert.IsNotNull(instance, nameof(instance));

            if (this.ProcessorDefinition.Param == "nowait")
            {
                try
                {
                    InstanceHelper.StartInstance(instance, 500);
                }
                catch
                {
                    // ignore error
                }
            }
            else
            {
                InstanceHelper.StartInstance(instance);
            }
        }
        protected virtual bool IsRequireProcessing([NotNull] ReinstallArgs args)
        {
            Assert.ArgumentNotNull(args, nameof(args));

            return(true);
        }
        protected override void Process(ReinstallArgs args)
        {
            Assert.ArgumentNotNull(args, "args");

              InstallHelper.ExtractFile(args.PackagePath, args.WebRootPath, args.DatabasesFolderPath, args.DataFolderPath, this.Controller);
        }
 protected abstract void Process([NotNull] ReinstallArgs args);
 protected override void Process(ReinstallArgs args)
 {
   var databasesFolderPath = args.DatabasesFolderPath;
   AttachDatabasesHelper.MoveDatabases(databasesFolderPath);
 }
예제 #18
0
 protected override bool IsRequireProcessing(ReinstallArgs args)
 {
     return(AttachDatabasesHelper.IsRemoteSqlServer());
 }
예제 #19
0
        protected override void Process(ReinstallArgs args)
        {
            var databasesFolderPath = args.DatabasesFolderPath;

            AttachDatabasesHelper.MoveDatabases(databasesFolderPath);
        }
        protected override void Process(ReinstallArgs args)
        {
            Assert.ArgumentNotNull(args, "args");

            UpdateWebConfigHelper.Process(args.RootPath, args.WebRootPath, args.DataFolderPath, args.ServerSideRedirect, args.IncreaseExecutionTimeout);
        }
예제 #21
0
        protected override void Process([NotNull] ReinstallArgs args)
        {
            Assert.ArgumentNotNull(args, "args");

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

            WebServerManager.DeleteWebsite(args.WebsiteID);
        }
        protected override void Process(ReinstallArgs args)
        {
            Assert.ArgumentNotNull(args, "args");

              UpdateWebConfigHelper.Process(args.RootPath, args.WebRootPath, args.DataFolderPath, args.ServerSideRedirect, args.IncreaseExecutionTimeout);
        }
예제 #24
0
        protected override void Process([NotNull] ReinstallArgs args)
        {
            Assert.ArgumentNotNull(args, "args");

            FileSystem.FileSystem.Local.File.Copy(args.LicenseFilePath, Path.Combine(args.DataFolderPath, "license.xml"));
        }
        protected override void Process([NotNull] ReinstallArgs args)
        {
            Assert.ArgumentNotNull(args, "args");

            UpdateWebConfigHelper.Process(args.RootPath, args.WebRootPath, args.DataFolderPath);
        }
 protected override bool IsRequireProcessing(ReinstallArgs args)
 {
   return AttachDatabasesHelper.IsRemoteSqlServer();
 }
        protected override void Process([NotNull] ReinstallArgs args)
        {
            Assert.ArgumentNotNull(args, nameof(args));

            FileSystem.FileSystem.Local.Zip.CheckZip(args.PackagePath);
        }
예제 #28
0
        protected override void Process(ReinstallArgs args)
        {
            Assert.ArgumentNotNull(args, "args");

            InstallHelper.ExtractFile(args.PackagePath, args.WebRootPath, args.DatabasesFolderPath, args.DataFolderPath, this.Controller);
        }