1
This commit is contained in:
@@ -34,6 +34,15 @@ namespace BITKit
|
||||
private readonly Dictionary<string, List<object>> events = new();
|
||||
private readonly Dictionary<string, object> dictionary = new();
|
||||
public const string defaultEventName = nameof(GenericEvent);
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
_directDirection.Clear();
|
||||
events.Clear();
|
||||
dictionary.Clear();
|
||||
}
|
||||
|
||||
|
||||
public void AddListener<T>(Action<T> action) =>
|
||||
AddListener<T>(defaultEventName, action);
|
||||
public void Invoke<T>(T value) =>
|
||||
@@ -182,5 +191,7 @@ namespace BITKit
|
||||
{
|
||||
return dictionary.TryGetValue(key, out value);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user