Interface IPipelineSource<T>
Defines a pipeline source that can publish records into the pipeline runtime.
public interface IPipelineSource<T> : IFlowSource<PipelineContainer<T>> where T : PipelineRecord
Type Parameters
TThe pipeline record type produced by the source.
- Inherited Members
Properties
Completion
Gets a task that completes when the source has finished publishing records.
Task Completion { get; }
Property Value
Methods
Complete()
Marks the source as complete so no additional records will be published.
void Complete()
Initialize(Pipeline<T>)
Initializes the source with its parent pipeline.
void Initialize(Pipeline<T> parentPipeline)
Parameters
parentPipelinePipeline<T>The owning pipeline.
OnPipelineContainerComplete(object, PipelineContainerCompletedEventHandlerArgs<PipelineContainer<T>>)
Handles notification that a published container completed successfully.
void OnPipelineContainerComplete(object sender, PipelineContainerCompletedEventHandlerArgs<PipelineContainer<T>> e)
Parameters
senderobjectThe event sender.
ePipelineContainerCompletedEventHandlerArgs<PipelineContainer<T>>The completed container event arguments.
PublishAsync(T)
Publishes a record using the pipeline's default flow-control behavior.
Task PublishAsync(T record)
Parameters
recordTThe record to publish.
Returns
PublishAsync(T, PipelinePublishOptions)
Publishes a record using explicit publish options.
Task<PipelinePublishResult> PublishAsync(T record, PipelinePublishOptions options)
Parameters
recordTThe record to publish.
optionsPipelinePublishOptionsThe publish options to apply.
Returns
- Task<PipelinePublishResult>
The publish result.
PublishAsync(T, MetadataCollection)
Publishes a record with explicit metadata using the pipeline's default flow-control behavior.
Task PublishAsync(T record, MetadataCollection metadata)
Parameters
recordTThe record to publish.
metadataMetadataCollectionThe metadata to attach to the record.
Returns
PublishAsync(T, MetadataCollection, PipelinePublishOptions)
Publishes a record with explicit metadata and publish options.
Task<PipelinePublishResult> PublishAsync(T record, MetadataCollection metadata, PipelinePublishOptions options)
Parameters
recordTThe record to publish.
metadataMetadataCollectionThe metadata to attach to the record.
optionsPipelinePublishOptionsThe publish options to apply.
Returns
- Task<PipelinePublishResult>
The publish result.
StartAsync(CancellationTokenSource)
Starts the source execution loop.
Task StartAsync(CancellationTokenSource cancellationToken)
Parameters
cancellationTokenCancellationTokenSourceThe runtime cancellation source used to stop the source.