protected void LoadBook(int id) { Action <string> action = async(token) => { BooksClient.Token = token; CurrentBook = await BooksClient.GetBook(id); StateHasChanged(); }; ((MonoWebAssemblyJSRuntime)JSRuntime).InvokeUnmarshalled <Action <string>, bool>("blazorDemoInterop.executeWithToken", action); }
protected async void LoadBook(int id) { Action <string> action = async(token) => { BooksClient.Token = token; CurrentBook = await BooksClient.GetBook(id); StateHasChanged(); }; //RegisteredFunction.InvokeUnmarshalled<bool>("executeWithToken", action); await JSRuntime.Current.InvokeAsync <bool>("blazorDemoInterop.executeWithToken", action); }
protected async Task LoadBook(int id) { CurrentBook = await BooksClient.GetBook(id); }