public static bool ContainsValue <V>(UnsafeSortedDictionary *map, V value) where V : unmanaged, IEquatable <V> { var iterator = new ValueEnumerator <V>(map); while (iterator.MoveNext()) { if (value.Equals(iterator.Current)) { return(true); } } return(false); }
/** Serializes the cells that are allocated to a certain row range*/ public int SerializeCellRow(int row, int offset, byte[] data) { ValueEnumerator itr = new ValueEnumerator(ref records, row, row); int pos = offset; while (itr.MoveNext()) { CellValueRecordInterface cell = (CellValueRecordInterface)itr.Current; if (cell.Row != row) { break; } pos += ((RecordBase)cell).Serialize(pos, data); } return(pos - offset); }
public bool MoveNext() { while (enumerator.MoveNext()) { if (enumerator.Current is PhiValue phiValue) { foreach (Value operand in phiValue.Nodes) { if (!Parent.Contains(operand.BasicBlock)) { return(true); } } } } return(false); }
/** Tallies a count of the size of the cell records * that are attached to the rows in the range specified. */ public int GetRowCellBlockSize(int startRow, int endRow) { ValueEnumerator itr = new ValueEnumerator(ref records, startRow, endRow); int size = 0; while (itr.MoveNext()) { CellValueRecordInterface cell = (CellValueRecordInterface)itr.Current; int row = cell.Row; if (row > endRow) { break; } if ((row >= startRow) && (row <= endRow)) { size += ((RecordBase)cell).RecordSize; } } return(size); }