示例#1
0
        private static void HandleSubscriber(object item, bool register, MethodInfo info,
                                             EventSubscriptionAttribute attr, WorkItem workItem)
        {
            EventTopic topic = workItem.EventTopics[attr.Topic];

            if (register == true)
            {
                Type[] paramTypes = GetParamTypes(info);

                topic.AddSubscription(item, info.Name, paramTypes, workItem, attr.Thread);
            }
            else
            {
                topic.RemoveSubscription(item, info.Name);
            }
        }