Interface IByteProvider
Defines a byte provider for HexBox control
Namespace: Be.Windows.Forms
Assembly: Be.Windows.Forms.HexBox.dll
Syntax
public interface IByteProvider
Properties
View SourceLength
Returns the total length of bytes the byte provider is providing.
Declaration
long Length { get; }
Property Value
| Type | Description |
|---|---|
| long |
Methods
View SourceApplyChanges()
Applies changes.
Declaration
void ApplyChanges()
DeleteBytes(long, long)
Deletes bytes from the provider
Declaration
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 the bytes to delete |
Remarks
This method must raise the LengthChanged event.
HasChanges()
True, when changes are done.
Declaration
bool HasChanges()
Returns
| Type | Description |
|---|---|
| bool |
InsertBytes(long, byte[])
Inserts bytes into the provider
Declaration
void InsertBytes(long index, byte[] bs)
Parameters
| Type | Name | Description |
|---|---|---|
| long | index | |
| byte[] | bs |
Remarks
This method must raise the LengthChanged event.
ReadByte(long)
Reads a byte from the provider
Declaration
byte ReadByte(long index)
Parameters
| Type | Name | Description |
|---|---|---|
| long | index | the index of the byte to read |
Returns
| Type | Description |
|---|---|
| byte | the byte to read |
SupportsDeleteBytes()
Returns a value if the DeleteBytes methods is supported by the provider.
Declaration
bool SupportsDeleteBytes()
Returns
| Type | Description |
|---|---|
| bool | True, when it´s supported. |
SupportsInsertBytes()
Returns a value if the InsertBytes methods is supported by the provider.
Declaration
bool SupportsInsertBytes()
Returns
| Type | Description |
|---|---|
| bool | True, when it´s supported. |
SupportsWriteByte()
Returns a value if the WriteByte methods is supported by the provider.
Declaration
bool SupportsWriteByte()
Returns
| Type | Description |
|---|---|
| bool | True, when it´s supported. |
WriteByte(long, byte)
Writes a byte into the provider
Declaration
void WriteByte(long index, byte value)
Parameters
| Type | Name | Description |
|---|---|---|
| long | index | the index of the byte to write |
| byte | value | the byte to write |
Events
View SourceChanged
Occurs, when bytes are changed.
Declaration
event EventHandler Changed
Event Type
| Type | Description |
|---|---|
| EventHandler |
LengthChanged
Occurs, when the Length property changed.
Declaration
event EventHandler LengthChanged
Event Type
| Type | Description |
|---|---|
| EventHandler |