public IEnumerator <ITask> SubscribeHandler(battery.Subscribe subscribe) { yield return (SubscribeHelper(this.batterySubMgr, subscribe.Body, subscribe.ResponsePort).Choice( success => SendNotificationToTarget( subscribe.Body.Subscriber, this.batterySubMgr, new battery.Replace(this.batteryState)), EmptyHandler)); }
public virtual IEnumerator <ITask> GenericSubscribeHandler(pxbattery.Subscribe subscribe) { base.SubscribeHelper(_subMgrPort, subscribe.Body, subscribe.ResponsePort); if (_state.TimeStamp != DateTime.MinValue) { SendNotificationToTarget <pxbattery.Replace>(subscribe.Body.Subscriber, _subMgrPort, _state.SyncGenericState(ref _genericState)); } yield break; }
public IEnumerator <ITask> SubscribeHandler(battery.Subscribe subscribe) { yield return(Arbiter.Choice( SubscribeHelper(_subMgrPort, subscribe.Body, subscribe.ResponsePort), delegate(SuccessResult success) { SendNotification <battery.Replace>(_subMgrPort, subscribe.Body.Subscriber, new battery.Replace(_state)); }, delegate(Exception fault) { LogError(fault); } )); }