Exemplo n.º 1
0
        /// <summary>
        /// Reads a raw <c>LocalConstant</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 TryReadLocalConstantRow(uint rid, out RawLocalConstantRow row)
        {
            var table = LocalConstantTable;

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

            reader.Position = (rid - 1) * (uint)table.TableInfo.RowSize;
            row             = new RawLocalConstantRow(
                table.Column0.Unsafe_Read24(ref reader),
                table.Column1.Unsafe_Read24(ref reader));
            return(true);
        }
Exemplo n.º 2
0
 public int GetHashCode(RawLocalConstantRow obj) =>
 (int)obj.Name +
 rol(obj.Signature, 3);
Exemplo n.º 3
0
 public bool Equals(RawLocalConstantRow x, RawLocalConstantRow y) =>
 x.Name == y.Name &&
 x.Signature == y.Signature;
Exemplo n.º 4
0
 public bool Equals(RawLocalConstantRow x, RawLocalConstantRow y)
 {
     return(x.Name == y.Name &&
            x.Signature == y.Signature);
 }
Exemplo n.º 5
0
 static uint ReadLocalConstantColumnMethod(ref RawLocalConstantRow row, int index) => row[index];