public container(Func <Locator, String, Component> new_system, bool flush, Locator locator) : base(locator, "<internal>", null) { this.pump = new pump(); this.expect = new Queue <String>(); this.system = (TSystem)new_system(locator.set(this.pump), "sut"); this.system.dzn_runtime.infos[this].flushes = flush; }
protected virtual void Dispose(bool gc) { if (gc) { pump p = system.dzn_locator.get <pump>(); if (p != this.pump) { pump.execute(() => { p.stop(); }); } this.pump.Dispose(); p.Dispose(); } }