Class CdrWriter
A CDR encoder, which writes primitives with the required alignment.
public sealed class CdrWriter : IDisposable
- Inheritance
-
CdrWriter
- Implements
- Inherited Members
Constructors
CdrWriter()
Creates an encoder with the encapsulation header already written.
public CdrWriter()
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
ToBytes()
Takes the encoded bytes, leaving the encoder spent.
public byte[] ToBytes()
Returns
- byte[]
The encoded bytes.
Remarks
The native call consumes the encoder, so this hands ownership over and the handle must not be used again.
Exceptions
- PamojaException
The encoder was already spent.
WriteDouble(double)
Appends a 64-bit float.
public void WriteDouble(double value)
Parameters
valuedoubleThe value to append.
WriteInt32(int)
Appends a 32-bit signed integer.
public void WriteInt32(int value)
Parameters
valueintThe value to append.
WriteSingle(float)
Appends a 32-bit float.
public void WriteSingle(float value)
Parameters
valuefloatThe value to append.
WriteUInt32(uint)
Appends a 32-bit unsigned integer.
public void WriteUInt32(uint value)
Parameters
valueuintThe value to append.