示例#1
0
 void InitializeRawRow()
 {
     if (rawRow != null)
     {
         return;
     }
     rawRow = readerModule.TablesStream.ReadParamRow(rid);
 }
示例#2
0
        /// <summary>
        /// Reads a raw <c>Param</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 TryReadParamRow(uint rid, out RawParamRow row)
        {
            var table = ParamTable;

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

            reader.Position = (rid - 1) * (uint)table.TableInfo.RowSize;
            row             = new RawParamRow(
                reader.Unsafe_ReadUInt16(),
                reader.Unsafe_ReadUInt16(),
                table.Column2.Unsafe_Read24(ref reader));
            return(true);
        }
示例#3
0
 public int GetHashCode(RawParamRow obj) =>
 (int)obj.Flags +
 rol(obj.Sequence, 3) +
 rol(obj.Name, 7);
示例#4
0
 public bool Equals(RawParamRow x, RawParamRow y) =>
 x.Flags == y.Flags &&
 x.Sequence == y.Sequence &&
 x.Name == y.Name;
示例#5
0
 public int GetHashCode(RawParamRow obj)
 {
     return((int)obj.Flags +
            rol(obj.Sequence, 3) +
            rol(obj.Name, 7));
 }
示例#6
0
 public bool Equals(RawParamRow x, RawParamRow y)
 {
     return(x.Flags == y.Flags &&
            x.Sequence == y.Sequence &&
            x.Name == y.Name);
 }
示例#7
0
文件: ParamDef.cs 项目: visi/dnlib
 void InitializeRawRow_NoLock()
 {
     if (rawRow != null)
         return;
     rawRow = readerModule.TablesStream.ReadParamRow(origRid);
 }
示例#8
0
 static uint ReadParamColumnMethod(ref RawParamRow row, int index) => row[index];