mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 14:20:29 +01:00
* Add TIOBE + include SonarAnalyzer.CSharp * . * cp * Copyright © WireMock.Net * more fixes * fix * xpath * if (Matchers == null || !Matchers.Any()) * if (Matchers != null) * ? * . * .
29 lines
610 B
C#
29 lines
610 B
C#
// Copyright © WireMock.Net
|
|
|
|
using Microsoft.Extensions.Hosting;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace WireMock.Net.WebApplication;
|
|
|
|
public class App : IHostedService
|
|
{
|
|
private readonly IWireMockService _service;
|
|
|
|
public App(IWireMockService service)
|
|
{
|
|
_service = service;
|
|
}
|
|
|
|
public Task StartAsync(CancellationToken cancellationToken)
|
|
{
|
|
_service.Start();
|
|
return Task.CompletedTask;
|
|
}
|
|
|
|
public Task StopAsync(CancellationToken cancellationToken)
|
|
{
|
|
_service.Stop();
|
|
return Task.CompletedTask;
|
|
}
|
|
} |