Table of Contents

Class StreamFormatter<TOptions>

Namespace
Cuemon.Runtime.Serialization.Formatters
Assembly
Cuemon.Core.dll

Serializes and deserializes an object, in System.IO.Stream format.

public abstract class StreamFormatter<TOptions> : Formatter<Stream>, IConfigurable<TOptions> where TOptions : class, IParameterObject, new()

Type Parameters

TOptions
Serializes and deserializes an object, in format.
Inheritance
Object
Formatter<Stream>
StreamFormatter<TOptions>
Implements
IConfigurable<TOptions>
Derived
Inherited Members

Constructors

StreamFormatter()

Initializes a new instance of the StreamFormatter<TOptions> class.

protected StreamFormatter()

StreamFormatter(TOptions)

Initializes a new instance of the StreamFormatter<TOptions> class.

protected StreamFormatter(TOptions options)

Parameters

options TOptions

The configured options.

StreamFormatter(Action<TOptions>)

Initializes a new instance of the StreamFormatter<TOptions> class.

protected StreamFormatter(Action<TOptions> setup)

Parameters

setup Action<TOptions>

The setup delegate which need to be configured.

Properties

Options

Gets the configured options of this StreamFormatter<TOptions>.

public TOptions Options { get; }

Property Value

TOptions

The configured options of this StreamFormatter<TOptions>.

Methods

DeserializeObject(Stream, Type)

Deserializes the specified value into an object of objectType.

public static object DeserializeObject(Stream value, Type objectType)

Parameters

value Stream

The string from which to deserialize the object graph.

objectType Type

The type of the deserialized object.

Returns

Object

An object of objectType.

DeserializeObject(Stream, Type, TOptions)

Deserializes the specified value into an object of objectType.

public static object DeserializeObject(Stream value, Type objectType, TOptions options)

Parameters

value Stream

The string from which to deserialize the object graph.

objectType Type

The type of the deserialized object.

options TOptions

The configured TOptions.

Returns

Object

An object of objectType.

DeserializeObject(Stream, Type, Action<TOptions>)

Deserializes the specified value into an object of objectType.

public static object DeserializeObject(Stream value, Type objectType, Action<TOptions> setup)

Parameters

value Stream

The string from which to deserialize the object graph.

objectType Type

The type of the deserialized object.

setup Action<TOptions>

The TOptions which may be configured.

Returns

Object

An object of objectType.

DeserializeObject<T>(Stream)

Deserializes the specified value into an object of T.

public static T DeserializeObject<T>(Stream value)

Parameters

value Stream

The object from which to deserialize the object graph.

Returns

T

An object of T.

Type Parameters

T

The type of the object to return.

DeserializeObject<T>(Stream, TOptions)

Deserializes the specified value into an object of T.

public static T DeserializeObject<T>(Stream value, TOptions options)

Parameters

value Stream

The object from which to deserialize the object graph.

options TOptions

The configured TOptions.

Returns

T

An object of T.

Type Parameters

T

The type of the object to return.

DeserializeObject<T>(Stream, Action<TOptions>)

Deserializes the specified value into an object of T.

public static T DeserializeObject<T>(Stream value, Action<TOptions> setup)

Parameters

value Stream

The object from which to deserialize the object graph.

setup Action<TOptions>

The TOptions which may be configured.

Returns

T

An object of T.

Type Parameters

T

The type of the object to return.

SerializeObject(Object)

Serializes the specified source to an object of System.IO.Stream.

public static Stream SerializeObject(object source)

Parameters

source Object

The object to serialize to System.IO.Stream format.

Returns

Stream

A System.IO.Stream of the serialized source.

SerializeObject(Object, TOptions)

Serializes the specified source to an object of System.IO.Stream.

public static Stream SerializeObject(object source, TOptions options)

Parameters

source Object

The object to serialize to System.IO.Stream format.

options TOptions

The configured TOptions.

Returns

Stream

A System.IO.Stream of the serialized source.

SerializeObject(Object, Action<TOptions>)

Serializes the specified source to an object of System.IO.Stream.

public static Stream SerializeObject(object source, Action<TOptions> setup)

Parameters

source Object

The object to serialize to System.IO.Stream format.

setup Action<TOptions>

The TOptions which may be configured.

Returns

Stream

A System.IO.Stream of the serialized source.

SerializeObject(Object, Type)

Serializes the specified source to an object of System.IO.Stream.

public static Stream SerializeObject(object source, Type objectType)

Parameters

source Object

The object to serialize to System.IO.Stream format.

objectType Type

The type of the object to serialize.

Returns

Stream

A System.IO.Stream of the serialized source.

SerializeObject(Object, Type, TOptions)

Serializes the specified source to an object of System.IO.Stream.

public static Stream SerializeObject(object source, Type objectType, TOptions options)

Parameters

source Object

The object to serialize to System.IO.Stream format.

objectType Type

The type of the object to serialize.

options TOptions

The configured TOptions.

Returns

Stream

A System.IO.Stream of the serialized source.

SerializeObject(Object, Type, Action<TOptions>)

Serializes the specified source to an object of System.IO.Stream.

public static Stream SerializeObject(object source, Type objectType, Action<TOptions> setup)

Parameters

source Object

The object to serialize to System.IO.Stream format.

objectType Type

The type of the object to serialize.

setup Action<TOptions>

The TOptions which may be configured.

Returns

Stream

A System.IO.Stream of the serialized source.

See Also

Formatter<TFormat>