public override IEnumerator ReceivePayload(VisualPayload payload) { var csIndex = (uint)CsIndex.GetFirstValue(payload.Data); //var csInfoCommand = new getcs #region Data query var csStatsCommand = new GetCsInfoCommand(csIndex); var commandIterator = CommandProcessor.Execute(csStatsCommand); while (commandIterator.MoveNext()) { yield return(null); } CsStatsTarget.SetValue(PopulateCsStats(csStatsCommand.CsInfo), payload.Data); #endregion #region Use default information //CsStatsTarget.SetValue( PopulateCsStats( DefaultChallengeSetStats ), payload.Data ); #endregion var binsetCommand = new GetBinsetCommand(csStatsCommand.CsInfo.Binary); commandIterator = CommandProcessor.Execute(binsetCommand); while (commandIterator.MoveNext()) { yield return(null); } var binList = new List <BinaryStats>(); foreach (var binId in binsetCommand.BinIds) { var binInfoCommand = new GetBinaryStatsCommand(binId); commandIterator = CommandProcessor.Execute(binInfoCommand); while (commandIterator.MoveNext()) { yield return(null); } binList.Add(binInfoCommand.BinStats); } BinaryStatsTarget.SetValue(PopulateBinaryStats( binList), payload.Data); var iterator = Router.TransmitAll(payload); while (iterator.MoveNext()) { yield return(null); } }
public override IEnumerator ReceivePayload(VisualPayload payload) { var binsetId = (uint)BinsetId.GetFirstValue(payload.Data); var binsetCommand = new GetBinsetCommand(binsetId); var commandIterator = CommandProcessor.Execute(binsetCommand); while (commandIterator.MoveNext()) { yield return(null); } var binList = new List <BinaryStats>(); foreach (var binId in binsetCommand.BinIds) { var binInfoCommand = new GetBinaryStatsCommand(binId); commandIterator = CommandProcessor.Execute(binInfoCommand); while (commandIterator.MoveNext()) { yield return(null); } binList.Add(binInfoCommand.BinStats); } BinaryStatsTarget.SetValue(CsStatsAdapter.PopulateBinaryStats( binList), payload.Data); var iterator = Router.TransmitAll(payload); while (iterator.MoveNext()) { yield return(null); } }