示例#1
0
文件: EventHub.cs 项目: sekeys/Phyah
 public void Subscribe(EventDescriptor description)
 {
     Schedule.Schedule(() => { GlobalVariable.EventStore.Store(description.EventName, description); }, TimeSpan.Zero);
 }
示例#2
0
文件: EventHub.cs 项目: sekeys/Phyah
 public Task UnsubscribeAsync(EventDescriptor description)
 {
     return(Schedule.ScheduleAsync(() => { GlobalVariable.EventStore.Unstore(description.EventName, description); }, TimeSpan.Zero));
 }
示例#3
0
文件: EventHub.cs 项目: sekeys/Phyah
            public void Run()
            {
                var descriptor = EventDescriptor.Descriptions(Name, Handler);

                GlobalVariable.EventStore.Unstore(Name, descriptor);
            }