Click or drag to resize

SerializerT Class

Provides a base class for a type that is capable of (de)serializing data to and from a specific format.
Inheritance Hierarchy
SystemObject
  Enkoni.Framework.SerializationSerializerT
    Enkoni.Framework.SerializationCsvSerializerT

Namespace:  Enkoni.Framework.Serialization
Assembly:  Enkoni.Framework.Serialization (in Enkoni.Framework.Serialization.dll) Version: 1.3.0.1
Syntax
public abstract class Serializer<T>
where T : new()

Type Parameters

T
Type of the object that has to be serialized.

The SerializerT type exposes the following members.

Constructors
  NameDescription
Protected methodSerializerT
Initializes a new instance of the SerializerT class.
Protected methodSerializerT(TransformerT)
Initializes a new instance of the SerializerT class.
Top
Properties
  NameDescription
Public propertyDefaultEncoding
Gets or sets the default encoding that will be used when no encoding is specified.
Protected propertyTransformer
Gets or sets the transformer that transforms single objects into a specific format.
Top
Methods
  NameDescription
Public methodBeginDeserialize(Stream, AsyncCallback, Object)
Begins to deserialize the objects from the specified stream using a default encoding.
Public methodBeginDeserialize(String, AsyncCallback, Object)
Begins to deserialize the objects from the specified file using a default encoding.
Public methodBeginDeserialize(Stream, Encoding, AsyncCallback, Object)
Begins to deserialize the objects from the specified stream using the specified encoding.
Public methodBeginDeserialize(String, Encoding, AsyncCallback, Object)
Begins to deserialize the objects from the specified file using the specified encoding.
Public methodBeginSerialize(IEnumerableT, Stream, AsyncCallback, Object)
Begins to serialize the objects to the specified stream using a default encoding.
Public methodBeginSerialize(IEnumerableT, String, AsyncCallback, Object)
Begins to serialize the objects to the specified file using a default encoding.
Public methodBeginSerialize(IEnumerableT, Stream, Encoding, AsyncCallback, Object)
Begins to serialize the objects to the specified stream using the specified encoding.
Public methodBeginSerialize(IEnumerableT, String, Encoding, AsyncCallback, Object)
Begins to serialize the objects to the specified file using the specified encoding.
Public methodDeserialize(Stream)
Deserializes CSV data to a list of objects using a default encoding of UTF-8.
Protected methodDeserialize(StreamReader)
Deserializes a collection of objects using the data that is accessible through the specified stream reader.
Public methodDeserialize(String)
Deserializes a CSV to a list of objects using a default encoding of UTF-8.
Public methodDeserialize(Stream, Encoding)
Deserializes a CSV to a list of objects.
Public methodDeserialize(String, Encoding)
Deserializes a CSV to a list of objects.
Public methodEndDeserialize
Waits for the pending asynchronous deserialize operation to complete. If an exception was thrown during the execution of the asynchronous operation, it is rethrown when invoking this method.
Public methodEndSerialize
Waits for the pending asynchronous serialize operation to complete. If an exception was thrown during the execution of the asynchronous operation, it is rethrown when invoking this method.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodSerialize(IEnumerableT, Stream)
Serializes a list of objects to a stream using a default encoding.
Public methodSerialize(IEnumerableT, String)
Serializes a list of objects to a file using a default encoding.
Public methodSerialize(IEnumerableT, Stream, Encoding)
Serializes a list of objects to a stream.
Public methodSerialize(IEnumerableT, String, Encoding)
Serializes a list of objects to a file.
Protected methodSerialize(IEnumerableT, Encoding, Stream)
Serializes a collection of items by transforming each item using the Transformer property and writing the transformed item to the stream. Each item will be separated using the new line character(s) of the current environment.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also