Interface IEncoder
Represents encoder.
Namespace: OnixS.SimpleBinaryEncoding
Assembly: OnixS.SimpleBinaryEncoding.dll
Syntax
public interface IEncoder
Methods
Get(Int32)
Creates a new message object without wrapping over the buffer.
Declaration
IMessage Get(int templateId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | templateId | Message template id. |
Returns
Type | Description |
---|---|
IMessage | Message for encoding. |
GetPreCreatedMessage(Int32)
Returns pre-created message object without wrapping over the buffer.
Declaration
IMessage GetPreCreatedMessage(int templateId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | templateId | Message template id. |
Returns
Type | Description |
---|---|
IMessage | Message for encoding. |
Wrap(Int32, MemoryPointer<Byte>)
Creates a new message object wrapped over an empty data buffer. Sets header fields.
Declaration
IMessage Wrap(int templateId, MemoryPointer<byte> data)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | templateId | Message template id. |
MemoryPointer<System.Byte> | data | Pointer to buffer. |
Returns
Type | Description |
---|---|
IMessage | Message for encoding. |
Wrap(Int32, Int32)
Creates a new message object wrapped over the newly created buffer. Sets header fields.
Declaration
IMessage Wrap(int templateId, int expectedLength = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | templateId | Message template id. |
System.Int32 | expectedLength | Expected message length.
|
Returns
Type | Description |
---|---|
IMessage | Message for encoding. |
WrapPreCreatedMessage(Int32, MemoryPointer<Byte>)
Returns pre-created message object wrapped over an empty data buffer. Sets header fields.
Declaration
IMessage WrapPreCreatedMessage(int templateId, MemoryPointer<byte> data)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | templateId | Message template id. |
MemoryPointer<System.Byte> | data | Pointer to buffer. |
Returns
Type | Description |
---|---|
IMessage | Message for encoding. |
WrapPreCreatedMessage(Int32, Int32)
Returns pre-created message object wrapped over the newly created buffer. Sets header fields.
Declaration
IMessage WrapPreCreatedMessage(int templateId, int expectedLength = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | templateId | Message template id. |
System.Int32 | expectedLength | Expected message length.
|
Returns
Type | Description |
---|---|
IMessage | Message for encoding. |