Exemplo n.º 1
0
        protected override SequencedRepeatPair ProduceTransmissionFunc(VisualPayload payload)
        {
            var sequencedPair = new SequencedRepeatPair();

            var transmissionStack = new Queue <VisualPayload>();

            PopulateTransmissions(transmissionStack, payload);

            //var finalTransmission = new TransmitWaitPair(payload, EndSequenceState);

            if (!transmissionStack.Any())
            {
                sequencedPair.PerStepFuncComplete = () => true;

                sequencedPair.RepeatPairIsCompleted = true;
            }
            else
            {
                sequencedPair.PerStepFuncComplete = () =>
                {
                    var transmit = transmissionStack.Dequeue();

                    JobManager.Instance.StartJob(
                        PerSequenceState.Transmit(transmit), jobName: "Per Step", startImmediately: true,
                        maxExecutionsPerFrame: 100);

                    return(!transmissionStack.Any());
                };
            }

            sequencedPair.ConcludeFunc = ProduceDefaultConclude(payload);

            return(sequencedPair);
        }
Exemplo n.º 2
0
        protected override SequencedRepeatPair ProduceTransmissionFunc(VisualPayload payload)
        {
            var sequencedPair = new SequencedRepeatPair();

            sequencedPair.PerStepFuncComplete = () =>
            {
                JobManager.Instance.StartJob(
                    PerSequenceState.Transmit(payload), jobName: "Per Step", startImmediately: true,
                    maxExecutionsPerFrame: 100);

                return(false);
            };

            sequencedPair.ConcludeFunc = ProduceDefaultConclude(payload);

            return(sequencedPair);
        }