Class Subpipeline
Represents a graph of components and controls scheduling and message passing.
Inheritance
Implements
Inherited Members
Namespace: Microsoft.Psi
Assembly: Microsoft.Psi.dll
Syntax
public class Subpipeline : Pipeline, ISourceComponent
Remarks
This is essentially a pipeline as a component within other pipelines.
Constructors
View SourceSubpipeline(Pipeline, String, DeliveryPolicy)
Initializes a new instance of the Subpipeline class.
Declaration
public Subpipeline(Pipeline parent, string name = null, DeliveryPolicy defaultDeliveryPolicy = null)
Parameters
Type | Name | Description |
---|---|---|
Pipeline | parent | Parent pipeline. |
System. |
name | Subpipeline name (inherits "Sub |
Delivery |
defaultDeliveryPolicy | Pipeline-level default delivery policy (defaults to Unlimited if unspecified). |
Properties
View SourceParentPipeline
Gets the parent pipeline.
Declaration
protected Pipeline ParentPipeline { get; }
Property Value
Type | Description |
---|---|
Pipeline |
Methods
View SourceCreate(Pipeline, String, DeliveryPolicy)
Create subpipeline.
Declaration
public static Subpipeline Create(Pipeline parent, string name = null, DeliveryPolicy defaultDeliveryPolicy = null)
Parameters
Type | Name | Description |
---|---|---|
Pipeline | parent | Parent pipeline. |
System. |
name | Subpipeline name. |
Delivery |
defaultDeliveryPolicy | Pipeline-level default delivery policy (defaults to Unlimited if unspecified). |
Returns
Type | Description |
---|---|
Subpipeline | Created subpipeline. |
CreateInputConnectorFrom<T>(Pipeline, String)
Creates an input connector for a subpipeline.
Declaration
public Connector<T> CreateInputConnectorFrom<T>(Pipeline fromPipeline, string name)
Parameters
Type | Name | Description |
---|---|---|
Pipeline | fromPipeline | The pipeline from which the input connector receives data. |
System. |
name | The name of the input connector. |
Returns
Type | Description |
---|---|
Connector<T> | The newly created input connector. |
Type Parameters
Name | Description |
---|---|
T | The type of messages for the input connector. |
CreateOutputConnectorTo<T>(Pipeline, String)
Creates an output connector for a subpipeline.
Declaration
public Connector<T> CreateOutputConnectorTo<T>(Pipeline toPipeline, string name)
Parameters
Type | Name | Description |
---|---|---|
Pipeline | toPipeline | The pipeline to which the output connector sends data. |
System. |
name | The name of the output connector. |
Returns
Type | Description |
---|---|
Connector<T> | The newly created output connector. |
Type Parameters
Name | Description |
---|---|
T | The type of messages for the output connector. |
ProposeReplayTime(TimeInterval)
Propose replay time.
Declaration
public override void ProposeReplayTime(TimeInterval originatingTimeInterval)
Parameters
Type | Name | Description |
---|---|---|
Time |
originatingTimeInterval | Originating time interval. |
Overrides
View SourceRunAsync(ReplayDescriptor, Clock, IProgress<Double>)
Run pipeline (asynchronously).
Declaration
protected override IDisposable RunAsync(ReplayDescriptor descriptor, Clock clock, IProgress<double> progress)
Parameters
Type | Name | Description |
---|---|---|
Replay |
descriptor | Replay descriptor. |
Clock | clock | Clock to use (in the case of a shared scheduler - e.g. subpipeline). |
IProgress<System. |
progress | Progress reporter. |
Returns
Type | Description |
---|---|
IDisposable | Disposable used to terminate pipeline. |
Overrides
View SourceStart(Action<DateTime>)
Initialize subpipeline as a finite source component.
Declaration
public void Start(Action<DateTime> notifyCompletionTime)
Parameters
Type | Name | Description |
---|---|---|
Action<Date |
notifyCompletionTime | Delegate to call to notify of completion time. |
Remarks
This is called by the parent subpipeline, if any.
Stop(DateTime, Action)
Called by the pipeline when shutting down. The component should stop generating new messages once this method completes. However, the component might still receive new messages (if it is subscribed to other components) after this call and is expected to handle them.
Declaration
public void Stop(DateTime finalOriginatingTime, Action notifyCompleted)
Parameters
Type | Name | Description |
---|---|---|
Date |
finalOriginatingTime | The last originating time of any message which may be posted, after which the component should stop posting non-reactive source messages. |
Action | notifyCompleted | Delegate to call to notify the pipeline that the component has completed posting non-reactive source
messages. This delegate should be called once the component has posted its last non-reactive source
message, but only up to (and possibly including) |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System. |
Remarks
Return subpipeline name as component name.