Luski.Net/Luski.net/Interfaces/IServer.cs

37 lines
1.6 KiB
C#
Raw Normal View History

using System.Collections.Generic;
using System.Net.Http;
using System.Text.Json.Serialization.Metadata;
using System.Threading;
using System.Threading.Tasks;
using Luski.net.JsonTypes.BaseTypes;
using Luski.net.Structures;
using Luski.net.Structures.Public;
namespace Luski.net.Interfaces;
public interface IServer
{
public IAppUser IAppUser { get; }
public string Cache { get; }
public void SendServer<Tvalue>(Tvalue Payload, JsonTypeInfo<Tvalue> jsonTypeInfo) where Tvalue : IncomingWSS;
public HttpResponseMessage GetFromServer(string Path, CancellationToken CancellationToken,
params KeyValuePair<string, string?>[] Headers);
public Task GetFromServer(string Path, string File, CancellationToken CancellationToken,
params KeyValuePair<string, string?>[] Headers);
public Task<Tresult> GetFromServer<Tresult>(string Path, JsonTypeInfo<Tresult> Type,
CancellationToken CancellationToken, params KeyValuePair<string, string?>[] Headers)
where Tresult : IncomingHTTP, new();
public Task<Tresult> SendServer<Tvalue, Tresult>(string Path, Tvalue Payload,
JsonTypeInfo<Tvalue> jsonTypeInfo, JsonTypeInfo<Tresult> ReturnjsonTypeInfo,
CancellationToken CancellationToken, params KeyValuePair<string, string?>[] Headers)
where Tvalue : IWebRequest where Tresult : IncomingHTTP, new();
public Task<Tresult> SendServer<Tresult>(string Path, string File, JsonTypeInfo<Tresult> ReturnjsonTypeInfo,
CancellationToken CancellationToken, params KeyValuePair<string, string?>[] Headers)
where Tresult : IncomingHTTP, new();
}