using System.Text.Json.Nodes; using Microsoft.AspNetCore.Http; namespace Connected.Rest; internal abstract class ApiFormatter { public HttpContext Context { get; set; } public async Task ParseArguments() { return await OnParseArguments(); } protected abstract Task OnParseArguments(); public async Task RenderError(int statusCode, string message) { await OnRenderError(statusCode, message); } protected abstract Task OnRenderError(int statusCode, string message); public async Task RenderResult(object content) { await OnRenderResult(content); } protected abstract Task OnRenderResult(object content); }