perf!: events refactored throughout all the project to use Event<> class
All delegate events are refactored to use the Event<TSender> and Event<TSender, TArgument> for performance issues regarding delegate events creating garbage, also this gives us better control on event invocation since C# Delegates did also create unnecessary garbage during Delegate.DynamicInvoke
This commit is contained in:
@@ -8,7 +8,7 @@ public interface IHasUniverse : IAssignable
|
||||
/// <summary>
|
||||
/// Event triggered when the <see cref="IUniverse"/> value has has been assigned a new value.
|
||||
/// </summary>
|
||||
event UniverseAssignedEventHandler? OnUniverseAssigned;
|
||||
Event<IHasUniverse> OnUniverseAssigned { get; }
|
||||
|
||||
/// <inheritdoc cref="IUniverse" />
|
||||
IUniverse Universe { get; }
|
||||
@@ -21,6 +21,4 @@ public interface IHasUniverse : IAssignable
|
||||
/// <see cref="true"/>, if the value given assigned successfully assigned, <see cref="false"/> if not.
|
||||
/// </returns>
|
||||
bool Assign(IUniverse universe);
|
||||
|
||||
delegate void UniverseAssignedEventHandler(IHasUniverse sender);
|
||||
}
|
||||
|
Reference in New Issue
Block a user