Share via


Choice Method (IPortSet)

Microsoft Robotics Class Reference

Creates a choice arbiter with a branch for each port in the port set

Namespace: Microsoft.Ccr.Core
Assembly: Microsoft.Ccr.Core (in Microsoft.Ccr.Core.dll) Version: 4.0.261.0 (4.0.261.0)

Syntax

public static Choice Choice(
    IPortSet portSet
)

Parameters

Return Value

Instance of Choice Arbiter

Remarks

A non-persisted receiver is attached to each port on the port set and used as a branch in the Choice arbiter. When the first item arrives on any of the ports within the port set, the receiver simply posts the item back, allowing the choice to complete. Use this method within iterators, followed by a call to the Test method on the port set to retrieve the item or by simply assigning the port set to a variable of one of the PortSet types

See Also

Arbiter Class

Choice Overload

Microsoft.Ccr.Core Namespace