예제 #1
0
        /// <summary>
        /// Reads a raw <c>AssemblyRefProcessor</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 TryReadAssemblyRefProcessorRow(uint rid, out RawAssemblyRefProcessorRow row)
        {
            var table = AssemblyRefProcessorTable;

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

            reader.Position = (rid - 1) * (uint)table.TableInfo.RowSize;
            row             = new RawAssemblyRefProcessorRow(
                reader.Unsafe_ReadUInt32(),
                table.Column1.Unsafe_Read24(ref reader));
            return(true);
        }
예제 #2
0
 public int GetHashCode(RawAssemblyRefProcessorRow obj) =>
 (int)obj.Processor +
 rol(obj.AssemblyRef, 3);
예제 #3
0
 public bool Equals(RawAssemblyRefProcessorRow x, RawAssemblyRefProcessorRow y) =>
 x.Processor == y.Processor &&
 x.AssemblyRef == y.AssemblyRef;
예제 #4
0
 public int GetHashCode(RawAssemblyRefProcessorRow obj)
 {
     return((int)obj.Processor +
            rol(obj.AssemblyRef, 3));
 }
예제 #5
0
 public bool Equals(RawAssemblyRefProcessorRow x, RawAssemblyRefProcessorRow y)
 {
     return(x.Processor == y.Processor &&
            x.AssemblyRef == y.AssemblyRef);
 }
예제 #6
0
 static uint ReadAssemblyRefProcessorColumnMethod(ref RawAssemblyRefProcessorRow row, int index) => row[index];