Esempio n. 1
0
 internal static bool CanConnectImpl(
     IOutputFlowPort source, IInputFlowPort destination, bool checkExistence = true)
 {
     if (checkExistence && !Exist(source, destination))
     {
         return(false);
     }
     return(true);
 }
Esempio n. 2
0
 internal static bool DisconnectImpl(
     IOutputFlowPort source, IInputFlowPort destination, Action <FlowConnection> preAction)
 {
     return(Connection.DisconnectImpl(source, destination, preAction));
 }
Esempio n. 3
0
 internal static FlowConnection ConnectImpl(
     IOutputFlowPort source, IInputFlowPort destination, Action <FlowConnection> postAction)
 {
     return(ConnectImpl((src, dst) => new FlowConnection(src, dst), source, destination, postAction));
 }
Esempio n. 4
0
 /// <summary>
 ///     Get a value indicates whether the specified ports can be connected.
 /// </summary>
 /// <param name="source">The source port of the desired connection.</param>
 /// <param name="destination">The destination port of the desired connection.</param>
 /// <returns>
 ///     <see langword="true" /> if the specified ports can be connected; otherwise, <see langword="false" />.
 /// </returns>
 public static bool CanConnect(IOutputFlowPort source, IInputFlowPort destination)
 {
     return(CanConnectImpl(source, destination));
 }
Esempio n. 5
0
 internal FlowConnection(IOutputFlowPort source, IInputFlowPort destination) : base(source, destination)
 {
 }
Esempio n. 6
0
 public static IEnumerable <IInputFlowPort> GetConnectedPorts(this IOutputFlowPort self)
 {
     return(self.Connections.Select(c => c.Destination));
 }