Skip to content

Examples of string log entries. #30

Answered by sakno
natilivni asked this question in Q&A
Discussion options

You must be logged in to vote

Log entry is actually a binary object that can represent any data: primitive data types, strings of various encodings, ASN.1 serialized objects or even you own custom format. The log entry implements IDataTransferObject low-level interface. DTO here is the carrier of the payload. The structure of such payload is described by DTO itself. The key method of IDataTransferObject interface is WriteAsync which is responsible for producing serialized form of the structured content. GetObjectDataAsync allows to apply transformation to DTO.

Here is trivial implementation of string DTO:

using System;
using System.Threading;
using System.Threading.Tasks;
using DotNext.IO;
using DotNext.Net.Cluster.Co…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@natilivni
Comment options

@natilivni
Comment options

@natilivni
Comment options

@sakno
Comment options

Answer selected by natilivni
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants