Collapse All Expand All

C#

Oracle® Coherence .NET API Reference
PofStreamWriter..::.WriteDictionary<(Of <(TKey, TValue>)>) Method (Int32, IDictionary<(Of <(TKey, TValue>)>))
PofStreamWriter Class See Also Send Feedback

Oracle® Coherence .NET API Reference Release 3.6
E15727-01
Write a generic IDictionary<TKey, TValue> property to the POF stream.

Namespace: Tangosol.IO.Pof
Assembly: Coherence (in Coherence.dll) Version: 3.6.0.0 (3.6.0.0)

# Syntax

C#
    public virtual void WriteDictionary<TKey, TValue>(
    	int index,
    	IDictionary<TKey, TValue> dict
    )

#### Parameters

index
  Type: System..::.Int32
  The property index.

dict
  Type: System.Collections.Generic..::.IDictionary<(Of <(TKey, TValue>)>)
  The IDictionary<TKey, TValue> property value to write.

# Type Parameters

TKey
  The type of the keys in the dictionary.
TValue
  The type of the values in the dictionary.

#### Implements

IPofWriter..::.WriteDictionary<(Of <(TKey, TValue>)>)(Int32, IDictionary<(Of <(TKey, TValue>)>))

# Remarks

Each key and value of the given dictionary must be an instance (or an array of instances) of one of the following:

- Boolean
- Byte
- Char
- Int16
- Int32
- Int64
- Single
- Double
- Decimal
- Binary
- String
- DateTime
- TimeSpan
- ICollection
- ILongArray
- RawTime
- RawDateTime
- RawYearMonthInterval
- IPortableObject

Otherwise, an IPofSerializer for each key and value of the dictionary must be obtainable from the IPofContext associated with this PofStreamWriter.

# Exceptions

Exception | Condition
--- | ---
System..::.ArgumentException | If the property index is invalid, or is less than or equal to the index of the previous property written to the POF stream, or if the given property cannot be encoded into a POF stream.
System.IO..::.IOException | If an I/O error occurs.

# See Also

PofStreamWriter Class
WriteDictionary Overload
Tangosol.IO.Pof Namespace