public static void DataConnect(DataUnit source, DataUnit target, String name) { if (source == null || target == null) { return; } DataPort port = new DataPort(String.IsNullOrEmpty(name) ? source.Name + "->" + target.Name : name); port.Source = source; port.Target = target; source.Outputs.Add(port); target.Inputs.Add(port); }
protected virtual void PortWriting(DataPort port, out object value) { value = null; }
protected virtual void PortReading(DataPort port, object value) { }