[This is preliminary documentation and is subject to change.]

Searches the database for BlockDBEntries, based on given criteria.

Namespace: fCraft
Assembly: fCraft (in fCraft.dll) Version: 0.6.3.1 (0.6.3.1)

Syntax

   
 C# 
[NotNullAttribute]
public BlockDBEntry[] Lookup(
	int max,
	BlockDBSearchType searchType,
	Func<BlockDBEntry, bool> selector
)

Parameters

max
Int32
Maximum number of entries to check.
searchType
BlockDBSearchType
Type of search (ReturnAll, ReturnOldest, or ReturnNewest). See BlockDBSearchType enum.
selector
Func<(Of <(<'BlockDBEntry, Boolean>)>)>
Function used to select BlockDBEntries to be returned.

Return Value

Array of BlockDBEntry structs.

Exceptions

ExceptionCondition
System..::..InvalidOperationException If BlockDB is disabled.
System..::..ArgumentOutOfRangeException If max is less than 0.
System..::..ArgumentNullException If selector is null.
System.IO..::..EndOfStreamException If the end of .fbdb file was reached prematurely (corrupted file, or outside interference).
System..::..DataMisalignedException If .fbdb file is not aligned to 20 bytes (likely corrupted).
System.IO..::..IOException If an I/O error occured while trying to read .fbdb file from disk.

See Also