Beispiel #1
0
 public static bool CanConnect(IOutputPort source, IInputPort destination)
 {
     if (source is IOutputFlowPort flowSrc && destination is IInputFlowPort flowDst)
     {
         return(FlowConnection.CanConnect(flowSrc, flowDst));
     }
     if (source is IOutputValuePort valueSrc && destination is IInputValuePort valueDst)
     {
         return(ValueConnection.CanConnect(valueSrc, valueDst));
     }
     return(false);
 }
Beispiel #2
0
 protected internal static bool CanConnectImpl(
     IOutputPort source, IInputPort destination, bool checkExistence = true)
 {
     if (source is IOutputFlowPort flowSrc && destination is IInputFlowPort flowDst)
     {
         return(FlowConnection.CanConnectImpl(flowSrc, flowDst, checkExistence));
     }
     if (source is IOutputValuePort valueSrc && destination is IInputValuePort valueDst)
     {
         return(ValueConnection.CanConnectImpl(valueSrc, valueDst, checkExistence));
     }
     return(false);
 }