Closed FiniteReality closed 6 years ago
Please, it's an absolutely horrible idea.
If you want to follow the "Discord.Net" approach, a good approach would be to make an async event helper class, akin to https://github.com/RogueException/Discord.Net/blob/dev/src/Discord.Net.Core/Utils/AsyncEvent.cs
This way you preserve ordering of event handlers, and invocations, as well as any exceptions which may occur in your event handlers - which would otherwise be uncaught and would leave tasks in faulted states without being able to be cleaned up
Should be resolved along the lines of commit https://github.com/Devoxin/SharpLink/commit/0ca82fda0f0f8f6e00f7214afc8b5aa612809c7e
Please, it's an absolutely horrible idea.
If you want to follow the "Discord.Net" approach, a good approach would be to make an async event helper class, akin to https://github.com/RogueException/Discord.Net/blob/dev/src/Discord.Net.Core/Utils/AsyncEvent.cs
This way you preserve ordering of event handlers, and invocations, as well as any exceptions which may occur in your event handlers - which would otherwise be uncaught and would leave tasks in faulted states without being able to be cleaned up