public void OnInvalidate(IPipelineInvalidator invalidator) { var selfInvalidated = !invalidator.AllInvalidatedStages.Skip(1).Any() && invalidator.IsInvalidated(this); var selectedInput = GetSelectedOutput(); if (invalidator.IsInvalidated(Select) || invalidator.IsInvalidated(selectedInput) || selfInvalidated) { invalidator.InvalidateAllDependentStages(this); } else { invalidator.Revalidate(this); } }
public void OnInvalidate(IPipelineInvalidator invalidator) { var invalidateFromInput = invalidator.IsInvalidated(Input); var shouldInvalidate = HasPendingInvalidate || invalidateFromInput; switch (SuspensionState) { case PipelineSuspensionState.Resume: HasPendingInvalidate = false; break; case PipelineSuspensionState.Suspend: HasPendingInvalidate = shouldInvalidate; shouldInvalidate = false; break; case PipelineSuspensionState.ResumeWithoutPendingInvalidates: HasPendingInvalidate = false; shouldInvalidate = invalidateFromInput; break; } if (shouldInvalidate) { invalidator.InvalidateAllDependentStages(this); } else { invalidator.Revalidate(this); } }