Added GpioService.
This commit is contained in:
parent
a160a894d3
commit
d41603a8af
|
|
@ -1,3 +1,5 @@
|
|||
using Proculite.GpioRest.Services;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
|
|
@ -6,6 +8,8 @@ builder.Services.AddEndpointsApiExplorer();
|
|||
builder.Services.AddSwaggerGen();
|
||||
builder.Services.AddControllers();
|
||||
|
||||
builder.Services.AddSingleton<GpioService>();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
app.MapControllers();
|
||||
|
|
|
|||
11
Proculite.GpioRest/Services/GpioService.cs
Normal file
11
Proculite.GpioRest/Services/GpioService.cs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
namespace Proculite.GpioRest.Services
|
||||
{
|
||||
public class GpioService
|
||||
{
|
||||
public readonly ILogger<GpioService> _logger;
|
||||
public GpioService(ILogger<GpioService> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue