public Cell Unlink(Cell cell, bool bidirectional = true) { _Links[cell] = false; if (bidirectional) { cell.Unlink(this, false); } return(this); }
public void TestUnlinkBidirectional() { var cell1 = new Cell(); var cell2 = new Cell(); cell1.Link(cell2); cell1.Unlink(cell2); Assert.IsFalse(cell1.IsLinked(cell2)); Assert.IsFalse(cell2.IsLinked(cell1)); }
public void Unlink(Cell cell, bool bidirectional = true) { if (_links.ContainsKey(cell)) { _links.Remove(cell); } if (bidirectional) { cell.Unlink(this, false); } }
public void TestUnlink() { var cell1 = new Cell(); var cell2 = new Cell(); cell1.Link(cell2); cell1.Unlink(cell2, false); Assert.IsFalse(cell1.IsLinked(cell2)); Assert.IsTrue(cell2.IsLinked(cell1)); }
public Cell Unlink(Cell cell, bool bidirectional = true) { _Links[cell] = false; if (bidirectional) { cell.Unlink(this, false); } return this; }