Skip to content
This repository has been archived by the owner on Dec 19, 2018. It is now read-only.

Commit

Permalink
Adds HostingModel as an extra DeploymentParameter (#1261)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkotalik authored Nov 10, 2017
1 parent a78b9c7 commit 40bd6e5
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ public DeploymentParameters(

public string PublishedApplicationRootPath { get; set; }

public HostingModel HostingModel { get; set; }

/// <summary>
/// Environment variables to be set before starting the host.
/// Not applicable for IIS Scenarios.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

namespace Microsoft.AspNetCore.Server.IntegrationTesting
{
public enum HostingModel
{
OutOfProcess,
InProcess
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,13 @@ public override async Task<DeploymentResult> DeployAsync()

DeploymentParameters.ServerConfigLocation = Path.GetTempFileName();

if (serverConfig.Contains("[HostingModel]"))
{
var hostingModel = DeploymentParameters.HostingModel.ToString();
serverConfig.Replace("[HostingModel]", hostingModel);
Logger.LogDebug("Writing HostingModel '{hostingModel}' to config", hostingModel);
}

Logger.LogDebug("Saving Config to {configPath}", DeploymentParameters.ServerConfigLocation);

if (Logger.IsEnabled(LogLevel.Trace))
Expand Down

0 comments on commit 40bd6e5

Please sign in to comment.