コード例 #1
0
        protected override void When(ServerManagerWrapper manager)
        {
            var existingSite = manager.Sites.Single(x => x.Name == SiteName);

            var appPool = new ConfigureAppPool(manager);
            appPool.ConfigureInstalledSite(existingSite, InstallationConfiguration);
        }
コード例 #2
0
 public void RuntimeIsv2()
 {
     using (var manager = new ServerManagerWrapper())
     {
         var runtime = manager.ApplicationPools.Single(x => x.Name == AppPoolName).ManagedRuntimeVersion;
         Assert.AreEqual("v2.0", runtime);
     }
 }
コード例 #3
0
 public void AppPoolIsStartOnDemand()
 {
     using (var manager = new ServerManagerWrapper())
     {
         var startMode = manager.ApplicationPools.Single(x => x.Name == AppPoolName).GetAttributeValue("startMode");
         Assert.AreEqual(AppPoolStartMode.OnDemand, (AppPoolStartMode)startMode);
     }
 }
コード例 #4
0
 public void AppPoolWasDeleted_ByComparingQueueLength()
 {
     using (var manager = new ServerManagerWrapper())
     {
         var newAppPoolQueueLength = manager.ApplicationPools.Single(x => x.Name == AppPoolName).QueueLength;
         Assert.AreNotSame(_customQueueLength, newAppPoolQueueLength);
     }
 }
        protected override void When(ServerManagerWrapper manager)
        {
            var createSite = new CreateSite(manager);
            _site = createSite.Install(InstallationConfiguration);

            var logging = new ConfigureLogging(manager, _directoryMock.Object);
            logging.ConfigureInstalledSite(_site, InstallationConfiguration);
        }
コード例 #6
0
        protected override void When(ServerManagerWrapper manager)
        {
            var createSite = new CreateSite(manager);
            _site = createSite.Install(InstallationConfiguration);

            var bindings = new ConfigureBindings(manager);
            bindings.ConfigureInstalledSite(_site, InstallationConfiguration);
        }
コード例 #7
0
 public void DefaultAppPoolIsAlwaysRunning()
 {
     using (var manager = new ServerManagerWrapper())
     {
         var startMode = manager.ApplicationPools.Single(x => x.Name == AppPoolName).GetAttributeValue("startMode");
         Assert.AreEqual(AppPoolStartMode.AlwaysRunning, (AppPoolStartMode)startMode);
     }
 }
コード例 #8
0
        public void SetUp()
        {
            DeleteExistingSite();

            InstallationConfiguration = new InstallationConfiguration(Environment.CurrentDirectory, null);
            InstallationConfiguration.WithSiteName(SiteName);
            InstallationConfiguration.WithAppPool(AppPoolName);

            Given(InstallationConfiguration);

            using (var manager = new ServerManagerWrapper())
            {
                When(manager);

                manager.CommitChanges();
            }
        }
コード例 #9
0
        static void Main(string[] args)
        {
            Trace.Listeners.Add(new ConsoleTraceListener(true));

            var options = new ArgsParser().Parse(args);

            var unpackedDirectory = options.Count > 0 ? options.First().Value : Directory.GetCurrentDirectory();
            var pathScanner = new PathScanner(unpackedDirectory, options);
            var deploymentManifest = pathScanner.FindFirstAvailableInstaller();

            if (deploymentManifest is NoInstallationFound)
            {
                Environment.Exit((int)ExitCodes.NoInstallationPerformed);
            }

            deploymentManifest.SourceInstaller.ConfigureInstallation(deploymentManifest.InstallationConfiguration);

            using (var serverManager = new ServerManagerWrapper())
            {
                new SiteDeployer(serverManager, deploymentManifest.InstallationConfiguration, new DirectoryWrapper()).Deploy();
            }
        }
コード例 #10
0
 protected virtual void When(ServerManagerWrapper manager)
 {
 }
コード例 #11
0
        protected override void When(ServerManagerWrapper manager)
        {
            var deleteSite = new DeleteExistingSite(manager);

            deleteSite.BeforeInstallation(InstallationConfiguration);
        }
コード例 #12
0
 protected override void When(ServerManagerWrapper manager)
 {
     var createSite = new CreateSite(manager);
     createSite.Install(InstallationConfiguration);
 }