Initial work on getting minimal API to work
This commit is contained in:
31
AS1024.GeoFeed.MinimalAPI/GeoFeedAoTProvider.cs
Normal file
31
AS1024.GeoFeed.MinimalAPI/GeoFeedAoTProvider.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using AS1024.GeoFeed.Core.GeoFeedProviders;
|
||||
using AS1024.GeoFeed.Core.Interfaces;
|
||||
using AS1024.GeoFeed.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization.Metadata;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AS1024.GeoFeed.MinimalAPI
|
||||
{
|
||||
internal class NetboxAoTGeoFeedProvider : NetBoxGeoFeedProvider, IGeoFeedProvider
|
||||
{
|
||||
private readonly JsonSerializerOptions appJsonSerializer;
|
||||
|
||||
public NetboxAoTGeoFeedProvider(IConfiguration configuration,
|
||||
ILogger<NetBoxGeoFeedProvider> logger,
|
||||
IHttpClientFactory httpClientFactory)
|
||||
: base(configuration, logger, httpClientFactory)
|
||||
{
|
||||
}
|
||||
|
||||
protected override NetboxData? DeserializeJsonData(string stringResult)
|
||||
{
|
||||
return JsonSerializer.Deserialize(stringResult, AppJsonSerializerContext.Default.NetboxData);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user