Example #1
0
 void InitializeRawRow()
 {
     if (rawRow != null)
     {
         return;
     }
     rawRow = readerModule.TablesStream.ReadFileRow(rid);
 }
Example #2
0
        /// <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);
        }
Example #3
0
 public int GetHashCode(RawFileRow obj) =>
 (int)obj.Flags +
 rol(obj.Name, 3) +
 rol(obj.HashValue, 7);
Example #4
0
 public bool Equals(RawFileRow x, RawFileRow y) =>
 x.Flags == y.Flags &&
 x.Name == y.Name &&
 x.HashValue == y.HashValue;
Example #5
0
 public int GetHashCode(RawFileRow obj)
 {
     return((int)obj.Flags +
            rol(obj.Name, 3) +
            rol(obj.HashValue, 7));
 }
Example #6
0
 public bool Equals(RawFileRow x, RawFileRow y)
 {
     return(x.Flags == y.Flags &&
            x.Name == y.Name &&
            x.HashValue == y.HashValue);
 }
Example #7
0
 void InitializeRawRow_NoLock()
 {
     if (rawRow != null)
         return;
     rawRow = readerModule.TablesStream.ReadFileRow(origRid);
 }
Example #8
0
 static uint ReadFileColumnMethod(ref RawFileRow row, int index) => row[index];