예제 #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];