void InitializeRawRow() { if (rawRow != null) { return; } rawRow = readerModule.TablesStream.ReadFileRow(rid); }
/// <summary> /// Reads a raw <c>File</c> row or returns false if the row doesn't exist /// </summary> /// <param name="rid">Row ID</param> /// <param name="row">Row data</param> /// <returns></returns> public bool TryReadFileRow(uint rid, out RawFileRow row) { var table = FileTable; if (table.IsInvalidRID(rid)) { row = default; return(false); } var reader = table.DataReader; reader.Position = (rid - 1) * (uint)table.TableInfo.RowSize; row = new RawFileRow( reader.Unsafe_ReadUInt32(), table.Column1.Unsafe_Read24(ref reader), table.Column2.Unsafe_Read24(ref reader)); return(true); }
public int GetHashCode(RawFileRow obj) => (int)obj.Flags + rol(obj.Name, 3) + rol(obj.HashValue, 7);
public bool Equals(RawFileRow x, RawFileRow y) => x.Flags == y.Flags && x.Name == y.Name && x.HashValue == y.HashValue;
public int GetHashCode(RawFileRow obj) { return((int)obj.Flags + rol(obj.Name, 3) + rol(obj.HashValue, 7)); }
public bool Equals(RawFileRow x, RawFileRow y) { return(x.Flags == y.Flags && x.Name == y.Name && x.HashValue == y.HashValue); }
void InitializeRawRow_NoLock() { if (rawRow != null) return; rawRow = readerModule.TablesStream.ReadFileRow(origRid); }
static uint ReadFileColumnMethod(ref RawFileRow row, int index) => row[index];