This commit is contained in:
Stef Heyenrath
2017-05-05 22:25:57 +02:00
parent 84db9bbf0d
commit 7bfd9f3343
19 changed files with 185 additions and 303 deletions

View File

@@ -6,7 +6,6 @@ using System.Linq;
using System.Text;
using JetBrains.Annotations;
using WireMock.Http;
using WireMock.Logging;
using WireMock.Matchers;
using WireMock.Matchers.Request;
using WireMock.RequestBuilders;
@@ -21,9 +20,7 @@ namespace WireMock.Server
public partial class FluentMockServer : IDisposable
{
private readonly IOwinSelfHost _httpServer;
private readonly object _syncRoot = new object();
private readonly WireMockMiddlewareOptions _options = new WireMockMiddlewareOptions();
/// <summary>
@@ -56,6 +53,7 @@ namespace WireMock.Server
}
}
#region Start/Stop
/// <summary>
/// Starts the specified settings.
/// </summary>
@@ -185,6 +183,16 @@ namespace WireMock.Server
}
}
/// <summary>
/// Stop this server.
/// </summary>
[PublicAPI]
public void Stop()
{
_httpServer?.StopAsync();
}
#endregion
/// <summary>
/// Adds the catch all mapping.
/// </summary>
@@ -197,15 +205,6 @@ namespace WireMock.Server
.RespondWith(new DynamicResponseProvider(request => new ResponseMessage { StatusCode = 404, Body = "No matching mapping found" }));
}
/// <summary>
/// Stop this server.
/// </summary>
[PublicAPI]
public void Stop()
{
_httpServer?.StopAsync();
}
/// <summary>
/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
/// </summary>
@@ -264,9 +263,7 @@ namespace WireMock.Server
/// <summary>
/// The add request processing delay.
/// </summary>
/// <param name="delay">
/// The delay.
/// </param>
/// <param name="delay">The delay.</param>
[PublicAPI]
public void AddGlobalProcessingDelay(TimeSpan delay)
{