Esempio n. 1
0
 /// <summary>
 /// Constructor for symbol item.
 /// </summary>
 /// <param name="length">Length, in bytes.</param>
 /// <param name="sym">Weak symbol reference.</param>
 /// <param name="isBigEndian">Set to true for big-endian data.</param>
 private FormatDescriptor(int length, WeakSymbolRef sym, bool isBigEndian)
 {
     Debug.Assert(sym != null);
     Debug.Assert(length > 0 && length <= MAX_NUMERIC_LEN);
     Length        = length;
     FormatType    = isBigEndian ? Type.NumericBE : Type.NumericLE;
     FormatSubType = SubType.Symbol;
     SymbolRef     = sym;
 }
Esempio n. 2
0
 public SerWeakSymbolRef(WeakSymbolRef weakSym)
 {
     Label = weakSym.Label;
     Part  = weakSym.ValuePart.ToString();
 }
Esempio n. 3
0
 /// <summary>
 /// Returns a descriptor with a symbol.
 /// </summary>
 /// <param name="length">Length, in bytes.</param>
 /// <param name="sym">Weak symbol reference.</param>
 /// <param name="isBigEndian">Set to true for big-endian data.</param>
 /// <returns>New or pre-allocated descriptor.</returns>
 public static FormatDescriptor Create(int length, WeakSymbolRef sym, bool isBigEndian)
 {
     DebugCreateCount++;
     return(new FormatDescriptor(length, sym, isBigEndian));
 }