This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using UniRx.Async; | |
public delegate UniTask EventHandlerAsync(object sender, EventArgs e); | |
public static class EventHandlerAsyncExtensions | |
{ | |
public static UniTask InvokeAsync(this EventHandlerAsync handler, object sender, EventArgs e) | |
{ | |
Delegate[] delegates = handler?.GetInvocationList(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public delegate UniTask ActionAsync(CancellationToken cancellationToken); | |
public delegate UniTask ActionAsync<in T>(T value, CancellationToken cancellationToken); | |
public static class ActionAsyncExtensions | |
{ | |
public static UniTask InvokeAsync(this ActionAsync handler, CancellationToken cancellationToken) | |
{ | |
Delegate[] delegates = handler?.GetInvocationList(); |