Exemple #1
0
 /// <summary>
 /// Unregisters for notification of the <see>ProfileLookupFailed</see> event at the specified priority.
 /// </summary>
 /// <remarks>
 /// <para>The event system in the JinxBot API supports normal event registration and prioritized event registration.  You can use
 /// normal syntax to register for events at <see cref="Priority">Normal priority</see>, so no special registration is needed; this is
 /// accessed through normal event handling syntax (the += syntax in C#, or the <see langword="Handles" lang="VB" /> in Visual Basic.</para>
 /// <para>Events in the JinxBot API are never guaranteed to be executed on the UI thread.  Events that affect the user interface should
 /// be marshaled back to the UI thread by the event handling code.  Generally, high-priority event handlers are
 /// raised on the thread that is parsing data from Battle.net, and lower-priority event handler are executed from the thread pool.</para>
 /// <para>JinxBot guarantees that all event handlers will be fired regardless of exceptions raised in previous event handlers.  However,
 /// if a plugin repeatedly raises an exception, it may be forcefully unregistered from events.</para>
 ///	<para>To be well-behaved within JinxBot, plugins should always unregister themselves when they are being unloaded or when they
 /// otherwise need to do so.  Plugins may opt-in to a Reflection-based event handling registration system which uses attributes to
 /// mark methods that should be used as event handlers.</para>
 /// </remarks>
 /// <param name="p">The priority from which to unregister.</param>
 /// <param name="callback">The event handler that should be unregistered for this event.</param>
 /// <seealso cref="ProfileLookupFailed" />
 /// <seealso cref="RegisterProfileLookupFailedNotification" />
 public void UnregisterProfileLookupFailedNotification(Priority p, ProfileLookupFailedEventHandler callback)
 {
     if (__ProfileLookupFailed.ContainsKey(p))
     {
         __ProfileLookupFailed[p].Remove(callback);
     }
 }
Exemple #2
0
 /// <summary>
 /// Registers for notification of the <see>ProfileLookupFailed</see> event at the specified priority.
 /// </summary>
 /// <remarks>
 /// <para>The event system in the JinxBot API supports normal event registration and prioritized event registration.  You can use
 /// normal syntax to register for events at <see cref="Priority">Normal priority</see>, so no special registration is needed; this is
 /// accessed through normal event handling syntax (the += syntax in C#, or the <see langword="Handles" lang="VB" /> in Visual Basic.</para>
 /// <para>Events in the JinxBot API are never guaranteed to be executed on the UI thread.  Events that affect the user interface should
 /// be marshaled back to the UI thread by the event handling code.  Generally, high-priority event handlers are
 /// raised on the thread that is parsing data from Battle.net, and lower-priority event handler are executed from the thread pool.</para>
 /// <para>JinxBot guarantees that all event handlers will be fired regardless of exceptions raised in previous event handlers.  However,
 /// if a plugin repeatedly raises an exception, it may be forcefully unregistered from events.</para>
 ///	<para>To be well-behaved within JinxBot, plugins should always unregister themselves when they are being unloaded or when they
 /// otherwise need to do so.  Plugins may opt-in to a Reflection-based event handling registration system which uses attributes to
 /// mark methods that should be used as event handlers.</para>
 /// </remarks>
 /// <param name="p">The priority at which to register.</param>
 /// <param name="callback">The event handler that should be registered for this event.</param>
 /// <seealso cref="ProfileLookupFailed" />
 /// <seealso cref="UnregisterProfileLookupFailedNotification" />
 public void RegisterProfileLookupFailedNotification(Priority p, ProfileLookupFailedEventHandler callback)
 {
     lock (__ProfileLookupFailed)
     {
         if (!__ProfileLookupFailed.ContainsKey(p))
         {
             __ProfileLookupFailed.Add(p, new List <ProfileLookupFailedEventHandler>());
         }
     }
     __ProfileLookupFailed[p].Add(callback);
 }
 /// <summary>
 /// Unregisters for notification of the <see>ProfileLookupFailed</see> event at the specified priority.
 /// </summary>
 /// <remarks>
 /// <para>The event system in the JinxBot API supports normal event registration and prioritized event registration.  You can use
 /// normal syntax to register for events at <see cref="Priority">Normal priority</see>, so no special registration is needed; this is 
 /// accessed through normal event handling syntax (the += syntax in C#, or the <see langword="Handles" lang="VB" /> in Visual Basic.</para>
 /// <para>Events in the JinxBot API are never guaranteed to be executed on the UI thread.  Events that affect the user interface should
 /// be marshaled back to the UI thread by the event handling code.  Generally, high-priority event handlers are
 /// raised on the thread that is parsing data from Battle.net, and lower-priority event handler are executed from the thread pool.</para>
 /// <para>JinxBot guarantees that all event handlers will be fired regardless of exceptions raised in previous event handlers.  However, 
 /// if a plugin repeatedly raises an exception, it may be forcefully unregistered from events.</para>
 ///	<para>To be well-behaved within JinxBot, plugins should always unregister themselves when they are being unloaded or when they 
 /// otherwise need to do so.  Plugins may opt-in to a Reflection-based event handling registration system which uses attributes to 
 /// mark methods that should be used as event handlers.</para>
 /// </remarks>
 /// <param name="p">The priority from which to unregister.</param>
 /// <param name="callback">The event handler that should be unregistered for this event.</param>
 /// <seealso cref="ProfileLookupFailed" />
 /// <seealso cref="RegisterProfileLookupFailedNotification" />
 public void UnregisterProfileLookupFailedNotification(Priority p, ProfileLookupFailedEventHandler callback)
 {
     if (__ProfileLookupFailed.ContainsKey(p))
     {
         __ProfileLookupFailed[p].Remove(callback);
     }
 }
 /// <summary>
 /// Registers for notification of the <see>ProfileLookupFailed</see> event at the specified priority.
 /// </summary>
 /// <remarks>
 /// <para>The event system in the JinxBot API supports normal event registration and prioritized event registration.  You can use
 /// normal syntax to register for events at <see cref="Priority">Normal priority</see>, so no special registration is needed; this is 
 /// accessed through normal event handling syntax (the += syntax in C#, or the <see langword="Handles" lang="VB" /> in Visual Basic.</para>
 /// <para>Events in the JinxBot API are never guaranteed to be executed on the UI thread.  Events that affect the user interface should
 /// be marshaled back to the UI thread by the event handling code.  Generally, high-priority event handlers are
 /// raised on the thread that is parsing data from Battle.net, and lower-priority event handler are executed from the thread pool.</para>
 /// <para>JinxBot guarantees that all event handlers will be fired regardless of exceptions raised in previous event handlers.  However, 
 /// if a plugin repeatedly raises an exception, it may be forcefully unregistered from events.</para>
 ///	<para>To be well-behaved within JinxBot, plugins should always unregister themselves when they are being unloaded or when they 
 /// otherwise need to do so.  Plugins may opt-in to a Reflection-based event handling registration system which uses attributes to 
 /// mark methods that should be used as event handlers.</para>
 /// </remarks>
 /// <param name="p">The priority at which to register.</param>
 /// <param name="callback">The event handler that should be registered for this event.</param>
 /// <seealso cref="ProfileLookupFailed" />
 /// <seealso cref="UnregisterProfileLookupFailedNotification" />
 public void RegisterProfileLookupFailedNotification(Priority p, ProfileLookupFailedEventHandler callback)
 {
     lock (__ProfileLookupFailed)
     {
         if (!__ProfileLookupFailed.ContainsKey(p))
         {
             __ProfileLookupFailed.Add(p, new List<ProfileLookupFailedEventHandler>());
         }
     }
     __ProfileLookupFailed[p].Add(callback);
 }