Click or drag to resize

WritableT Class

Abstract base class for writable types that provides a default implementation of IWritable based on reflection and code generation.
Inheritance Hierarchy
SystemObject
  Ookii.Jumbo.IOWritableT
    Ookii.Jumbo.Jet.Samples.FPGrowthFGListItem
    Ookii.Jumbo.Jet.Samples.IOValSortRecord

Namespace:  Ookii.Jumbo.IO
Assembly:  Ookii.Jumbo (in Ookii.Jumbo.dll) Version: 2.0.0
Syntax
public abstract class Writable<T> : IWritable
where T : Writable<T>

Type Parameters

T
The type of the writable type; this should be the type inheriting from WritableT.

The WritableT type exposes the following members.

Constructors
  NameDescription
Protected methodWritableT
Initializes a new instance of the WritableT class
Top
Methods
  NameDescription
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 the default hash function.
(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 methodRead
Reads the object from the specified reader.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodWrite
Writes the object to the specified writer.
Top
Remarks

The generated IWritable implementation will serialize all properties of the type. Because IWritable types may be created uninitialized (without calling the constructor), you must be sure it's safe to deserialize a type by simply setting all its properties, even if the constructor hasn't been run.

Because the serializer and deserializer are generated from the type T, it is not safe to derive other classes from that type unless you override the Read(BinaryReader) and Write(BinaryWriter) implementations.

See Also