Assembly: DiscreteLogics.TeaFiles (in DiscreteLogics.TeaFiles.dll) Version: 18.104.22.168 (22.214.171.124)
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.
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.
When a file is read with a TeaFile, the description is read from the file. The TeaFile's property will return this description and its property will indicate that it was read from the file header.