Class DynamicByteProvider
Byte provider for a small amount of data.
Implements
Inherited Members
Namespace: Be.Windows.Forms
Assembly: Be.Windows.Forms.HexBox.dll
Syntax
public class DynamicByteProvider : IByteProvider
Constructors
View SourceDynamicByteProvider(byte[])
Initializes a new instance of the DynamicByteProvider class.
Declaration
public DynamicByteProvider(byte[] data)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | data |
DynamicByteProvider(List<byte>)
Initializes a new instance of the DynamicByteProvider class.
Declaration
public DynamicByteProvider(List<byte> bytes)
Parameters
| Type | Name | Description |
|---|---|---|
| List<byte> | bytes |
Properties
View SourceBytes
Gets the byte collection.
Declaration
public List<byte> Bytes { get; }
Property Value
| Type | Description |
|---|---|
| List<byte> |
Length
Gets the length of the bytes in the byte collection.
Declaration
public long Length { get; }
Property Value
| Type | Description |
|---|---|
| long |
Methods
View SourceApplyChanges()
Applies changes.
Declaration
public void ApplyChanges()
DeleteBytes(long, long)
Deletes bytes from the byte collection.
Declaration
public void DeleteBytes(long index, long length)
Parameters
| Type | Name | Description |
|---|---|---|
| long | index | the start index of the bytes to delete. |
| long | length | the length of bytes to delete. |
HasChanges()
True, when changes are done.
Declaration
public bool HasChanges()
Returns
| Type | Description |
|---|---|
| bool |
InsertBytes(long, byte[])
Inserts byte into the byte collection.
Declaration
public void InsertBytes(long index, byte[] bs)
Parameters
| Type | Name | Description |
|---|---|---|
| long | index | the start index of the bytes in the byte collection |
| byte[] | bs | the byte array to insert |
ReadByte(long)
Reads a byte from the byte collection.
Declaration
public byte ReadByte(long index)
Parameters
| Type | Name | Description |
|---|---|---|
| long | index | the index of the byte to read |
Returns
| Type | Description |
|---|---|
| byte | the byte |
SupportsDeleteBytes()
Returns true
Declaration
public bool SupportsDeleteBytes()
Returns
| Type | Description |
|---|---|
| bool |
SupportsInsertBytes()
Returns true
Declaration
public bool SupportsInsertBytes()
Returns
| Type | Description |
|---|---|
| bool |
SupportsWriteByte()
Returns true
Declaration
public bool SupportsWriteByte()
Returns
| Type | Description |
|---|---|
| bool |
WriteByte(long, byte)
Write a byte into the byte collection.
Declaration
public void WriteByte(long index, byte value)
Parameters
| Type | Name | Description |
|---|---|---|
| long | index | the index of the byte to write. |
| byte | value | the byte |
Events
View SourceChanged
Occurs, when the write buffer contains new changes.
Declaration
public event EventHandler Changed
Event Type
| Type | Description |
|---|---|
| EventHandler |
LengthChanged
Occurs, when InsertBytes or DeleteBytes method is called.
Declaration
public event EventHandler LengthChanged
Event Type
| Type | Description |
|---|---|
| EventHandler |