Describes the type of items stored in a TeaFile.

Namespace: TeaTime
Assembly: DiscreteLogics.TeaFiles (in DiscreteLogics.TeaFiles.dll) Version: (


public class ItemDescription


This description is infered from the generic argument of a TeaFile<(Of <(<'T>)>)> and persisted into the file when a new file is created. This description allows the file to be read without having knowledge about its content, thus making it self contained.

Creation of a TeaFile

When a file is written using TeaFile<(Of <(<'T>)>)>, an ItemDescription is created based on type reflection and additional analysis to get the field offsets. This description is persisted inside the file.

Typed Reading

When a file is read using TeaFile<(Of <(<'T>)>)>, the ItemDesciption is created from reflection and analysis exactly as during creation. The file however holds another description that was persisted during creation. These descriptions should match in order to return correct values. TeaFile<(Of <(<'T>)>)>.OpenRead() will compare them to ensure that. If they do not match, a TypeMismatchException is thrown.

Untyped Reading

When a file is read with a TeaFile, the description is read from the file. The TeaFile's ItemDescription property will return this description and its Source()()()() property will indicate that it was read from the file header.

See Also