public void Disconnect <TTask, TMsg, TSource, TDestination>( NodeHandle <TSource> sourceHandle, MessageOutput <TSource, TMsg> sourcePort, NodeInterfaceLink <TTask, TDestination> destHandle ) where TSource : NodeDefinition where TTask : ITaskPort <TTask> where TDestination : NodeDefinition, TTask, IMsgHandler <TMsg>, new() { Disconnect(sourceHandle, sourcePort.Port, destHandle, GetDefinition(destHandle.TypedHandle).GetPort(destHandle)); }
public void Disconnect <TTask, TType, TSource, TDestination>( NodeHandle <TSource> sourceHandle, DataOutput <TSource, TType> sourcePort, NodeInterfaceLink <TTask, TDestination> destHandle ) where TSource : NodeDefinition where TDestination : NodeDefinition, TTask, new() where TType : struct where TTask : ITaskPort <TTask> { Disconnect(sourceHandle, sourcePort.Port, destHandle, GetDefinition(destHandle.TypedHandle).GetPort(destHandle)); }
public void Disconnect <TTask, TDSLHandler, TDSL, TSource, TDestination>( NodeHandle <TSource> sourceHandle, DSLOutput <TSource, TDSLHandler, TDSL> sourcePort, NodeInterfaceLink <TTask, TDestination> destHandle ) where TSource : NodeDefinition, TDSL where TDestination : NodeDefinition, TDSL, TTask, new() where TDSLHandler : DSLHandler <TDSL>, new() where TDSL : class where TTask : ITaskPort <TTask> { Disconnect(sourceHandle, sourcePort.Port, destHandle, GetDefinition(destHandle.TypedHandle).GetPort(destHandle)); }
public void Disconnect <TTask>( NodeHandle sourceHandle, OutputPortID sourcePort, NodeInterfaceLink <TTask> destHandle ) where TTask : ITaskPort <TTask> { var f = GetDefinition(destHandle); if (f is TTask task) { Disconnect(sourceHandle, sourcePort, destHandle, task.GetPort(destHandle)); } else { throw new InvalidOperationException( $"Cannot disconnect source from destination. Destination not of type {typeof(TTask).Name}"); } }