Exemple #1
0
 public EventData(PacketType packetType, PluginHandle target, BotEventHandler eventHandler, BotEventHandlerAttribute attribute)
 {
     Target = target;
     PacketType = packetType;
     EventHandler = eventHandler;
     Attribute = attribute;
 }
Exemple #2
0
 /// <summary>
 /// Prevents a default instance of the <see cref="PluginHandle"/> class from being created.
 /// </summary>
 /// <param name="method">The method.</param>
 private PluginHandle(BotEventHandler method)
 {
     Initialize(method);
 }
Exemple #3
0
 /// <summary>
 /// Gets the a plugin handle for the handler.
 /// </summary>
 /// <param name="method">The method.</param>
 /// <returns>Plugin handle.</returns>
 public static PluginHandle Get(BotEventHandler method)
 {
     return HandleCache.GetValueOrAdd(method.Target.GetType(), () => new PluginHandle(method));
 }