private bool HandleNonDelayedPersistedDependencyInput(Computation computation, ITransformationContext context, IList list, MultipleResultAwaitingPersistor delayPersistor, GeneralTransformationRule dependent, object[] dependencyInput)
        {
            var needDelayedPersistor = false;
            var comp2 = context.CallTransformation(dependent, dependencyInput);

            if (!comp2.IsDelayed)
            {
                if (comp2.Output != null)
                {
                    var lockList = context.IsThreadSafe;
                    if (lockList)
                    {
                        lock (list)
                        {
                            list.Add(comp2.Output);
                        }
                    }
                    else
                    {
                        list.Add(comp2.Output);
                    }
                }
            }
            else
            {
                needDelayedPersistor = true;
                delayPersistor.WaitFor(comp2);
            }

            computation.MarkRequireInternal(comp2, ExecuteBefore, this);
            return(needDelayedPersistor);
        }
        private void HandleDelayedDependencyInput(Computation computation, ITransformationContext context, IList list, MultipleResultAwaitingPersistor delayPersistor, object[] dependencyInput)
        {
            GeneralTransformationRule dependent = DependencyTransformation;
            var comp2 = context.CallTransformation(dependent, dependencyInput);

            if (!comp2.IsDelayed)
            {
                if (comp2.Output != null)
                {
                    if (context.IsThreadSafe)
                    {
                        lock (list)
                        {
                            list.Add(comp2.Output);
                        }
                    }
                    else
                    {
                        list.Add(comp2.Output);
                    }
                }
            }
            else
            {
                computation.DelayOutputAtLeast(comp2.Context.MinOutputDelayLevel);
                delayPersistor.WaitFor(comp2);
            }

            if (ExecuteBefore)
            {
                computation.DelayTransformationAtLeast(comp2.Context.MinTransformDelayLevel);
            }
            else
            {
                comp2.DelayTransformationAtLeast(computation.Context.MinTransformDelayLevel);
            }
        }
Example #3
0
        private void HandleDelayedDependencyInput(Computation computation, ITransformationContext context, IList list, MultipleResultAwaitingPersistor delayPersistor, object[] dependencyInput)
        {
            GeneralTransformationRule dependent = DependencyTransformation;
            var comp2 = context.CallTransformation(dependent, dependencyInput);
            if (!comp2.IsDelayed)
            {
                if (comp2.Output != null)
                {
                    if (context.IsThreadSafe)
                    {
                        lock (list)
                        {
                            list.Add(comp2.Output);
                        }
                    }
                    else
                    {
                        list.Add(comp2.Output);
                    }
                }
            }
            else
            {
                computation.DelayOutputAtLeast(comp2.Context.MinOutputDelayLevel);
                delayPersistor.WaitFor(comp2);
            }

            if (ExecuteBefore)
            {
                computation.DelayTransformationAtLeast(comp2.Context.MinTransformDelayLevel);
            }
            else
            {
                comp2.DelayTransformationAtLeast(computation.Context.MinTransformDelayLevel);
            }
        }
Example #4
0
        private bool HandleNonDelayedPersistedDependencyInput(Computation computation, ITransformationContext context, IList list, MultipleResultAwaitingPersistor delayPersistor, GeneralTransformationRule dependent, object[] dependencyInput)
        {
            var needDelayedPersistor = false;
            var comp2 = context.CallTransformation(dependent, dependencyInput);
            if (!comp2.IsDelayed)
            {
                if (comp2.Output != null)
                {
                    var lockList = context.IsThreadSafe;
                    if (lockList)
                    {
                        lock (list)
                        {
                            list.Add(comp2.Output);
                        }
                    }
                    else
                    {
                        list.Add(comp2.Output);
                    }
                }
            }
            else
            {
                needDelayedPersistor = true;
                delayPersistor.WaitFor(comp2);
            }

            computation.MarkRequireInternal(comp2, ExecuteBefore, this);
            return needDelayedPersistor;
        }