Class EventListener
- Namespace
- MudBlazor
- Assembly
- MudBlazor.dll
public class EventListener : IEventListener, IAsyncDisposable, IDisposable
- Inheritance
-
EventListener
- Implements
-
- Inherited Members
-
- Extension Methods
-
Constructors
EventListener(IJSRuntime)
public EventListener(IJSRuntime runtime)
Parameters
runtime
IJSRuntime
Methods
Dispose()
Dispose(bool)
protected virtual void Dispose(bool disposing)
Parameters
disposing
bool
DisposeAsync()
public ValueTask DisposeAsync()
Returns
- ValueTask
OnEventOccur(Guid, string)
[JSInvokable]
public Task OnEventOccur(Guid key, string eventData)
Parameters
key
Guid
eventData
string
Returns
- Task
SubscribeGlobal<T>(string, int, Func<object, Task>)
public Task<Guid> SubscribeGlobal<T>(string eventName, int throotleInterval, Func<object, Task> callback)
Parameters
eventName
string
throotleInterval
int
callback
Func<object, Task>
Returns
- Task<Guid>
Type Parameters
T
Subscribe<T>(string, string, string, int, Func<object, Task>)
public Task<Guid> Subscribe<T>(string eventName, string elementId, string projectionName, int throotleInterval, Func<object, Task> callback)
Parameters
eventName
string
elementId
string
projectionName
string
throotleInterval
int
callback
Func<object, Task>
Returns
- Task<Guid>
Type Parameters
T
Unsubscribe(Guid)
public Task<bool> Unsubscribe(Guid key)
Parameters
key
Guid
Returns
- Task<bool>