public void Subscribe(RtdServerUpdateNotify notify) { this.notify = notify; if (this.IsSubscribedChanged != null) { IsSubscribedChanged(this, true); } }
public void Unsubscribe() { this.notify = null; if (this.IsSubscribedChanged != null) { IsSubscribedChanged(this, false); } }
public void Unsubscribe() { this.notify = null; lock (this.item.cellTickers) { this.item.cellTickers.Remove(this); } this.item.cellCount.Value = this.item.cellTickers.Count; item.CountSubscriptions(); }
public dynamic ConnectData(int TopicID, ref Array Strings, ref bool GetNewValues) { GetNewValues = true; string[] args = new string[Strings.Length]; for (int k = 0; k < args.Length; k++) { args[k] = (string)Strings.GetValue(k); } IRtdServerTicker ticker = null; foreach (var router in routers) { ticker = router.TryGetTicker(args); if (ticker != null) { break; } } this.tickers[TopicID] = ticker; if (ticker == null) { return(ExcelError.Name); } else { RtdServerUpdateNotify notify = new RtdServerUpdateNotify(delegate() { lock (this.staleTickers) { this.staleTickers.Add(TopicID); } if (!this.notified) { this.notified = true; this.dispatcher.BeginInvoke(updateNotify, null); } }); ticker.Subscribe(notify); return(ticker.Value); } }
public void Subscribe(RtdServerUpdateNotify notify) { this.notify = notify; }
public void Unsubscribe() { this.notify = null; lock(this.item.cellTickers) { this.item.cellTickers.Remove(this); } this.item.cellCount.Value = this.item.cellTickers.Count; item.CountSubscriptions(); }
public dynamic ConnectData(int TopicID, ref Array Strings, ref bool GetNewValues) { GetNewValues = true; string[] args = new string[Strings.Length]; for(int k = 0; k < args.Length; k++) args[k] = (string) Strings.GetValue(k); IRtdServerTicker ticker = null; foreach(var router in routers) { ticker = router.TryGetTicker(args); if(ticker != null) break; } this.tickers[TopicID] = ticker; if(ticker == null) { return ExcelError.Name; } else { RtdServerUpdateNotify notify = new RtdServerUpdateNotify(delegate() { lock (this.staleTickers) { this.staleTickers.Add(TopicID); } if(!this.notified) { this.notified = true; this.dispatcher.BeginInvoke(updateNotify, null); } }); ticker.Subscribe(notify); return ticker.Value; } }
public void Unsubscribe() { this.notify = null; if(this.IsSubscribedChanged != null) IsSubscribedChanged(this, false); }
public void Subscribe(RtdServerUpdateNotify notify) { this.notify = notify; if(this.IsSubscribedChanged != null) IsSubscribedChanged(this, true); }