All checks were successful
Dev Publish: Nuget / Publish Dev Packages (push) Successful in 48s
24 lines
575 B
C#
24 lines
575 B
C#
using Microsoft.JSInterop;
|
|
using Moonlight.Frontend.Models;
|
|
|
|
namespace Moonlight.Frontend.Services;
|
|
|
|
public class FrontendService
|
|
{
|
|
private readonly IJSRuntime JsRuntime;
|
|
|
|
public FrontendService(IJSRuntime jsRuntime)
|
|
{
|
|
JsRuntime = jsRuntime;
|
|
}
|
|
|
|
public async Task<FrontendConfiguration> GetConfigurationAsync()
|
|
{
|
|
return await JsRuntime.InvokeAsync<FrontendConfiguration>("frontendConfig.getConfiguration");
|
|
}
|
|
|
|
public async Task ReloadAsync()
|
|
{
|
|
await JsRuntime.InvokeVoidAsync("frontendConfig.reload");
|
|
}
|
|
} |