コード例 #1
0
 public int GetHashCode(RawAssemblyRefOSRow obj)
 {
     return((int)obj.OSPlatformId +
            rol(obj.OSMajorVersion, 3) +
            rol(obj.OSMinorVersion, 7) +
            rol(obj.AssemblyRef, 11));
 }
コード例 #2
0
 public bool Equals(RawAssemblyRefOSRow x, RawAssemblyRefOSRow y)
 {
     return(x.OSPlatformId == y.OSPlatformId &&
            x.OSMajorVersion == y.OSMajorVersion &&
            x.OSMinorVersion == y.OSMinorVersion &&
            x.AssemblyRef == y.AssemblyRef);
 }
コード例 #3
0
        /// <summary>
        /// Reads a raw <c>AssemblyRefOS</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 TryReadAssemblyRefOSRow(uint rid, out RawAssemblyRefOSRow row)
        {
            var table = AssemblyRefOSTable;

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

            reader.Position = (rid - 1) * (uint)table.TableInfo.RowSize;
            row             = new RawAssemblyRefOSRow(
                reader.Unsafe_ReadUInt32(),
                reader.Unsafe_ReadUInt32(),
                reader.Unsafe_ReadUInt32(),
                table.Column3.Unsafe_Read24(ref reader));
            return(true);
        }
コード例 #4
0
ファイル: RawRowColumnReader.cs プロジェクト: zz110/dnSpy
 static uint ReadAssemblyRefOSColumnMethod(ref RawAssemblyRefOSRow row, int index) => row[index];