Beispiel #1
0
 public int GetHashCode(RawManifestResourceRow obj)
 {
     return((int)obj.Offset +
            rol(obj.Flags, 3) +
            rol(obj.Name, 7) +
            rol(obj.Implementation, 11));
 }
Beispiel #2
0
 public bool Equals(RawManifestResourceRow x, RawManifestResourceRow y)
 {
     return(x.Offset == y.Offset &&
            x.Flags == y.Flags &&
            x.Name == y.Name &&
            x.Implementation == y.Implementation);
 }
Beispiel #3
0
 void InitializeRawRow()
 {
     if (rawRow != null)
     {
         return;
     }
     rawRow = readerModule.TablesStream.ReadManifestResourceRow(rid);
 }
Beispiel #4
0
        /// <summary>
        /// Reads a raw <c>ManifestResource</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 TryReadManifestResourceRow(uint rid, out RawManifestResourceRow row)
        {
            var table = ManifestResourceTable;

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

            reader.Position = (rid - 1) * (uint)table.TableInfo.RowSize;
            row             = new RawManifestResourceRow(
                reader.Unsafe_ReadUInt32(),
                reader.Unsafe_ReadUInt32(),
                table.Column2.Unsafe_Read24(ref reader),
                table.Column3.Unsafe_Read24(ref reader));
            return(true);
        }
Beispiel #5
0
 static uint ReadManifestResourceColumnMethod(ref RawManifestResourceRow row, int index) => row[index];
Beispiel #6
0
 void InitializeRawRow_NoLock()
 {
     if (rawRow != null)
         return;
     rawRow = readerModule.TablesStream.ReadManifestResourceRow(origRid);
 }