Skip to content
Documentation

ISerializer<TData> Interface

Provides methods for serializing and deserializing TData instances to/from a System.IO.Stream.

public interface ISerializer<TData> : HAKOM.Serialization.Core.Net.Api.ISerializer

TData

The type of objects the serializer can serialize/deserialize.

Derived
↳ Serializer<TData,TParameters>
↳ XmlSerializer<TData>

Implements ISerializer

ISerializer<TData>.Deserialize(Stream, CancellationToken) Method

Section titled “ISerializer<TData>.Deserialize(Stream, CancellationToken) Method”

Attempts to deserialize an object of type TData from the given inputStream.

System.Threading.Tasks.Task<TData?> Deserialize(System.IO.Stream inputStream, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

inputStream System.IO.Stream

The System.IO.Stream to deserialize from.

cancellationToken System.Threading.CancellationToken

A System.Threading.CancellationToken to signal the operation that it should be canceled.

System.Threading.Tasks.Task<TData>
A task that completes when deserialization is done.

ISerializer<TData>.Serialize(TData, Stream, CancellationToken) Method

Section titled “ISerializer<TData>.Serialize(TData, Stream, CancellationToken) Method”

Serializes the given instance of TData to the outputStream.

System.Threading.Tasks.Task Serialize(TData data, System.IO.Stream outputStream, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

data TData

The object to serialize.

outputStream System.IO.Stream

The System.IO.Stream to serialize to.

cancellationToken System.Threading.CancellationToken

A System.Threading.CancellationToken to signal the operation that it should be canceled.

System.Threading.Tasks.Task
A task that completes when data has been serialized.

© 2026 Volue.Version v0.6.38017 November 2026