public IItem Clone(IRoboDK connectionLink) { var item = new Item((RoboDK)connectionLink, this.ItemId, this._type); var itemProxy = connectionLink.ItemInterceptFunction(item); return(itemProxy); }
public RoboDKEventListener(IRoboDK rdk) { _rdk = rdk; _rdk.EventsListen(); _stopListener = false; _eventListenerThread = new Thread(EventListenerThread); _eventListenerThread.Start(); }
public static void StopRoboDkInstance() { lock (Lock) { if (_roboDk != null) { _roboDk.CloseRoboDK(); _roboDk.Process.WaitForExit(1000); _roboDk = null; } } var roboDKInstances = Process.GetProcessesByName("RoboDK"); roboDKInstances.Should().BeEmpty("For a successful unit test all existing RoboDK instances must be closed."); }
public static IRoboDK StartNewRoboDkInstance() { lock (Lock) { if (_roboDk == null) { var roboDKInstances = Process.GetProcessesByName("RoboDK"); roboDKInstances.Should().BeEmpty("For a successful unit test all existing RoboDK instances must be closed."); } else { _roboDk.CloseRoboDK(); _roboDk.Process.WaitForExit(1000); _roboDk = null; } _roboDk = new RoboDK(); _roboDk.Connect().Should().BeTrue(); return(_roboDk); } }
public void Test_Initialize() { _roboDk = RoboDkProcessHelper.GetExistingRoboDkOrStartNewIfItDoesNotExist(); _roboDk.CloseStation(); }
internal RoboDKEventSource(IRoboDK roboDk) { _roboDkApiConnection = (RoboDK)roboDk; _roboDkEventConnection = (RoboDK)_roboDkApiConnection.CloneRoboDkConnection(RoboDK.ConnectionType.Event); }