Interface IBinaryTokenStreamWriter
Namespace: Orleans.Serialization
Assembly: Orleans.Core.Abstractions.dll
Syntax
public interface IBinaryTokenStreamWriter
Properties
| Improve this Doc View SourceCurrentOffset
Current write position in the stream.
Declaration
int CurrentOffset { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Methods
| Improve this Doc View SourceReleaseBuffers()
Release any serialization buffers being used by this stream.
Declaration
void ReleaseBuffers()
ToByteArray()
Return the output stream as a byte[].
Declaration
byte[] ToByteArray()
Returns
| Type | Description |
|---|---|
| System.Byte[] | Data from this stream, converted to output type. |
ToBytes()
Return the output stream as a set of ArraySegment.
Declaration
List<ArraySegment<byte>> ToBytes()
Returns
| Type | Description |
|---|---|
| List<ArraySegment<System.Byte>> | Data from this stream, converted to output type. |
TryWriteSimpleObject(Object)
Try to write a simple type (non-array) value to the stream.
Declaration
bool TryWriteSimpleObject(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | obj | Input object to be written to the output stream. |
Returns
| Type | Description |
|---|---|
| System.Boolean | Returns |
Write(DateTime)
Write a DataTime value to the stream.
Declaration
void Write(DateTime dt)
Parameters
| Type | Name | Description |
|---|---|---|
| DateTime | dt |
Write(Guid)
Write a Guid value to the stream.
Declaration
void Write(Guid id)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | id |
Write(IPAddress)
Write a IPAddress value to the stream.
Declaration
void Write(IPAddress ip)
Parameters
| Type | Name | Description |
|---|---|---|
| IPAddress | ip |
Write(IPEndPoint)
Write a IPEndPoint value to the stream.
Declaration
void Write(IPEndPoint ep)
Parameters
| Type | Name | Description |
|---|---|---|
| IPEndPoint | ep |
Write(List<ArraySegment<Byte>>)
Write a list of byte array segments to the stream.
Declaration
void Write(List<ArraySegment<byte>> bytes)
Parameters
| Type | Name | Description |
|---|---|---|
| List<ArraySegment<System.Byte>> | bytes |
Write(SiloAddress)
Write a SiloAddress value to the stream.
Declaration
void Write(SiloAddress addr)
Parameters
| Type | Name | Description |
|---|---|---|
| SiloAddress | addr |
Write(Boolean)
Write a bool value to the stream.
Declaration
void Write(bool b)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | b |
Write(Boolean[])
Write a bool[] value to the stream.
Declaration
void Write(bool[] l)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean[] | l |
Write(Byte)
Write a byte value to the stream.
Declaration
void Write(byte b)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte | b |
Write(Byte[])
Write a byte[] value to the stream.
Declaration
void Write(byte[] b)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte[] | b |
Write(Byte[], Int32, Int32)
Write the specified number of bytes to the stream, starting at the specified offset in the input byte[].
Declaration
void Write(byte[] b, int offset, int count)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte[] | b | The input data to be written. |
| System.Int32 | offset | The offset into the inout byte[] to start writing bytes from. |
| System.Int32 | count | The number of bytes to be written. |
Write(Char)
Write a char value to the stream.
Declaration
void Write(char c)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Char | c |
Write(Char[])
Write a char[] value to the stream.
Declaration
void Write(char[] l)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Char[] | l |
Write(Decimal)
Write a decimal value to the stream.
Declaration
void Write(decimal d)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Decimal | d |
Write(Double)
Write a double value to the stream.
Declaration
void Write(double d)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | d |
Write(Double[])
Write a double[] value to the stream.
Declaration
void Write(double[] d)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double[] | d |
Write(Int16)
Write an Int16 value to the stream.
Declaration
void Write(short s)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int16 | s |
Write(Int16[])
Write a Int16[] value to the stream.
Declaration
void Write(short[] i)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int16[] | i |
Write(Int32)
Write an Int32 value to the stream.
Declaration
void Write(int i)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | i |
Write(Int32[])
Write a Int32[] value to the stream.
Declaration
void Write(int[] i)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32[] | i |
Write(Int64)
Write an Int64 value to the stream.
Declaration
void Write(long l)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int64 | l |
Write(Int64[])
Write a Int64[] value to the stream.
Declaration
void Write(long[] l)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int64[] | l |
Write(SByte)
Write a sbyte value to the stream.
Declaration
void Write(sbyte b)
Parameters
| Type | Name | Description |
|---|---|---|
| System.SByte | b |
Write(SByte[])
Write a sbyte[] value to the stream.
Declaration
void Write(sbyte[] l)
Parameters
| Type | Name | Description |
|---|---|---|
| System.SByte[] | l |
Write(Single)
Write a float value to the stream.
Declaration
void Write(float f)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | f |
Write(Single[])
Write a float[] value to the stream.
Declaration
void Write(float[] f)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single[] | f |
Write(String)
Write a string value to the stream.
Declaration
void Write(string s)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | s |
Write(UInt16)
Write a UInt16 value to the stream.
Declaration
void Write(ushort u)
Parameters
| Type | Name | Description |
|---|---|---|
| System.UInt16 | u |
Write(UInt16[])
Write a UInt16[] value to the stream.
Declaration
void Write(ushort[] i)
Parameters
| Type | Name | Description |
|---|---|---|
| System.UInt16[] | i |
Write(UInt32)
Write a UInt32 value to the stream.
Declaration
void Write(uint u)
Parameters
| Type | Name | Description |
|---|---|---|
| System.UInt32 | u |
Write(UInt32[])
Write a UInt32[] value to the stream.
Declaration
void Write(uint[] i)
Parameters
| Type | Name | Description |
|---|---|---|
| System.UInt32[] | i |
Write(UInt64)
Write a UInt64 value to the stream.
Declaration
void Write(ulong u)
Parameters
| Type | Name | Description |
|---|---|---|
| System.UInt64 | u |
Write(UInt64[])
Write a UInt64[] value to the stream.
Declaration
void Write(ulong[] l)
Parameters
| Type | Name | Description |
|---|---|---|
| System.UInt64[] | l |
Write(TimeSpan)
Write a TimeSpan value to the stream.
Declaration
void Write(TimeSpan ts)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeSpan | ts |
WriteNull()
Write a null value to the stream.
Declaration
void WriteNull()
WriteTypeHeader(Type, Type)
Write a type header for the specified Type to the stream.
Declaration
void WriteTypeHeader(Type t, Type expected = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | t | Type to write header for. |
| Type | expected | Currently expected Type for this stream. |