Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/soenneker/soenneker.blazor.utils.blazorinvoker
A generic invoker to simplify JavaScript to C# interaction
https://github.com/soenneker/soenneker.blazor.utils.blazorinvoker
blazor blazorinvoker csharp dotnet invoke invoker util utils
Last synced: about 11 hours ago
JSON representation
A generic invoker to simplify JavaScript to C# interaction
- Host: GitHub
- URL: https://github.com/soenneker/soenneker.blazor.utils.blazorinvoker
- Owner: soenneker
- License: mit
- Created: 2024-01-13T15:02:12.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-22T15:54:22.000Z (8 months ago)
- Last Synced: 2024-05-22T17:01:09.177Z (8 months ago)
- Topics: blazor, blazorinvoker, csharp, dotnet, invoke, invoker, util, utils
- Language: C#
- Homepage: https://soenneker.com
- Size: 323 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
[![](https://img.shields.io/nuget/v/soenneker.blazor.utils.blazorinvoker.svg?style=for-the-badge)](https://www.nuget.org/packages/soenneker.blazor.utils.blazorinvoker/)
[![](https://img.shields.io/github/actions/workflow/status/soenneker/soenneker.blazor.utils.blazorinvoker/publish-package.yml?style=for-the-badge)](https://github.com/soenneker/soenneker.blazor.utils.blazorinvoker/actions/workflows/publish-package.yml)
[![](https://img.shields.io/nuget/dt/soenneker.blazor.utils.blazorinvoker.svg?style=for-the-badge)](https://www.nuget.org/packages/soenneker.blazor.utils.blazorinvoker/)# ![](https://user-images.githubusercontent.com/4441470/224455560-91ed3ee7-f510-4041-a8d2-3fc093025112.png) Soenneker.Blazor.Utils.BlazorInvoker
### A generic invoker to simplify JavaScript to C# interaction`BlazorInvoker` is an encapsulation class designed as a generic invocation point from JS to C#. It's used for 'fire-and-forget' with no return value.
## Installation
```
dotnet add package Soenneker.Blazor.Utils.BlazorInvoker
```## Usage
### C#
```csharp
var stringInvoker = new BlazorInvoker(async (input) =>
{
await SomeAsyncOperation(input);
});
```### JS
```javascript
dotnetObject.invokeMethodAsync('Invoke', 'JavaScript argument');
```