public void Subscribe(EventDescriptor description) { Schedule.Schedule(() => { GlobalVariable.EventStore.Store(description.EventName, description); }, TimeSpan.Zero); }
public Task UnsubscribeAsync(EventDescriptor description) { return(Schedule.ScheduleAsync(() => { GlobalVariable.EventStore.Unstore(description.EventName, description); }, TimeSpan.Zero)); }
public void Run() { var descriptor = EventDescriptor.Descriptions(Name, Handler); GlobalVariable.EventStore.Unstore(Name, descriptor); }