Exemplo n.º 1
0
        private void Search(string term, int page)
        {
            Action <string> action = async(token) =>
            {
                BooksClient.Token = token;
                Books             = await BooksClient.SearchBooks(term, page);

                StateHasChanged();
            };

            ((MonoWebAssemblyJSRuntime)JSRuntime).InvokeUnmarshalled <Action <string>, bool>("blazorDemoInterop.executeWithToken", action);
        }
Exemplo n.º 2
0
        private async Task Search(string term, int page)
        {
            Action <string> action = async(token) =>
            {
                BooksClient.Token = token;
                Books             = await BooksClient.SearchBooks(term, page);

                StateHasChanged();
            };

            await JSRuntime.Current.InvokeAsync <bool>("blazorDemoInterop.executeWithToken", action);
        }