public void SnapshotState(IFunctionSnapshotContext context)
        {
            Preconditions.CheckState(_checkpointedState != null, $"The {GetType()} has not been properly initialized.");

            _checkpointedState.Clear();
            _checkpointedState.Add(NumElementsEmitted);
        }
 public void SnapshotState(IFunctionSnapshotContext context)
 {
     _checkpointedCount.Clear();
     _checkpointedCount.Add(_counter);
 }