Exemplo n.º 1
0
 /// <summary>
 /// Unregisters for notification of the <see>RealmConnectionFailed</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="RealmConnectionFailed" />
 /// <seealso cref="RegisterRealmConnectionFailedNotification" />
 public void UnregisterRealmConnectionFailedNotification(Priority p, RealmFailedEventHandler callback)
 {
     if (__RealmConnectionFailed.ContainsKey(p))
     {
         __RealmConnectionFailed[p].Remove(callback);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Registers for notification of the <see>RealmConnectionFailed</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="RealmConnectionFailed" />
 /// <seealso cref="UnregisterRealmConnectionFailedNotification" />
 public void RegisterRealmConnectionFailedNotification(Priority p, RealmFailedEventHandler callback)
 {
     lock (__RealmConnectionFailed)
     {
         if (!__RealmConnectionFailed.ContainsKey(p))
         {
             __RealmConnectionFailed.Add(p, new List <RealmFailedEventHandler>());
         }
     }
     __RealmConnectionFailed[p].Add(callback);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Unregisters for notification of the <see>RealmConnectionFailed</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="RealmConnectionFailed" />
 /// <seealso cref="RegisterRealmConnectionFailedNotification" />
 public void UnregisterRealmConnectionFailedNotification(Priority p, RealmFailedEventHandler callback)
 {
     if (__RealmConnectionFailed.ContainsKey(p))
     {
         __RealmConnectionFailed[p].Remove(callback);
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// Registers for notification of the <see>RealmConnectionFailed</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="RealmConnectionFailed" />
 /// <seealso cref="UnregisterRealmConnectionFailedNotification" />
 public void RegisterRealmConnectionFailedNotification(Priority p, RealmFailedEventHandler callback)
 {
     lock (__RealmConnectionFailed)
     {
         if (!__RealmConnectionFailed.ContainsKey(p))
         {
             __RealmConnectionFailed.Add(p, new List<RealmFailedEventHandler>());
         }
     }
     __RealmConnectionFailed[p].Add(callback);
 }