public bool CanReuse(View view)
        {
            if (!(view is TimeLengthBatchView))
            {
                return(false);
            }

            var myView = (TimeLengthBatchView)view;

            if (!TimeDeltaComputation.EqualsTimePeriod(myView.TimeDeltaComputation))
            {
                return(false);
            }

            if (myView.NumberOfEvents != _numberOfEvents)
            {
                return(false);
            }

            if (myView.IsForceOutput != IsForceUpdate)
            {
                return(false);
            }

            if (myView.IsStartEager) // since it's already started
            {
                return(false);
            }

            return(myView.IsEmpty());
        }
        public bool CanReuse(View view)
        {
            if (!(view is TimeOrderView))
            {
                return(false);
            }

            var other = (TimeOrderView)view;

            if ((!TimeDeltaComputation.EqualsTimePeriod(other.TimeDeltaComputation)) ||
                (!ExprNodeUtility.DeepEquals(other.TimestampExpression, timestampExpression)))
            {
                return(false);
            }

            return(other.IsEmpty());
        }
Exemple #3
0
        public bool CanReuse(View view)
        {
            if (!(view is TimeBatchView))
            {
                return(false);
            }

            var myView = (TimeBatchView)view;

            if (!TimeDeltaComputation.EqualsTimePeriod(myView.TimeDeltaComputation))
            {
                return(false);
            }

            if ((myView.InitialReferencePoint != null) && (OptionalReferencePoint != null))
            {
                if (!myView.InitialReferencePoint.Equals(OptionalReferencePoint.AsLong()))
                {
                    return(false);
                }
            }
            if (((myView.InitialReferencePoint == null) && (OptionalReferencePoint != null)) ||
                ((myView.InitialReferencePoint != null) && (OptionalReferencePoint == null)))
            {
                return(false);
            }

            if (myView.IsForceOutput != IsForceUpdate)
            {
                return(false);
            }

            if (myView.IsStartEager)  // since it's already started
            {
                return(false);
            }

            return(myView.IsEmpty());
        }