Expose more settings to stand-alone app (#40)

This commit is contained in:
Stef Heyenrath
2017-08-11 13:26:36 +02:00
committed by GitHub
parent 2aee658dfa
commit 5c5d408abe
3 changed files with 40 additions and 11 deletions

View File

@@ -173,8 +173,18 @@ namespace WireMock.Server
_httpServer.StartAsync();
if (settings.AllowPartialMapping == true)
{
AllowPartialMapping();
}
if (settings.StartAdminInterface == true)
{
if (!string.IsNullOrEmpty(settings.AdminUsername) && !string.IsNullOrEmpty(settings.AdminPassword))
{
SetBasicAuthentication(settings.AdminUsername, settings.AdminPassword);
}
InitAdmin();
}

View File

@@ -54,5 +54,20 @@
/// StartTimeout
/// </summary>
public int StartTimeout { get; set; } = 10000;
/// <summary>
/// Allow Partial Mapping (default set to false).
/// </summary>
public bool? AllowPartialMapping { get; set; }
/// <summary>
/// The username needed for __admin access.
/// </summary>
public string AdminUsername { get; set; }
/// <summary>
/// The password needed for __admin access.
/// </summary>
public string AdminPassword { get; set; }
}
}