public EventData(PacketType packetType, PluginHandle target, BotEventHandler eventHandler, BotEventHandlerAttribute attribute) { Target = target; PacketType = packetType; EventHandler = eventHandler; Attribute = attribute; }
/// <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); }
/// <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)); }