mirror of
https://github.com/wagesj45/CapyKit.git
synced 2024-12-21 21:02:30 -06:00
Fixed key error in CapyEvent
This commit is contained in:
parent
b6a1d6a9d0
commit
6d1980f279
1 changed files with 3 additions and 3 deletions
|
@ -49,7 +49,7 @@ namespace CapyKit
|
||||||
/// </param>
|
/// </param>
|
||||||
public static void Subscribe(CapyEventHandler callback, EventLevel subscriptionLevel, [CallerMemberName] string origin = null)
|
public static void Subscribe(CapyEventHandler callback, EventLevel subscriptionLevel, [CallerMemberName] string origin = null)
|
||||||
{
|
{
|
||||||
if (!subscribers[subscriptionLevel].Any())
|
if (!subscribers.ContainsKey(subscriptionLevel))
|
||||||
{
|
{
|
||||||
subscribers.Add(subscriptionLevel, new List<(CapyEventHandler Handler, string origin)>());
|
subscribers.Add(subscriptionLevel, new List<(CapyEventHandler Handler, string origin)>());
|
||||||
}
|
}
|
||||||
|
@ -97,7 +97,7 @@ namespace CapyKit
|
||||||
/// </code>
|
/// </code>
|
||||||
/// </example>
|
/// </example>
|
||||||
/// <seealso cref="CallerMemberNameAttribute"/>
|
/// <seealso cref="CallerMemberNameAttribute"/>
|
||||||
internal static void EmitEvent(EventLevel eventLevel, string message, [CallerMemberName] string method = null, params object[] args)
|
public static void EmitEvent(EventLevel eventLevel, string message, [CallerMemberName] string method = null, params object[] args)
|
||||||
{
|
{
|
||||||
if (!subscribers.ContainsKey(eventLevel))
|
if (!subscribers.ContainsKey(eventLevel))
|
||||||
{
|
{
|
||||||
|
@ -137,7 +137,7 @@ namespace CapyKit
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <seealso cref="CallerMemberNameAttribute"/>
|
/// <seealso cref="CallerMemberNameAttribute"/>
|
||||||
/// <seealso cref="Guid"/>
|
/// <seealso cref="Guid"/>
|
||||||
internal static void EmitEventOnce(EventLevel eventLevel, string message, string uniqueIdentifier, [CallerMemberName] string method = null, params object[] args)
|
public static void EmitEventOnce(EventLevel eventLevel, string message, string uniqueIdentifier, [CallerMemberName] string method = null, params object[] args)
|
||||||
{
|
{
|
||||||
if(uniqueIdentifiers.Contains(uniqueIdentifier))
|
if(uniqueIdentifiers.Contains(uniqueIdentifier))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue