public static BusMaster <T> CreateConnection <T>(this BusSlave <T> slave, string busName = null) where T : BusData, new() { var bus = slave.GetOrAddBus(busName); return(new BusMaster <T>(bus, busName)); }
public static Bus <T> ConnectTo <T>(this BusSlave <T> slave, BusMaster <T> master, string busName = null) where T : BusData, new() { Bus <T> bus = Connect(master, slave, busName); if (bus == null) { if (busName == null) { busName = slave.Name; } bus = slave.GetOrAddBus(busName); master.ConnectTo(bus); } return(bus); }
public static BusMaster CreateConnection(this BusSlave slave, string busName = null) { var bus = slave.GetOrAddBus(busName); return(new BusMaster(bus, busName)); }