private void CreateCells(ref LinkedListNode<Token> tokenNode) { tokenNode = tokenNode.Next; LinkedList<ICell> Cells = new LinkedList<ICell>(); Cell cell = null; while (tokenNode.Value.Tag != Tag.CELLS_END) { Token token = tokenNode.Value; switch (tokenNode.Value.Tag) { case Tag.CELL_ID: cell = new Cell(((Num)token).Value.ToString()); break; case Tag.CELL_SITENAME: cell.SiteName = ((StringBlock)token).value; break; case Tag.CELL_SECTOR: cell.Sector = ((Num)token).Value; break; case Tag.CELL_TRAFFIC: cell.Traffic = ((Num)token).Value; break; case Tag.CELL_LOCALLY_BLOCKED: cell.LocallyBlocked = ((NumArray)token).Value; break; case Tag.CELL_LOCATION: cell.Location = CreateLocation(((StringBlock)token).value); break; case Tag.CELL_INNER_END: Cells.AddLast(cell); break; } tokenNode = tokenNode.Next; } this.Cells = new ICell[Cells.Count]; Cells.CopyTo(this.Cells,0); }
public object Clone() { Cell cloned = new Cell(this.CellID, this.SiteName, this.Sector, this.Traffic, this.Location); if (this.LocallyBlocked != null) { this.LocallyBlocked.CopyTo(cloned.LocallyBlocked, 0); } this.Frequencies.CopyTo(cloned.Frequencies, 0); return cloned; }