Esempio n. 1
0
        /// <summary>
        /// Reads a raw <c>AssemblyOS</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 TryReadAssemblyOSRow(uint rid, out RawAssemblyOSRow row)
        {
            var table = AssemblyOSTable;

            if (table.IsInvalidRID(rid))
            {
                row = default;
                return(false);
            }
            var reader = table.DataReader;

            reader.Position = (rid - 1) * (uint)table.TableInfo.RowSize;
            row             = new RawAssemblyOSRow(
                reader.Unsafe_ReadUInt32(),
                reader.Unsafe_ReadUInt32(),
                reader.Unsafe_ReadUInt32());
            return(true);
        }
Esempio n. 2
0
 public int GetHashCode(RawAssemblyOSRow obj) =>
 (int)obj.OSPlatformId +
 rol(obj.OSMajorVersion, 3) +
 rol(obj.OSMinorVersion, 7);
Esempio n. 3
0
 public bool Equals(RawAssemblyOSRow x, RawAssemblyOSRow y) =>
 x.OSPlatformId == y.OSPlatformId &&
 x.OSMajorVersion == y.OSMajorVersion &&
 x.OSMinorVersion == y.OSMinorVersion;
Esempio n. 4
0
 static uint ReadAssemblyOSColumnMethod(ref RawAssemblyOSRow row, int index) => row[index];