/// <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); }
public int GetHashCode(RawAssemblyOSRow obj) => (int)obj.OSPlatformId + rol(obj.OSMajorVersion, 3) + rol(obj.OSMinorVersion, 7);
public bool Equals(RawAssemblyOSRow x, RawAssemblyOSRow y) => x.OSPlatformId == y.OSPlatformId && x.OSMajorVersion == y.OSMajorVersion && x.OSMinorVersion == y.OSMinorVersion;
static uint ReadAssemblyOSColumnMethod(ref RawAssemblyOSRow row, int index) => row[index];