Add IPMonitor
This commit is contained in:
26
IPMonitor/Executor.cs
Executable file
26
IPMonitor/Executor.cs
Executable file
@@ -0,0 +1,26 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
namespace IPMonitor
|
||||
{
|
||||
public class Executor
|
||||
{
|
||||
private readonly IConfiguration _configuration;
|
||||
private readonly IMainService _mainService;
|
||||
private readonly IArguments _arguments;
|
||||
|
||||
public Executor(IMainService mainService,IConfigurationRoot configuration,IArguments arguments)
|
||||
{
|
||||
_configuration = configuration ?? throw new ArgumentException(nameof(configuration));
|
||||
_mainService = mainService ?? throw new ArgumentException(nameof(mainService));
|
||||
_arguments = arguments ?? throw new ArgumentException(nameof(arguments));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This is essentially the starting point where we bootstrap the legacy entry point
|
||||
/// </summary>
|
||||
public void Execute()
|
||||
{
|
||||
_mainService.RunService(_arguments.GetArguments(), _configuration);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user