示例#1
0
 private IEnumerable <EmittedEventEnvelope> WriteEofEvent(CheckpointTag phaseCheckpointTag)
 {
     EmittedStream.WriterConfiguration.StreamMetadata streamMetadata = null;
     yield return
         (new EmittedEventEnvelope(
              new EmittedDataEvent(
                  _resultStream, Guid.NewGuid(), "$Eof", true, null, null, phaseCheckpointTag, null),
              streamMetadata));
 }
        protected override IEnumerable <EmittedEventEnvelope> WriteResults(CheckpointTag phaseCheckpointTag)
        {
            var items = _stateCache.Enumerate();

            EmittedStream.WriterConfiguration.StreamMetadata streamMetadata = null;
            return(from item in items
                   let partitionState = item.Item2
                                        select
                                        new EmittedEventEnvelope(
                       new EmittedDataEvent(
                           _resultStream, Guid.NewGuid(), "Result", true, partitionState.Result, null, phaseCheckpointTag,
                           null), streamMetadata));
        }