-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Removed unused reflection events, properly replaced throttling error events, fixed typo in throttled message * Updated EventInvocationExtensions with file scope namespace
- Loading branch information
Showing
6 changed files
with
46 additions
and
729 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -237,3 +237,5 @@ $RECYCLE.BIN/ | |
|
||
# Windows shortcuts | ||
*.lnk | ||
|
||
.idea/* |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using TwitchLib.Communication.Events; | ||
|
||
namespace TwitchLib.Client.Extensions; | ||
|
||
/// <summary> | ||
/// Extends logic for handling events. | ||
/// </summary> | ||
public static class EventInvocationExtensions | ||
{ | ||
/// <summary> | ||
/// Invokes the event handler when it is not null. Returns a completed task otherwise. | ||
/// </summary> | ||
internal static Task TryInvoke<TEventArgs>(this AsyncEventHandler<TEventArgs> eventHandler, object sender, TEventArgs eventArgs) | ||
{ | ||
return eventHandler?.Invoke(sender, eventArgs) ?? Task.CompletedTask; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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
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