Opens a TeaFile for read.

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

Syntax

public static TeaFile<T> OpenRead(
	Stream stream,
	ItemDescriptionElements elementsToValidate
)

Parameters

stream
Type: System.IO..::..Stream
The underlying stream.
elementsToValidate
Type: TeaTime..::..ItemDescriptionElements
Elements of the ItemDescription to be checked. ItemDescriptionElements for details.

Return Value

The file open for reading.

Remarks

This overload allows a MemoryStream or any Stream implmementation to be used as the underlying persistence media or specifically opened streams, for instance with specific FileShare flags set.

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptionThrown when one or more required arguments are null.

See Also