/// <summary> /// 构造方法 /// </summary> /// <param name="topic">事件唯一名称</param> /// <param name="description">事件描述</param> /// <param name="scope">事件范围</param> /// <param name="eventInfo">EventInfo实例</param> public EventPublisherInfo(string topic, string description, EventPublisherScope scope, EventInfo eventInfo) { this.topic = topic; this.description = description; this.eventScope = scope; this.eventInfo = eventInfo; subscribers = new Dictionary <string, EventSubscriberInfo>(); }
/// <summary> /// 注册事件发布者 /// </summary> /// <param name="topic">事件唯一名称</param> /// <param name="description">事件描述</param> /// <param name="eventScope">事件范围</param> /// <param name="eventInfo">EventInfo实例</param> public void RegisterEventPublisher(string topic, string description, EventPublisherScope eventScope, EventInfo eventInfo) { AddEventPublisher(new EventPublisherInfo(topic, description, eventScope, eventInfo)); }
/// <summary> /// Initializes a new instance of the <see cref="EventPublisherAttribute"/> class. /// </summary> /// <param name="topic">The topic.</param> /// <param name="eventScope">The event scope.</param> public EventPublisherAttribute(string topic, EventPublisherScope eventScope) : this(topic, string.Empty, eventScope) { }
/// <summary> /// Initializes a new instance of the <see cref="EventPublisherAttribute"/> class. /// </summary> /// <param name="topic">The topic.</param> /// <param name="description">The description.</param> /// <param name="eventScope">The event scope.</param> public EventPublisherAttribute(string topic, string description, EventPublisherScope eventScope) { this.topic = topic; this.description = description; this.eventScope = eventScope; }
/// <summary> /// ���췽�� /// </summary> /// <param name="topic">�¼�Ψһ����</param> /// <param name="description">�¼�����</param> /// <param name="scope">�¼���Χ</param> /// <param name="eventInfo">EventInfoʵ��</param> public EventPublisherInfo(string topic, string description, EventPublisherScope scope, EventInfo eventInfo) { this.topic = topic; this.description = description; this.eventScope = scope; this.eventInfo = eventInfo; subscribers = new Dictionary<string, EventSubscriberInfo>(); }