Show / Hide Table of Contents

Interface ISerializerProvider

Provides functionality to get ISerializers by their priorities.

Namespace: Sartorius.SAF.Serialization
Assembly: Sartorius.SAF.dll
Syntax
public interface ISerializerProvider

Methods

View Source

Deserialize<T>(Stream)

Deserializes an object of type T from the specified stream.

Declaration
T Deserialize<T>(Stream stream)
Parameters
Type Name Description
System.IO.Stream stream

The stream from which the serialized object is read.

Returns
Type Description
T
Type Parameters
Name Description
T

The type to deserialize.

Remarks

This will try serializers according to their priority.

View Source

GetSerializer(Int32)

Gets the ISerializer with the specified priority.

Declaration
ISerializer GetSerializer(int prio)
Parameters
Type Name Description
System.Int32 prio

The priority.

Returns
Type Description
ISerializer

The ISerializer with the specified priority; null if no serializer with the given priority exists.

View Source

Serialize(Stream, Object)

Serializes the specified graph to the specified stream.

Declaration
void Serialize(Stream stream, object graph)
Parameters
Type Name Description
System.IO.Stream stream

The stream in which the serialized object is written.

System.Object graph

The graph to serialize.

Remarks

This will always use the serializer with the top priority.

Extension Methods

CollectionExtensions.AddRange<T, TCollection>(TCollection, IEnumerable<T>)
SerializableObjectCloneExtension.Clone<T>(T)

See Also

ISerializer
SerializerExportAttribute
  • View Source
Back to top Generated by DocFX