Event Event() { var senderId = ThisId() + "##" + HubGateway.LocalAddress(); var eventId = DateTime.Now.Ticks ^ ThisId(); return(new Event(senderId, eventId, DateTime.Now)); }
public override Task ActivateAsync() { hub = HubGateway.GetLocalHub(); buffer = new Queue <Notification>(); RegisterTimer(Flush, null, flushPeriod, flushPeriod); return(TaskDone.Done); }
public Task Publish(Notification[] notifications) { if (listeners.Count > 0) { listeners.Notify(x => x.On(notifications, HubGateway.LocalHubId())); } return(TaskDone.Done); }
Task Publish(object arg) { return(HubGateway.Publish(Event())); }