public void Connect(BasicInterface interfaceA, BasicInterface interfaceB) { Log(Core.Logger.Level.Debug, String.Format("Connect {0} - {1}", interfaceA.Name, interfaceB.Name)); interfaceA.DataReceived += interfaceB.Send; // interfaceB.DataReceived += interfaceA.Send; interfaceA.DataReceived += _DataReceived; // interfaceB.DataReceived += _DataReceived; }
public BasicConnector(BasicInterface interfaceA, BasicInterface interfaceB) { Initialize(); if (_interfaces == null) { _interfaces = new List <BasicInterface>(); } Connect(interfaceA, interfaceB); _interfaces.Add(interfaceA); _interfaces.Add(interfaceB); }