Apache Ignite.NET
|
Binary serializer which reflectively writes all fields except of ones with System.NonSerializedAttribute. More...
Public Member Functions | |
void | WriteBinary (object obj, IBinaryWriter writer) |
Write binary object. More... | |
void | ReadBinary (object obj, IBinaryReader reader) |
Read binary object. More... | |
Properties | |
bool | RawMode [get, set] |
Gets or value indicating whether raw mode serialization should be used. More... | |
bool | ForceTimestamp [get, set] |
Gets or sets a value indicating whether all DateTime values should be written as Timestamp. More... | |
Note that Java platform stores dates as a difference between current time and predefined absolute UTC date. Therefore, this difference is always the same for all time zones. .NET, in contrast, stores dates as a difference between current time and some predefined date relative to the current time zone. It means that this difference will be different as you change time zones. To overcome this discrepancy Ignite always converts .Net date to UTC form before serializing and allows user to decide whether to deserialize them in UTC or local form using ReadTimestamp(..., true/false)
methods in IBinaryReader and IBinaryRawReader. This serializer always read dates in UTC form. It means that if you have local date in any field/property, it will be implicitly converted to UTC form after the first serialization-deserialization cycle.
void Apache.Ignite.Core.Binary.BinaryReflectiveSerializer.ReadBinary | ( | object | obj, |
IBinaryReader | reader | ||
) |
obj | Instantiated empty object. |
reader | Binary reader. |
Implements Apache.Ignite.Core.Binary.IBinarySerializer.
void Apache.Ignite.Core.Binary.BinaryReflectiveSerializer.WriteBinary | ( | object | obj, |
IBinaryWriter | writer | ||
) |
obj | Object. |
writer | Binary writer. |
Implements Apache.Ignite.Core.Binary.IBinarySerializer.
|
getset |
Timestamp format is required for values used in SQL and for interoperation with other platforms. Only UTC values are supported in Timestamp format. Other values will cause an exception on write.
Normally serializer uses IBinaryWriter.WriteObject<T> for DateTime fields. This attribute changes the behavior to IBinaryWriter.WriteTimestamp.
See also TimestampAttribute.
|
getset |
Raw mode does not include field names, improving performance and memory usage. However, queries do not support raw objects.