Initialer Commit: Projekteinrichtung und erste Implementierung
- Erstellte Lösungsstruktur und Projektdateien - Hinzugefügte grundlegende Abstraktionen und Client-Services - Implementierte anfängliche Antwortverarbeitungsklassen - Einrichtung von Dependency Injection und Konfigurationsoptionen
This commit is contained in:
14
src/WindreamHub.Abstractions/Client/Endpoint.cs
Normal file
14
src/WindreamHub.Abstractions/Client/Endpoint.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace WindreamHub.Abstractions.Client
|
||||
{
|
||||
public record BaseEndpoint(string Route);
|
||||
|
||||
public record SystemDetails(string Route) : BaseEndpoint(Route)
|
||||
{
|
||||
public required Func<Task<SimplifiedResponse<dynamic, dynamic>>> GetAsync { get; init; }
|
||||
}
|
||||
|
||||
public record Subscriptions(string Route) : BaseEndpoint(Route)
|
||||
{
|
||||
public required Func<Task<SimplifiedResponse<dynamic, dynamic>>> GetEventsAsync { get; init; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using DigitalData.Core.Abstractions.Client;
|
||||
using System.ComponentModel.Design;
|
||||
|
||||
namespace WindreamHub.Abstractions.Client
|
||||
{
|
||||
public interface IWindreamClientService : IBaseHttpClientService
|
||||
{
|
||||
public Subscriptions Subscriptions { get; }
|
||||
|
||||
public SystemDetails SystemDetails { get; }
|
||||
}
|
||||
}
|
||||
6
src/WindreamHub.Abstractions/Client/Response.cs
Normal file
6
src/WindreamHub.Abstractions/Client/Response.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
using System.Net;
|
||||
|
||||
namespace WindreamHub.Abstractions.Client
|
||||
{
|
||||
public record SimplifiedResponse<TData, TError>(bool Ok, HttpStatusCode Status, TData Data, TError Error);
|
||||
}
|
||||
@@ -6,4 +6,8 @@
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DigitalData.Core.Abstractions" Version="1.0.1.1" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user