예제 #1
0
        private void LoadBooks(int page)
        {
            Action <string> action = async(token) =>
            {
                BooksClient.Token = token;
                Books             = await BooksClient.ListBooks(page, 10);

                StateHasChanged();
            };

            ((MonoWebAssemblyJSRuntime)JSRuntime).InvokeUnmarshalled <Action <string>, bool>("blazorDemoInterop.executeWithToken", action);
        }
예제 #2
0
        private async Task LoadBooks(int page)
        {
            Action <string> action = async(token) =>
            {
                BooksClient.Token = token;
                Books             = await BooksClient.ListBooks(page);

                StateHasChanged();
            };

            await JSRuntime.Current.InvokeAsync <bool>("blazorDemoInterop.executeWithToken", action);
        }
예제 #3
0
 private async Task LoadBooks(int page)
 {
     Books = await BooksClient.ListBooks(page);
 }