mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-17 23:14:23 +01:00
code update
This commit is contained in:
@@ -7,15 +7,15 @@ namespace WireMock.Net.StandAlone.NETCoreApp
|
||||
class Program
|
||||
{
|
||||
private static int sleepTime = 30000;
|
||||
private static FluentMockServer server;
|
||||
private static FluentMockServer _server;
|
||||
|
||||
static void Main(string[] args)
|
||||
{
|
||||
server = StandAloneApp.Start(args);
|
||||
_server = StandAloneApp.Start(args);
|
||||
|
||||
Console.WriteLine($"{DateTime.UtcNow} Press Ctrl+C to shut down");
|
||||
|
||||
System.Console.CancelKeyPress += (s,e) =>
|
||||
Console.CancelKeyPress += (s, e) =>
|
||||
{
|
||||
Stop("CancelKeyPress");
|
||||
};
|
||||
@@ -25,7 +25,7 @@ namespace WireMock.Net.StandAlone.NETCoreApp
|
||||
Stop("AssemblyLoadContext.Default.Unloading");
|
||||
};
|
||||
|
||||
while(true)
|
||||
while (true)
|
||||
{
|
||||
Console.WriteLine($"{DateTime.UtcNow} WireMock.Net server running");
|
||||
Thread.Sleep(sleepTime);
|
||||
@@ -35,7 +35,7 @@ namespace WireMock.Net.StandAlone.NETCoreApp
|
||||
private static void Stop(string why)
|
||||
{
|
||||
Console.WriteLine($"{DateTime.UtcNow} WireMock.Net server stopping because '{why}'");
|
||||
server.Stop();
|
||||
_server.Stop();
|
||||
Console.WriteLine($"{DateTime.UtcNow} WireMock.Net server stopped");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user