C# Class dnSpy.Hex.HexValueFormatter

Mostra file Open project: 0xd4d/dnSpy Class Usage Examples

Protected Properties

Property Type Description
culture System.Globalization.CultureInfo

Public Methods

Method Description
Edit ( HexBufferPoint position, int cellPosition, char c ) : PositionAndData?
FormatValue ( StringBuilder dest, dnSpy.Contracts.Hex.HexBytes hexBytes, long valueIndex, HexValueFormatterFlags flags ) : int

Formats the value and returns the number of spaces that were inserted before the number so exactly FormattedLength characters were written to dest

GetBufferSpan ( HexBufferSpan bufferSpan, int cellPosition ) : HexBufferSpan

Protected Methods

Method Description
EditBit ( HexBufferPoint position, int cellPosition, char c ) : PositionAndData?
EditCore ( HexBufferPoint position, int cellPosition, char c ) : PositionAndData?
EditSignedHex ( HexBufferPoint position, int cellPosition, char c, bool isBigEndian ) : PositionAndData?
EditSignedHexBigEndian ( HexBufferPoint position, int cellPosition, char c ) : PositionAndData?
EditSignedHexLittleEndian ( HexBufferPoint position, int cellPosition, char c ) : PositionAndData?
EditUnsignedHexBigEndian ( HexBufferPoint position, int cellPosition, char c ) : PositionAndData?
EditUnsignedHexLittleEndian ( HexBufferPoint position, int cellPosition, char c ) : PositionAndData?
FormatDecimalInt16 ( StringBuilder dest, HexValueFormatterFlags flags, short v ) : int
FormatDecimalInt32 ( StringBuilder dest, HexValueFormatterFlags flags, int v ) : int
FormatDecimalInt64 ( StringBuilder dest, HexValueFormatterFlags flags, long v ) : int
FormatDecimalSByte ( StringBuilder dest, HexValueFormatterFlags flags, sbyte v ) : int
FormatDecimalUInt16 ( StringBuilder dest, HexValueFormatterFlags flags, ushort v ) : int
FormatDecimalUInt32 ( StringBuilder dest, HexValueFormatterFlags flags, uint v ) : int
FormatDecimalUInt64 ( StringBuilder dest, HexValueFormatterFlags flags, ulong v ) : int
FormatDouble ( StringBuilder dest, HexValueFormatterFlags flags, double v ) : int
FormatHexInt16 ( StringBuilder dest, HexValueFormatterFlags flags, short v ) : int
FormatHexInt32 ( StringBuilder dest, HexValueFormatterFlags flags, int v ) : int
FormatHexInt64 ( StringBuilder dest, HexValueFormatterFlags flags, long v ) : int
FormatHexSByte ( StringBuilder dest, HexValueFormatterFlags flags, sbyte v ) : int
FormatHexUInt16 ( StringBuilder dest, HexValueFormatterFlags flags, ushort v ) : int
FormatHexUInt32 ( StringBuilder dest, HexValueFormatterFlags flags, uint v ) : int
FormatHexUInt64 ( StringBuilder dest, HexValueFormatterFlags flags, ulong v ) : int
FormatSingle ( StringBuilder dest, HexValueFormatterFlags flags, float v ) : int
HexValueFormatter ( int byteCount, int formattedLength, HexValuesDisplayFormat format ) : System
WriteFormattedValue ( StringBuilder dest, string formattedValue ) : int
WriteHexByte ( StringBuilder dest, HexValueFormatterFlags flags, byte b ) : void
WriteHexUInt16 ( StringBuilder dest, HexValueFormatterFlags flags, ushort v ) : void
WriteHexUInt32 ( StringBuilder dest, HexValueFormatterFlags flags, uint v ) : void
WriteHexUInt64 ( StringBuilder dest, HexValueFormatterFlags flags, ulong v ) : void
WriteInvalid ( StringBuilder dest ) : int

Private Methods

Method Description
ConvertFromBitCharacter ( char c ) : int
ConvertFromHexCharacter ( char c ) : int
ConvertToSign ( char c ) : int
ToSignedHex ( StringBuilder sb, long minValue, long maxValue ) : long
WriteHexNibble ( StringBuilder dest, int nibble, bool lower ) : void
WriteHexNibble ( StringBuilder dest, uint nibble, bool lower ) : void

Method Details

Edit() public method

public Edit ( HexBufferPoint position, int cellPosition, char c ) : PositionAndData?
position HexBufferPoint
cellPosition int
c char
return PositionAndData?

EditBit() protected method

protected EditBit ( HexBufferPoint position, int cellPosition, char c ) : PositionAndData?
position HexBufferPoint
cellPosition int
c char
return PositionAndData?

EditCore() protected method

protected EditCore ( HexBufferPoint position, int cellPosition, char c ) : PositionAndData?
position HexBufferPoint
cellPosition int
c char
return PositionAndData?

EditSignedHex() protected method

protected EditSignedHex ( HexBufferPoint position, int cellPosition, char c, bool isBigEndian ) : PositionAndData?
position HexBufferPoint
cellPosition int
c char
isBigEndian bool
return PositionAndData?

EditSignedHexBigEndian() protected method

protected EditSignedHexBigEndian ( HexBufferPoint position, int cellPosition, char c ) : PositionAndData?
position HexBufferPoint
cellPosition int
c char
return PositionAndData?

EditSignedHexLittleEndian() protected method

protected EditSignedHexLittleEndian ( HexBufferPoint position, int cellPosition, char c ) : PositionAndData?
position HexBufferPoint
cellPosition int
c char
return PositionAndData?

EditUnsignedHexBigEndian() protected method

protected EditUnsignedHexBigEndian ( HexBufferPoint position, int cellPosition, char c ) : PositionAndData?
position HexBufferPoint
cellPosition int
c char
return PositionAndData?

EditUnsignedHexLittleEndian() protected method

protected EditUnsignedHexLittleEndian ( HexBufferPoint position, int cellPosition, char c ) : PositionAndData?
position HexBufferPoint
cellPosition int
c char
return PositionAndData?

FormatDecimalInt16() protected method

protected FormatDecimalInt16 ( StringBuilder dest, HexValueFormatterFlags flags, short v ) : int
dest StringBuilder
flags HexValueFormatterFlags
v short
return int

FormatDecimalInt32() protected method

protected FormatDecimalInt32 ( StringBuilder dest, HexValueFormatterFlags flags, int v ) : int
dest StringBuilder
flags HexValueFormatterFlags
v int
return int

FormatDecimalInt64() protected method

protected FormatDecimalInt64 ( StringBuilder dest, HexValueFormatterFlags flags, long v ) : int
dest StringBuilder
flags HexValueFormatterFlags
v long
return int

FormatDecimalSByte() protected method

protected FormatDecimalSByte ( StringBuilder dest, HexValueFormatterFlags flags, sbyte v ) : int
dest StringBuilder
flags HexValueFormatterFlags
v sbyte
return int

FormatDecimalUInt16() protected method

protected FormatDecimalUInt16 ( StringBuilder dest, HexValueFormatterFlags flags, ushort v ) : int
dest StringBuilder
flags HexValueFormatterFlags
v ushort
return int

FormatDecimalUInt32() protected method

protected FormatDecimalUInt32 ( StringBuilder dest, HexValueFormatterFlags flags, uint v ) : int
dest StringBuilder
flags HexValueFormatterFlags
v uint
return int

FormatDecimalUInt64() protected method

protected FormatDecimalUInt64 ( StringBuilder dest, HexValueFormatterFlags flags, ulong v ) : int
dest StringBuilder
flags HexValueFormatterFlags
v ulong
return int

FormatDouble() protected method

protected FormatDouble ( StringBuilder dest, HexValueFormatterFlags flags, double v ) : int
dest StringBuilder
flags HexValueFormatterFlags
v double
return int

FormatHexInt16() protected method

protected FormatHexInt16 ( StringBuilder dest, HexValueFormatterFlags flags, short v ) : int
dest StringBuilder
flags HexValueFormatterFlags
v short
return int

FormatHexInt32() protected method

protected FormatHexInt32 ( StringBuilder dest, HexValueFormatterFlags flags, int v ) : int
dest StringBuilder
flags HexValueFormatterFlags
v int
return int

FormatHexInt64() protected method

protected FormatHexInt64 ( StringBuilder dest, HexValueFormatterFlags flags, long v ) : int
dest StringBuilder
flags HexValueFormatterFlags
v long
return int

FormatHexSByte() protected method

protected FormatHexSByte ( StringBuilder dest, HexValueFormatterFlags flags, sbyte v ) : int
dest StringBuilder
flags HexValueFormatterFlags
v sbyte
return int

FormatHexUInt16() protected method

protected FormatHexUInt16 ( StringBuilder dest, HexValueFormatterFlags flags, ushort v ) : int
dest StringBuilder
flags HexValueFormatterFlags
v ushort
return int

FormatHexUInt32() protected method

protected FormatHexUInt32 ( StringBuilder dest, HexValueFormatterFlags flags, uint v ) : int
dest StringBuilder
flags HexValueFormatterFlags
v uint
return int

FormatHexUInt64() protected method

protected FormatHexUInt64 ( StringBuilder dest, HexValueFormatterFlags flags, ulong v ) : int
dest StringBuilder
flags HexValueFormatterFlags
v ulong
return int

FormatSingle() protected method

protected FormatSingle ( StringBuilder dest, HexValueFormatterFlags flags, float v ) : int
dest StringBuilder
flags HexValueFormatterFlags
v float
return int

FormatValue() public abstract method

Formats the value and returns the number of spaces that were inserted before the number so exactly FormattedLength characters were written to dest
public abstract FormatValue ( StringBuilder dest, dnSpy.Contracts.Hex.HexBytes hexBytes, long valueIndex, HexValueFormatterFlags flags ) : int
dest StringBuilder Destination string builder
hexBytes dnSpy.Contracts.Hex.HexBytes Bytes
valueIndex long Index of value in
flags HexValueFormatterFlags Flags
return int

GetBufferSpan() public method

public GetBufferSpan ( HexBufferSpan bufferSpan, int cellPosition ) : HexBufferSpan
bufferSpan HexBufferSpan
cellPosition int
return HexBufferSpan

HexValueFormatter() protected method

protected HexValueFormatter ( int byteCount, int formattedLength, HexValuesDisplayFormat format ) : System
byteCount int
formattedLength int
format HexValuesDisplayFormat
return System

WriteFormattedValue() protected method

protected WriteFormattedValue ( StringBuilder dest, string formattedValue ) : int
dest StringBuilder
formattedValue string
return int

WriteHexByte() protected method

protected WriteHexByte ( StringBuilder dest, HexValueFormatterFlags flags, byte b ) : void
dest StringBuilder
flags HexValueFormatterFlags
b byte
return void

WriteHexUInt16() protected method

protected WriteHexUInt16 ( StringBuilder dest, HexValueFormatterFlags flags, ushort v ) : void
dest StringBuilder
flags HexValueFormatterFlags
v ushort
return void

WriteHexUInt32() protected method

protected WriteHexUInt32 ( StringBuilder dest, HexValueFormatterFlags flags, uint v ) : void
dest StringBuilder
flags HexValueFormatterFlags
v uint
return void

WriteHexUInt64() protected method

protected WriteHexUInt64 ( StringBuilder dest, HexValueFormatterFlags flags, ulong v ) : void
dest StringBuilder
flags HexValueFormatterFlags
v ulong
return void

WriteInvalid() protected method

protected WriteInvalid ( StringBuilder dest ) : int
dest StringBuilder
return int

Property Details

culture protected_oe static_oe property

protected static CultureInfo,System.Globalization culture
return System.Globalization.CultureInfo