Search Results for

Show / Hide Table of Contents

# Interface IBinaryWriter

Writer for binary objects.

###### Namespace: Apache.Ignite.Core.Binary

###### Assembly: Apache.Ignite.Core.dll

##### Syntax

    public interface IBinaryWriter

### Methods

#### GetRawWriter()

Get raw writer.

##### Declaration

    IBinaryRawWriter GetRawWriter()

##### Returns

Type | Description
--- | ---
IBinaryRawWriter | Raw writer.

#### WriteArray<T>(String, T[])

Write named object array.

##### Declaration

    void WriteArray<T>(string fieldName, T[] val)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | fieldName | Field name.
T[] | val | Object array.

##### Type Parameters

Name | Description
--- | ---
T |

#### WriteBoolean(String, Boolean)

Write named boolean value.

##### Declaration

    void WriteBoolean(string fieldName, bool val)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | fieldName | Field name.
System.Boolean | val | Boolean value.

#### WriteBooleanArray(String, Boolean[])

Write named boolean array.

##### Declaration

    void WriteBooleanArray(string fieldName, bool[] val)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | fieldName | Field name.
System.Boolean[] | val | Boolean array.

#### WriteByte(String, Byte)

Write named byte value.

##### Declaration

    void WriteByte(string fieldName, byte val)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | fieldName | Field name.
System.Byte | val | Byte value.

#### WriteByteArray(String, Byte[])

Write named byte array.

##### Declaration

    void WriteByteArray(string fieldName, byte[] val)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | fieldName | Field name.
System.Byte[] | val | Byte array.

#### WriteChar(String, Char)

Write named char value.

##### Declaration

    void WriteChar(string fieldName, char val)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | fieldName | Field name.
System.Char | val | Char value.

#### WriteCharArray(String, Char[])

Write named char array.

##### Declaration

    void WriteCharArray(string fieldName, char[] val)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | fieldName | Field name.
System.Char[] | val | Char array.

#### WriteCollection(String, ICollection)

Writes a named collection in interoperable form.

Use this method to communicate with other platforms or with nodes that need to read collection elements in binary form.

When there is no need for binarization or interoperability, please use WriteObject<T>(String, T), which will properly preserve generic collection type.

##### Declaration

    void WriteCollection(string fieldName, ICollection val)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | fieldName | Field name.
ICollection | val | Collection.

#### WriteDecimal(String, Nullable<Decimal>)

Write named decimal value.

##### Declaration

    void WriteDecimal(string fieldName, decimal? val)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | fieldName | Field name.
System.Nullable<System.Decimal> | val | Decimal value.

#### WriteDecimalArray(String, Nullable<Decimal>[])

Write named decimal array.

##### Declaration

    void WriteDecimalArray(string fieldName, decimal? [] val)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | fieldName | Field name.
System.Nullable<System.Decimal>[] | val | Decimal array.

#### WriteDictionary(String, IDictionary)

Writes a named dictionary in interoperable form.

Use this method to communicate with other platforms or with nodes that need to read dictionary elements in binary form.

When there is no need for binarization or interoperability, please use WriteObject<T>(String, T), which will properly preserve generic dictionary type.

##### Declaration

    void WriteDictionary(string fieldName, IDictionary val)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | fieldName | Field name.
IDictionary | val | Dictionary.

#### WriteDouble(String, Double)

Write named double value.

##### Declaration

    void WriteDouble(string fieldName, double val)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | fieldName | Field name.
System.Double | val | Double value.

#### WriteDoubleArray(String, Double[])

Write named double array.

##### Declaration

    void WriteDoubleArray(string fieldName, double[] val)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | fieldName | Field name.
System.Double[] | val | Double array.

#### WriteEnum<T>(String, T)

Write named enum value.

##### Declaration

    void WriteEnum<T>(string fieldName, T val)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | fieldName | Field name.
T | val | Enum value.

##### Type Parameters

Name | Description
--- | ---
T |

#### WriteEnumArray<T>(String, T[])

Write named enum array.

##### Declaration

    void WriteEnumArray<T>(string fieldName, T[] val)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | fieldName | Field name.
T[] | val | Enum array.

##### Type Parameters

Name | Description
--- | ---
T |

#### WriteFloat(String, Single)

Write named float value.

##### Declaration

    void WriteFloat(string fieldName, float val)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | fieldName | Field name.
System.Single | val | Float value.

#### WriteFloatArray(String, Single[])

Write named float array.

##### Declaration

    void WriteFloatArray(string fieldName, float[] val)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | fieldName | Field name.
System.Single[] | val | Float array.

#### WriteGuid(String, Nullable<Guid>)

Write named GUID value.

##### Declaration

    void WriteGuid(string fieldName, Guid? val)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | fieldName | Field name.
System.Nullable<Guid> | val | GUID value.

#### WriteGuidArray(String, Nullable<Guid>[])

Write named GUID array.

##### Declaration

    void WriteGuidArray(string fieldName, Guid? [] val)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | fieldName | Field name.
System.Nullable<Guid>[] | val | GUID array.

#### WriteInt(String, Int32)

Write named int value.

##### Declaration

    void WriteInt(string fieldName, int val)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | fieldName | Field name.
System.Int32 | val | Int value.

#### WriteIntArray(String, Int32[])

Write named int array.

##### Declaration

    void WriteIntArray(string fieldName, int[] val)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | fieldName | Field name.
System.Int32[] | val | Int array.

#### WriteLong(String, Int64)

Write named long value.

##### Declaration

    void WriteLong(string fieldName, long val)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | fieldName | Field name.
System.Int64 | val | Long value.

#### WriteLongArray(String, Int64[])

Write named long array.

##### Declaration

    void WriteLongArray(string fieldName, long[] val)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | fieldName | Field name.
System.Int64[] | val | Long array.

#### WriteObject<T>(String, T)

Write named object value.

##### Declaration

    void WriteObject<T>(string fieldName, T val)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | fieldName | Field name.
T | val | Object value.

##### Type Parameters

Name | Description
--- | ---
T |

#### WriteShort(String, Int16)

Write named short value.

##### Declaration

    void WriteShort(string fieldName, short val)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | fieldName | Field name.
System.Int16 | val | Short value.

#### WriteShortArray(String, Int16[])

Write named short array.

##### Declaration

    void WriteShortArray(string fieldName, short[] val)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | fieldName | Field name.
System.Int16[] | val | Short array.

#### WriteString(String, String)

Write named string value.

##### Declaration

    void WriteString(string fieldName, string val)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | fieldName | Field name.
System.String | val | String value.

#### WriteStringArray(String, String[])

Write named string array.

##### Declaration

    void WriteStringArray(string fieldName, string[] val)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | fieldName | Field name.
System.String[] | val | String array.

#### WriteTimestamp(String, Nullable<DateTime>)

Write named date value.

##### Declaration

    void WriteTimestamp(string fieldName, DateTime? val)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | fieldName | Field name.
System.Nullable<DateTime> | val | Date value.

#### WriteTimestampArray(String, Nullable<DateTime>[])

Write named date array.

##### Declaration

    void WriteTimestampArray(string fieldName, DateTime? [] val)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | fieldName | Field name.
System.Nullable<DateTime>[] | val | Date array.