Full Code of litedb-org/LiteDB for AI

master c9d78eb90085 cached
418 files
4.8 MB
1.3M tokens
2642 symbols
1 requests
Download .txt
Showing preview only (5,058K chars total). Download the full file or copy to clipboard to get everything.
Repository: litedb-org/LiteDB
Branch: master
Commit: c9d78eb90085
Files: 418
Total size: 4.8 MB

Directory structure:
gitextract_mf5hhct9/

├── .github/
│   └── ISSUE_TEMPLATE/
│       ├── bug_report.md
│       ├── feature_request.md
│       └── question.md
├── .gitignore
├── CODE_OF_CONDUCT.md
├── ConsoleApp1/
│   ├── ConsoleApp1.csproj
│   ├── Program.cs
│   └── Tools/
│       ├── Faker.Names.cs
│       └── Faker.cs
├── LICENSE
├── LiteDB/
│   ├── Client/
│   │   ├── Database/
│   │   │   ├── Collections/
│   │   │   │   ├── Aggregate.cs
│   │   │   │   ├── Delete.cs
│   │   │   │   ├── Find.cs
│   │   │   │   ├── Include.cs
│   │   │   │   ├── Index.cs
│   │   │   │   ├── Insert.cs
│   │   │   │   ├── Update.cs
│   │   │   │   └── Upsert.cs
│   │   │   ├── ILiteCollection.cs
│   │   │   ├── ILiteDatabase.cs
│   │   │   ├── ILiteQueryable.cs
│   │   │   ├── ILiteRepository.cs
│   │   │   ├── LiteCollection.cs
│   │   │   ├── LiteDatabase.cs
│   │   │   ├── LiteQueryable.cs
│   │   │   └── LiteRepository.cs
│   │   ├── Mapper/
│   │   │   ├── Attributes/
│   │   │   │   ├── BsonCtorAttribute.cs
│   │   │   │   ├── BsonFieldAttribute.cs
│   │   │   │   ├── BsonIdAttribute.cs
│   │   │   │   ├── BsonIgnoreAttribute.cs
│   │   │   │   └── BsonRefAttribute.cs
│   │   │   ├── BsonMapper.Deserialize.cs
│   │   │   ├── BsonMapper.GetEntityMapper.cs
│   │   │   ├── BsonMapper.Serialize.cs
│   │   │   ├── BsonMapper.cs
│   │   │   ├── EntityBuilder.cs
│   │   │   ├── EntityMapper.cs
│   │   │   ├── Linq/
│   │   │   │   ├── LinqExpressionVisitor.cs
│   │   │   │   ├── ParameterExpressionVisitor.cs
│   │   │   │   └── TypeResolver/
│   │   │   │       ├── BsonValueResolver.cs
│   │   │   │       ├── ConvertResolver.cs
│   │   │   │       ├── DateTimeResolver.cs
│   │   │   │       ├── EnumerableResolver.cs
│   │   │   │       ├── GuidResolver.cs
│   │   │   │       ├── ICollectionResolver.cs
│   │   │   │       ├── ITypeResolver.cs
│   │   │   │       ├── MathResolver.cs
│   │   │   │       ├── NullableResolver.cs
│   │   │   │       ├── NumberResolver.cs
│   │   │   │       ├── ObjectIdResolver.cs
│   │   │   │       ├── RegexResolver.cs
│   │   │   │       └── StringResolver.cs
│   │   │   ├── MemberMapper.cs
│   │   │   ├── Reflection/
│   │   │   │   ├── Reflection.Expression.cs
│   │   │   │   └── Reflection.cs
│   │   │   └── TypeNameBinder/
│   │   │       ├── DefaultTypeNameBinder.cs
│   │   │       └── ITypeNameBinder.cs
│   │   ├── Shared/
│   │   │   ├── SharedDataReader.cs
│   │   │   └── SharedEngine.cs
│   │   ├── SqlParser/
│   │   │   ├── Commands/
│   │   │   │   ├── Begin.cs
│   │   │   │   ├── Checkpoint.cs
│   │   │   │   ├── Commit.cs
│   │   │   │   ├── Create.cs
│   │   │   │   ├── Delete.cs
│   │   │   │   ├── Drop.cs
│   │   │   │   ├── Insert.cs
│   │   │   │   ├── ParseLists.cs
│   │   │   │   ├── Pragma.cs
│   │   │   │   ├── Rebuild.cs
│   │   │   │   ├── Rename.cs
│   │   │   │   ├── Rollback.cs
│   │   │   │   ├── Select.cs
│   │   │   │   └── Update.cs
│   │   │   └── SqlParser.cs
│   │   ├── Storage/
│   │   │   ├── ILiteStorage.cs
│   │   │   ├── LiteFileInfo.cs
│   │   │   ├── LiteFileStream.Read.cs
│   │   │   ├── LiteFileStream.Write.cs
│   │   │   ├── LiteFileStream.cs
│   │   │   └── LiteStorage.cs
│   │   └── Structures/
│   │       ├── ConnectionString.cs
│   │       ├── ConnectionType.cs
│   │       ├── Query.cs
│   │       └── QueryAny.cs
│   ├── Document/
│   │   ├── Bson/
│   │   │   └── BsonSerializer.cs
│   │   ├── BsonArray.cs
│   │   ├── BsonAutoId.cs
│   │   ├── BsonDocument.cs
│   │   ├── BsonType.cs
│   │   ├── BsonValue.cs
│   │   ├── DataReader/
│   │   │   ├── BsonDataReader.cs
│   │   │   ├── BsonDataReaderExtensions.cs
│   │   │   └── IBsonDataReader.cs
│   │   ├── Expression/
│   │   │   ├── BsonExpression.cs
│   │   │   ├── Methods/
│   │   │   │   ├── Aggregate.cs
│   │   │   │   ├── DataTypes.cs
│   │   │   │   ├── Date.cs
│   │   │   │   ├── Math.cs
│   │   │   │   ├── Misc.cs
│   │   │   │   └── String.cs
│   │   │   └── Parser/
│   │   │       ├── BsonExpressionAttributes.cs
│   │   │       ├── BsonExpressionFunctions.cs
│   │   │       ├── BsonExpressionOperators.cs
│   │   │       ├── BsonExpressionParser.cs
│   │   │       ├── BsonExpressionType.cs
│   │   │       ├── DocumentScope.cs
│   │   │       └── ExpressionContext.cs
│   │   ├── Json/
│   │   │   ├── JsonReader.cs
│   │   │   ├── JsonSerializer.cs
│   │   │   └── JsonWriter.cs
│   │   └── ObjectId.cs
│   ├── Engine/
│   │   ├── Disk/
│   │   │   ├── DiskReader.cs
│   │   │   ├── DiskService.cs
│   │   │   ├── MemoryCache.cs
│   │   │   ├── Serializer/
│   │   │   │   ├── BufferReader.cs
│   │   │   │   └── BufferWriter.cs
│   │   │   ├── StreamFactory/
│   │   │   │   ├── FileStreamFactory.cs
│   │   │   │   ├── IStreamFactory.cs
│   │   │   │   ├── StreamFactory.cs
│   │   │   │   └── StreamPool.cs
│   │   │   └── Streams/
│   │   │       ├── AesStream.cs
│   │   │       ├── ConcurrentStream.cs
│   │   │       └── TempStream.cs
│   │   ├── Engine/
│   │   │   ├── Collection.cs
│   │   │   ├── Delete.cs
│   │   │   ├── Index.cs
│   │   │   ├── Insert.cs
│   │   │   ├── Pragma.cs
│   │   │   ├── Query.cs
│   │   │   ├── Rebuild.cs
│   │   │   ├── Recovery.cs
│   │   │   ├── Sequence.cs
│   │   │   ├── SystemCollections.cs
│   │   │   ├── Transaction.cs
│   │   │   ├── Update.cs
│   │   │   ├── Upgrade.cs
│   │   │   └── Upsert.cs
│   │   ├── EnginePragmas.cs
│   │   ├── EngineSettings.cs
│   │   ├── EngineState.cs
│   │   ├── FileReader/
│   │   │   ├── FileReaderError.cs
│   │   │   ├── FileReaderV7.cs
│   │   │   ├── FileReaderV8.cs
│   │   │   ├── IFileReader.cs
│   │   │   ├── IndexInfo.cs
│   │   │   └── Legacy/
│   │   │       ├── AesEncryption.cs
│   │   │       ├── BsonReader.cs
│   │   │       └── ByteReader.cs
│   │   ├── ILiteEngine.cs
│   │   ├── LiteEngine.cs
│   │   ├── Pages/
│   │   │   ├── BasePage.cs
│   │   │   ├── CollectionPage.cs
│   │   │   ├── DataPage.cs
│   │   │   ├── HeaderPage.cs
│   │   │   └── IndexPage.cs
│   │   ├── Pragmas.cs
│   │   ├── Query/
│   │   │   ├── IndexQuery/
│   │   │   │   ├── Index.cs
│   │   │   │   ├── IndexAll.cs
│   │   │   │   ├── IndexEquals.cs
│   │   │   │   ├── IndexIn.cs
│   │   │   │   ├── IndexLike.cs
│   │   │   │   ├── IndexRange.cs
│   │   │   │   ├── IndexScan.cs
│   │   │   │   └── IndexVirtual.cs
│   │   │   ├── Lookup/
│   │   │   │   ├── DatafileLookup.cs
│   │   │   │   ├── IDocumentLookup.cs
│   │   │   │   └── IndexKeyLoader.cs
│   │   │   ├── Pipeline/
│   │   │   │   ├── BasePipe.cs
│   │   │   │   ├── DocumentCacheEnumerable.cs
│   │   │   │   ├── GroupByPipe.cs
│   │   │   │   └── QueryPipe.cs
│   │   │   ├── Query.cs
│   │   │   ├── QueryExecutor.cs
│   │   │   ├── QueryOptimization.cs
│   │   │   └── Structures/
│   │   │       ├── GroupBy.cs
│   │   │       ├── IndexCost.cs
│   │   │       ├── OrderBy.cs
│   │   │       ├── QueryPlan.cs
│   │   │       └── Select.cs
│   │   ├── Services/
│   │   │   ├── CollectionService.cs
│   │   │   ├── DataService.cs
│   │   │   ├── IndexService.cs
│   │   │   ├── LockService.cs
│   │   │   ├── RebuildService.cs
│   │   │   ├── SnapShot.cs
│   │   │   ├── TransactionMonitor.cs
│   │   │   ├── TransactionService.cs
│   │   │   └── WalIndexService.cs
│   │   ├── Sort/
│   │   │   ├── SortContainer.cs
│   │   │   ├── SortDisk.cs
│   │   │   └── SortService.cs
│   │   ├── Structures/
│   │   │   ├── CollectionIndex.cs
│   │   │   ├── CursorInfo.cs
│   │   │   ├── DataBlock.cs
│   │   │   ├── Done.cs
│   │   │   ├── FileOrigin.cs
│   │   │   ├── IndexNode.cs
│   │   │   ├── LockMode.cs
│   │   │   ├── PageAddress.cs
│   │   │   ├── PageBuffer.cs
│   │   │   ├── PagePosition.cs
│   │   │   ├── Pragma.cs
│   │   │   ├── RebuildOptions.cs
│   │   │   ├── TransactionPages.cs
│   │   │   └── TransactionState.cs
│   │   └── SystemCollections/
│   │       ├── Register.cs
│   │       ├── SysCols.cs
│   │       ├── SysDatabase.cs
│   │       ├── SysDump.cs
│   │       ├── SysFile.cs
│   │       ├── SysFileCsv.cs
│   │       ├── SysFileJson.cs
│   │       ├── SysIndexes.cs
│   │       ├── SysOpenCursors.cs
│   │       ├── SysPageList.cs
│   │       ├── SysQuery.cs
│   │       ├── SysSequences.cs
│   │       ├── SysSnapshots.cs
│   │       ├── SysTransactions.cs
│   │       └── SystemCollection.cs
│   ├── LiteDB.csproj
│   ├── LiteDB.snk
│   └── Utils/
│       ├── AsyncManualResetEvent.cs
│       ├── BufferSlice.cs
│       ├── Collation.cs
│       ├── Constants.cs
│       ├── Encoding.cs
│       ├── ExtendedLengthHelper.cs
│       ├── Extensions/
│       │   ├── BufferExtensions.cs
│       │   ├── BufferSliceExtensions.cs
│       │   ├── DateExtensions.cs
│       │   ├── DictionaryExtensions.cs
│       │   ├── EnumerableExtensions.cs
│       │   ├── ExpressionExtensions.cs
│       │   ├── HashSetExtensions.cs
│       │   ├── IOExceptionExtensions.cs
│       │   ├── LinqExtensions.cs
│       │   ├── StopWatchExtensions.cs
│       │   ├── StreamExtensions.cs
│       │   ├── StringExtensions.cs
│       │   └── TypeInfoExtensions.cs
│       ├── FileHelper.cs
│       ├── LCID.cs
│       ├── LiteException.cs
│       ├── MimeTypeConverter.cs
│       ├── Pool/
│       │   └── BucketHelper.cs
│       ├── Randomizer.cs
│       ├── Result.cs
│       ├── Tokenizer.cs
│       └── TryCatch.cs
├── LiteDB.Benchmarks/
│   ├── Benchmarks/
│   │   ├── BenchmarkBase.cs
│   │   ├── Constants.cs
│   │   ├── Deletion/
│   │   │   └── DeletionBenchmark.cs
│   │   ├── Generator/
│   │   │   └── FileMetaDataGenerationDatabaseBenchmark.cs
│   │   ├── Insertion/
│   │   │   ├── InsertionBasicBenchmark.cs
│   │   │   ├── InsertionIgnoreExpressionPropertyBenchmark.cs
│   │   │   └── InsertionInMemoryBenchmark.cs
│   │   └── Queries/
│   │       ├── QueryAllBenchmark.cs
│   │       ├── QueryCompoundIndexBenchmark.cs
│   │       ├── QueryCountBenchmark.cs
│   │       ├── QueryIgnoreExpressionPropertiesBenchmark.cs
│   │       ├── QueryMultipleParametersBenchmark.cs
│   │       ├── QuerySimpleIndexBenchmarks.cs
│   │       └── QueryWithDateTimeOffsetBenchmark.cs
│   ├── LiteDB.Benchmarks.csproj
│   ├── Models/
│   │   ├── FileMetaBase.cs
│   │   ├── FileMetaWithExclusion.cs
│   │   └── Generators/
│   │       └── FileMetaGenerator.cs
│   └── Program.cs
├── LiteDB.Shell/
│   ├── Commands/
│   │   ├── Close.cs
│   │   ├── Ed.cs
│   │   ├── Help.cs
│   │   ├── IShellCommand.cs
│   │   ├── Open.cs
│   │   ├── Pretty.cs
│   │   ├── Quit.cs
│   │   ├── Run.cs
│   │   ├── ShowCollections.cs
│   │   └── Version.cs
│   ├── LiteDB.Shell.csproj
│   ├── Program.cs
│   ├── Properties/
│   │   └── launchSettings.json
│   ├── Shell/
│   │   ├── Display.cs
│   │   ├── Env.cs
│   │   ├── InputCommand.cs
│   │   └── ShellProgram.cs
│   └── Utils/
│       ├── OptionSet.cs
│       ├── StringExtensions.cs
│       └── StringScanner.cs
├── LiteDB.Stress/
│   ├── Examples/
│   │   ├── test-01.xml
│   │   └── test-02.xml
│   ├── LiteDB.Stress.csproj
│   ├── Program.cs
│   ├── Properties/
│   │   └── launchSettings.json
│   └── Test/
│       ├── ITaskItem.cs
│       ├── InsertField.cs
│       ├── InsertTaskItem.cs
│       ├── SqlTaskItem.cs
│       ├── TestExecution.cs
│       ├── TestFile.cs
│       ├── ThreadInfo.cs
│       └── TimeSpanEx.cs
├── LiteDB.Tests/
│   ├── Database/
│   │   ├── AutoId_Tests.cs
│   │   ├── ConnectionString_Tests.cs
│   │   ├── Contains_Tests.cs
│   │   ├── Create_Database_Tests.cs
│   │   ├── Crud_Tests.cs
│   │   ├── Database_Pragmas_Tests.cs
│   │   ├── DbRef_Include_Tests.cs
│   │   ├── DbRef_Index_Tests.cs
│   │   ├── DbRef_Interface_Tests.cs
│   │   ├── DeleteMany_Tests.cs
│   │   ├── Delete_By_Name_Tests.cs
│   │   ├── DocumentUpgrade_Tests.cs
│   │   ├── Document_Size_Tests.cs
│   │   ├── FindAll_Tests.cs
│   │   ├── IndexMultiKeyLinq_Tests.cs
│   │   ├── IndexSortAndFilter_Tests.cs
│   │   ├── MultiKey_Mapper_Tests.cs
│   │   ├── NonIdPoco_Tests.cs
│   │   ├── PredicateBuilder_Tests.cs
│   │   ├── Query_Min_Max_Tests.cs
│   │   ├── Site_Tests.cs
│   │   ├── Snapshot_Upgrade_Tests.cs
│   │   ├── Storage_Tests.cs
│   │   ├── Upgrade_Tests.cs
│   │   └── Writing_While_Reading_Test.cs
│   ├── Document/
│   │   ├── Bson_Tests.cs
│   │   ├── Case_Insensitive_Tests.cs
│   │   ├── Decimal_Tests.cs
│   │   ├── Implicit_Tests.cs
│   │   ├── Json_Tests.cs
│   │   └── ObjectId_Tests.cs
│   ├── Engine/
│   │   ├── Collation_Tests.cs
│   │   ├── Create_Database_Tests.cs
│   │   ├── Crypto_Tests.cs
│   │   ├── DropCollection_Tests.cs
│   │   ├── Index_Tests.cs
│   │   ├── ParallelQuery_Tests.cs
│   │   ├── Rebuild_Crash_Tests.cs
│   │   ├── Rebuild_Tests.cs
│   │   ├── Recursion_Tests.cs
│   │   ├── Transactions_Tests.cs
│   │   ├── Update_Tests.cs
│   │   └── UserVersion_Tests.cs
│   ├── Expressions/
│   │   ├── Expressions_Exec_Tests.cs
│   │   └── Expressions_Tests.cs
│   ├── Internals/
│   │   ├── Aes_Tests.cs
│   │   ├── BasePage_Tests.cs
│   │   ├── BufferWriter_Tests.cs
│   │   ├── CacheAsync_Tests.cs
│   │   ├── Cache_Tests.cs
│   │   ├── Disk_Tests.cs
│   │   ├── Document_Tests.cs
│   │   ├── ExtendedLength_Tests.cs
│   │   ├── Extensions_Test.cs
│   │   ├── FreePage_Tests.cs
│   │   ├── FreeSlot_Tests.cs
│   │   ├── HeaderPage_Tests.cs
│   │   ├── Pragma_Tests.cs
│   │   └── Sort_Tests.cs
│   ├── Issues/
│   │   ├── Issue1585_Tests.cs
│   │   ├── Issue1651_Tests.cs
│   │   ├── Issue1695_Tests.cs
│   │   ├── Issue1701_Tests.cs
│   │   ├── Issue1838_Tests.cs
│   │   ├── Issue1860_Tests.cs
│   │   ├── Issue1865_Tests.cs
│   │   ├── Issue2112_Tests.cs
│   │   ├── Issue2127_Tests.cs
│   │   ├── Issue2129_Tests.cs
│   │   ├── Issue2265_Tests.cs
│   │   ├── Issue2298_Tests.cs
│   │   ├── Issue2417_Tests.cs
│   │   ├── Issue2458_Tests.cs
│   │   ├── Issue2471_Test.cs
│   │   ├── Issue2487_Tests.cs
│   │   ├── Issue2494_Tests.cs
│   │   ├── Issue2506_Tests.cs
│   │   ├── Issue2534_Tests.cs
│   │   ├── Issue2570_Tests.cs
│   │   └── Pull2468_Tests.cs
│   ├── LiteDB.Tests.csproj
│   ├── Mapper/
│   │   ├── CustomInterface_Tests.cs
│   │   ├── CustomMappingCtor_Tests.cs
│   │   ├── CustomMapping_Tests.cs
│   │   ├── DbRefAbstract_Tests.cs
│   │   ├── Dictionary_Tests.cs
│   │   ├── Enum_Tests.cs
│   │   ├── GenericMap_Tests.cs
│   │   ├── LinqBsonExpression_Tests.cs
│   │   ├── LinqEval_Tests.cs
│   │   ├── Mapper_Tests.cs
│   │   ├── Records_Tests.cs
│   │   └── StructField_Tests.cs
│   ├── Query/
│   │   ├── Aggregate_Tests.cs
│   │   ├── Data/
│   │   │   ├── PersonGroupByData.cs
│   │   │   └── PersonQueryData.cs
│   │   ├── GroupBy_Tests.cs
│   │   ├── Include_Tests.cs
│   │   ├── OrderBy_Tests.cs
│   │   ├── QueryApi_Tests.cs
│   │   ├── Select_Tests.cs
│   │   └── Where_Tests.cs
│   ├── Resources/
│   │   ├── person.json
│   │   └── zip.json
│   ├── Utils/
│   │   ├── AssertEx.cs
│   │   ├── DataGen.cs
│   │   ├── Faker.Names.cs
│   │   ├── Faker.cs
│   │   ├── LiteEngineExtensions.cs
│   │   ├── Models/
│   │   │   ├── Person.cs
│   │   │   └── Zip.cs
│   │   └── TempFile.cs
│   └── xunit.runner.json
├── LiteDB.sln
├── README.md
└── appveyor.yml

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Create a report to help us improve
title: "[BUG]"
labels: bug
assignees: ''

---

**Version**
Which LiteDB version/OS/.NET framework version are you using. **(REQUIRED)**

**Describe the bug**
A clear and concise description of what the bug is.

**Code to Reproduce**
Write a small snippet to isolate your bug and could be possible to our team test. **(REQUIRED)**

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots/Stacktrace**
If applicable, add screenshots/stacktrace

**Additional context**
Add any other context about the problem here.


================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: Feature request
about: Suggest an idea for this project
title: "[SUGGESTION]"
labels: suggestion
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.


================================================
FILE: .github/ISSUE_TEMPLATE/question.md
================================================
---
name: Question
about: Write your question about LiteDB
title: "[QUESTION]"
labels: question
assignees: ''

---




================================================
FILE: .gitignore
================================================
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# MacOS files
.DS_Store

# User-specific files
*.suo
*.user
*.sln.docstates

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
x64/
build/
bld/
[Bb]in/
[Oo]bj/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

#NUNIT
*.VisualState.xml
TestResult.xml

# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c

*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
.vs

# Chutzpah Test files
_Chutzpah*

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile

# Visual Studio profiler
*.psess
*.vsp
*.vspx

# TFS 2012 Local Workspace
$tf/

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user

# JustCode is a .NET coding addin-in
.JustCode

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# NCrunch
*.ncrunch*
_NCrunch_*
.*crunch*.local.xml

# MightyMoose
*.mm.*
AutoTest.Net/

# Web workbench (sass)
.sass-cache/

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml

# NuGet Packages Directory
packages/
## TODO: If the tool you use requires repositories.config uncomment the next line
#!packages/repositories.config

# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
# This line needs to be after the ignore of the build folder (and the packages folder if the line above has been uncommented)
!packages/build/

# Windows Azure Build Output
csx/
*.build.csdef

# Windows Store app package directory
AppPackages/

# Others
sql/
*.Cache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
node_modules/

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
*.mdf
*.ldf

# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings

# Microsoft Fakes
FakesAssemblies/
/WebShell/Properties/PublishProfiles/*.pubxml
/WebShell/App_Data

# Nuget 3.0 Files
*.lock.json
*.nuget.props
*.nuget.targets

# Intellij
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/dictionaries
.idea/libraries

# User-specific configurations
.idea/libraries/
.idea/.name
.idea/compiler.xml
.idea/copyright/profiles_settings.xml
.idea/encodings.xml
.idea/misc.xml
.idea/modules.xml
.idea/scopes/scope_settings.xml
.idea/vcs.xml
.idea/jsLibraryMappings.xml
.idea/datasources.xml
.idea/dataSources.ids
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml

### JetBrains+all Patch ###
# Ignores the whole idea folder
# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360

.idea/

# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
/LiteDB.BadJsonTest


================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
  and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
  overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
  advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
  address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
  professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[Discord](https://discord.gg/u8seFBH9Zu).
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior,  harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.


================================================
FILE: ConsoleApp1/ConsoleApp1.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net8.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
  </PropertyGroup>

  <ItemGroup>
    <ProjectReference Include="..\LiteDB\LiteDB.csproj" />
  </ItemGroup>

</Project>


================================================
FILE: ConsoleApp1/Program.cs
================================================
using LiteDB;
using LiteDB.Engine;

using System.Reflection.Emit;
using System.Reflection.PortableExecutable;

var password = "46jLz5QWd5fI3m4LiL2r";
var path = $"C:\\LiteDB\\Examples\\CrashDB_{DateTime.Now.Ticks}.db";

var settings = new EngineSettings
{
    AutoRebuild = true,
    Filename = path,
    Password = password
};

var data = Enumerable.Range(1, 10_000).Select(i => new BsonDocument
{
    ["_id"] = i,
    ["name"] = Faker.Fullname(),
    ["age"] = Faker.Age(),
    ["created"] = Faker.Birthday(),
    ["lorem"] = Faker.Lorem(5, 25)
}).ToArray();

try
{
    using (var db = new LiteEngine(settings))
    {
#if DEBUG
        db.SimulateDiskWriteFail = (page) =>
        {
            var p = new BasePage(page);

            if (p.PageID == 248)
            {
                page.Write((uint)123123123, 8192-4);
            }
        };
#endif

        db.Pragma("USER_VERSION", 123);

        db.EnsureIndex("col1", "idx_age", "$.age", false);

        db.Insert("col1", data, BsonAutoId.Int32);
        db.Insert("col2", data, BsonAutoId.Int32);

        var col1 = db.Query("col1", Query.All()).ToList().Count;
        var col2 = db.Query("col2", Query.All()).ToList().Count;

        Console.WriteLine("Inserted Col1: " + col1);
        Console.WriteLine("Inserted Col2: " + col2);
    }
}
catch (Exception ex)
{
    Console.WriteLine("ERROR: " + ex.Message);
}

Console.WriteLine("Recovering database...");

using (var db = new LiteEngine(settings))
{
    var col1 = db.Query("col1", Query.All()).ToList().Count;
    var col2 = db.Query("col2", Query.All()).ToList().Count;

    Console.WriteLine($"Col1: {col1}");
    Console.WriteLine($"Col2: {col2}");

    var errors = new BsonArray(db.Query("_rebuild_errors", Query.All()).ToList()).ToString();

    Console.WriteLine("Errors: " + errors);

}

/*
var errors = new List<FileReaderError>();
var fr = new FileReaderV8(settings, errors);

fr.Open();
var pragmas = fr.GetPragmas();
var cols = fr.GetCollections().ToArray();
var indexes = fr.GetIndexes(cols[0]);

var docs1 = fr.GetDocuments("col1").ToArray();
var docs2 = fr.GetDocuments("col2").ToArray();


Console.WriteLine("Recovered Col1: " + docs1.Length);
Console.WriteLine("Recovered Col2: " + docs2.Length);

Console.WriteLine("# Errors: ");
errors.ForEach(x => Console.WriteLine($"PageID: {x.PageID}/{x.Origin}/#{x.Position}[{x.Collection}]: " + x.Message));
*/

Console.WriteLine("\n\nEnd.");
Console.ReadKey();

================================================
FILE: ConsoleApp1/Tools/Faker.Names.cs
================================================
internal static partial class Faker
{
    private static string[] _maleNames =
    {
        "Adeildo", "Adailton", "Abel", "Adelar", "Adelino", "Abilio", "Adilson", "Adenildo", "Adenir", "Adenilson", "Adenilton", "Adevaldo", "Abner", "Adir", "Adair", "Abimael", "Abraao", "Adrian", "Adson", "Acacio", "Adelso", "Adalto", "Adalberto", "Adolfo", "Adelmo", "Adao", "Adauto", "Ademar", "Ademilson", "Ademilton", "Ademir", "Admilson", "Adonias", "Adriano", "Adriel", "Aecio", "Eder", "Edio", "Edson", "Elcio", "Aldo", "Euler", "Eli", "Helio", "Luiz", "Alison", "Alisson", "Eliton", "Elmo", "Elso", "Elson", "Ailton", "Eron", "Ezio", "Everton", "Afonso", "Afranio", "Agenor", "Aguinaldo", "Agnaldo", "Agostinho", "Iago", "Alan", "Elder", "Airton", "Laecio", "Eliel", "Elielson", "Laercio", "Laerte", "Elielton", "Elian", "Elias", "Alaor", "Aldair", "Aldeci", "Aldir", "Aldemar", "Aldemir", "Aldenir", "Alberi", "Alberico", "Albert", "Albertino", "Alberto", "Albino", "Alcir", "Alceu", "Alcides", "Alcimar", "Alcindo", "Alcino", "Leandro", "Alexandre", "Alessandro", "Alecsandro", "Alef", "Elimar", "Elenildo", "Alencar", "Lenilson", "Elenilton", "Heleno", "Leomar", "Leonidas", "Leoni", "Alesandro", "Alexander", "Alexsandro", "Levi", "Alex", "Alexsander", "Alfredo", "Algusto", "Eliandro", "Lidio", "Alicio", "Eliezer", "Alife", "Olimpio", "Elinaldo", "Lindomar", "Lino", "Eliomar", "Alipio", "Alirio", "Elisandro", "Aluisio", "Elismar", "Elivaldo", "Elivan", "Elivelton", "Eliseu", "Allan", "Allison", "Almir", "Almiro", "Eloi", "Aloisio", "Alonso", "Altair", "Altamir", "Altamiro", "Altino", "Luan", "Luciano", "Lucio", "Alvaro", "Elves", "Alvino", "Elvio", "Elvis", "Amadeu", "Amado", "Amilton", "Amarildo", "Amaro", "Amauri", "Americo", "Anilson", "Anilton", "Anildo", "Ananias", "Anastacio", "Ancelmo", "Anderson", "Andeson", "Andre", "Andrei", "Andrew", "Anesio", "Angelo", "Anibal", "Anisio", "Antoni", "Anselmo", "Antenor", "Antonio", "Antoniel", "Antonino", "Aparecido", "Aquiles", "Ariel", "Aroldo", "Arilson", "Arlei", "Argemiro", "Ari", "Ariovaldo", "Aristeu", "Aristides", "Arivaldo", "Arlindo", "Armando", "Armindo", "Arnaldo", "Arno", "Artur", "Assis", "Ataide", "Atila", "Augusto", "Augustinho", "Aurelio", "Avelino", "Baltazar", "Bartolomeu", "Dejair", "Dalton", "Dalmir", "Belmiro", "Dilson", "Denilson", "Dener", "Benedito", "Denir", "Benicio", "Denis", "Denison", "Denivaldo", "Benjamin", "Bento", "Derli", "Bernado", "Bernardo", "Braian", "Breno", "Diomar", "Dione", "Bryan", "Braulio", "Braz", "Brendo", "Bruno", "Cesar", "Caetano", "Kaue", "Kaik", "Kaike", "Kayky", "Celson", "Caio", "Caique", "Cairo", "Cleber", "Celio", "Cleison", "Cleiton", "Kelvin", "Camilo", "Candido", "Carlito", "Carlo", "Carlos", "Cassiano", "Cassio", "Caua", "Kauan", "Clesio", "Cleito", "Celso", "Charles", "Christian", "Cicero", "Ciro", "Clebson", "Cleilton", "Cleilson", "Clayton", "Claudir", "Claudio", "Claudecir", "Claudemir", "Claudenir", "Claudinei", "Claudino", "Claudiomar", "Claudiomiro", "Claudionor", "Cleberson", "Clecio", "Cleidson", "Clemente", "Cleomar", "Cleverson", "Cleverton", "Clodoaldo", "Cloves", "Clovis", "Cosme", "Cosmo", "Cristian", "Cristiano", "Crispim", "Cristofer", "Cristovao", "Custodio", "Decio", "Delcio", "Delio", "Dalmo", "Damiao", "Daniel", "Danilo", "Darci", "Darlei", "Dario", "Darlan", "Davi", "David", "Davison", "Dijalma", "Deivid", "Deivide", "Deivison", "Demetrio", "Deusdete", "Deusimar", "Devair", "Devanir", "Devid", "Diego", "Diogo", "Dionata", "Dionatan", "Diones", "Dionei", "Douglas", "Dimas", "Diogenes", "Dionisio", "Dirceu", "Dirlei", "Divino", "Djalma", "Doglas", "Domingo", "Domingos", "Donato", "Donizete", "Dorival", "Durval", "Edenilson", "Ederson", "Hebert", "Edison", "Hector", "Edilson", "Edilton", "Edcarlos", "Edemar", "Edesio", "Edevaldo", "Edgar", "Edicarlos", "Edigar", "Edimar", "Edimilson", "Edinilson", "Edinaldo", "Edinei", "Edivaldo", "Edivan", "Edmar", "Edmilson", "Edmundo", "Ednilson", "Ednaldo", "Ednei", "Edno", "Eduardo", "Edvaldo", "Edvan", "Egidio", "Igor", "Inaldo", "Heitor", "Hilario", "Leo", "Leonildo", "Leonardo", "Leonel", "Olivio", "Emanuel", "Emerson", "Emidio", "Emilio", "Enilson", "Enio", "Enivaldo", "Enzo", "Enoque", "Henry", "Henrique", "Eraldo", "Erasmo", "Herbert", "Ercilio", "Hercules", "Eric", "Erike", "Erick", "Erico", "Ericson", "Erli", "Erinaldo", "Erique", "Erison", "Erisvaldo", "Erivaldo", "Erivelton", "Erivan", "Hermes", "Herminio", "Ernandes", "Ernando", "Ernane", "Ernani", "Ernesto", "Eronildo", "Esdras", "Ezequias", "Ezequiel", "Esmael", "Esmeraldo", "Espedito", "Estevan", "Estevao", "Eudes", "Euclides", "Eugenio", "Ulisses", "Eurico", "Euripedes", "Euzebio", "Evaldo", "Evanildo", "Evandro", "Evangelista", "Evaristo", "Evilasio", "Everaldo", "Everson", "Ewerton", "Expedito", "Fabiano", "Fabio", "Fabricio", "Fagner", "Fausto", "Fco", "Feliciano", "Felipe", "Filipi", "Felix", "Fellipe", "Fernando", "Francisco", "Firmino", "Flaviano", "Flavio", "Floriano", "Florisvaldo", "Fracisco", "Frank", "Franciel", "Franklin", "Francico", "Francimar", "Francinaldo", "Francinei", "Francis", "Franciso", "Francivaldo", "Franisco", "Franscisco", "Fransisco", "Fred", "Frederico", "Fredson", "Jadir", "Gabriel", "Jader", "Jadiel", "Joel", "Jair", "Jairo", "Jaison", "Gilberto", "Gileno", "Juliano", "Julho", "Gilvan", "Jamil", "Jandir", "Jarbas", "Jardel", "Gaspar", "Gleison", "Gleisson", "Jean", "Jeanderson", "Jedson", "Jeferson", "Jefersson", "Jefeson", "Gildo", "Gilmar", "Gilso", "Gilson", "Jailton", "Geison", "Julio", "Genildo", "Genilson", "Genesio", "Genival", "Genivaldo", "Gentil", "George", "Jeova", "Geovan", "Geovane", "Geovani", "Geraldo", "Jeremias", "Jerferson", "Jerfeson", "Jerry", "Germano", "Geronimo", "Gerson", "Gervasio", "Jesiel", "Jesse", "Jesuino", "Jesus", "Getulio", "Guilherme", "Gustavo", "Gian", "Guido", "Gildasio", "Julian", "Giovane", "Giovani", "Givaldo", "Givanildo", "Gledson", "Glauber", "Glaucio", "Glauco", "Gleidson", "Julimar", "Jobson", "Goncalo", "Jorge", "Gregori", "Gregorio", "Gutemberg", "Ian", "Icaro", "Iran", "Iranildo", "Ismael", "Israel", "Italo", "Itamar", "Iure", "Yuri", "Ivaldo", "Ivan", "Ivair", "Ivo", "Odilon", "Omar", "Homero", "Onofre", "Horacio", "Orivaldo", "Orlando", "Orlei", "Oseias", "Osmar", "Otavio", "Oziel", "Osorio", "Uanderson", "Ubirajara", "Ubiratan", "Hudson", "Ueslei", "Hugo", "Humberto", "Lauro", "Inacio", "Irineu", "Isac", "Isael", "Isaias", "Isaque", "Izaquiel", "Ismar", "Ivanildo", "Ivanilson", "Ivonaldo", "Jadson", "Jaci", "Jacinto", "Jackson", "Jaco", "Jacson", "Jadilson", "Jaime", "Jamerson", "James", "Janiel", "Janilson", "Janderson", "Janio", "Januario", "Jason", "Joao", "John", "Jonas", "Jonata", "Jonatan", "Jonatas", "Jhone", "Jones", "Jhony", "Jonilson", "Jordan", "Jose", "Juan", "Junior", "Joab", "Joabe", "Joacir", "Joaquim", "Joares", "Jocelio", "Jocimar", "Josiel", "Josafa", "Joseildo", "Joseilton", "Josimar", "Joselio", "Joselito", "Josemar", "Josemir", "Josenildo", "Josenilson", "Josenilton", "Josevaldo", "Josias", "Josinaldo", "Josival", "Josivaldo", "Josivan", "Josue", "Juarez", "Jucelino", "Jucelio", "Jucimar", "Jurandir", "Juscelino", "Justino", "Juvenal", "Kennedy", "Kevin", "Keven", "Lazaro", "Laudelino", "Lauri", "Laurindo", "Leonan", "Leopoldo", "Lincon", "Lorran", "Lorenco", "Lorenzo", "Lorival", "Lorivaldo", "Lourenco", "Lourival", "Luca", "Lucas", "Lucca", "Lucinei", "Lucivaldo", "Madson", "Maciel", "Macelo", "Maxuel", "Macio", "Mailson", "Milton", "Magno", "Maik", "Maike", "Maico", "Maicon", "Manoel", "Marciel", "Marcelino", "Marcelo", "Marcilio", "Marciano", "Marcio", "Marco", "Marcondes", "Marcone", "Marconi", "Marcos", "Marcus", "Mariano", "Marlon", "Marinaldo", "Marino", "Mario", "Marivaldo", "Martin", "Martinho", "Martins", "Mateus", "Matias", "Maurilio", "Mauri", "Mauricio", "Mauro", "Max", "Maxsuel", "Maxwell", "Messias", "Micael", "Michel", "Miguel", "Miqueias", "Misael", "Moacir", "Moiseis", "Moises", "Murilo", "Nadson", "Noel", "Nildo", "Nelio", "Nelson", "Nilton", "Nilo", "Nelso", "Narciso", "Nazareno", "Natal", "Natalicio", "Natalino", "Natan", "Natanael", "Nei", "Nivaldo", "Neri", "Nestor", "Newton", "Nicolas", "Nicolau", "Noe", "Nonato", "Norberto", "Odair", "Olavo", "Oliveira", "Oscar", "Oseas", "Osias", "Osni", "Osvaldo", "Oswaldo", "Otacilio", "Otaviano", "Otoniel", "Pablo", "Paulino", "Paulo", "Patrik", "Patricio", "Patrick", "Pedro", "Peterson", "Pierre", "Pietro", "Plinio", "Raul", "Railson", "Railton", "Rene", "Rafael", "Rai", "Raian", "Railan", "Rildo", "Rian", "Raimundo", "Ralf", "Ramiro", "Ramon", "Rangel", "Reginaldo", "Regis", "Rui", "Reinaldo", "Reinan", "Rivaldo", "Renildo", "Renilson", "Renan", "Renato", "Robson", "Rodnei", "Rodolfo", "Rodrigo", "Roger", "Romulo", "Ronan", "Roni", "Ruan", "Ribamar", "Ricardo", "Richard", "Riquelme", "Roberio", "Robert", "Roberto", "Roberval", "Robison", "Rodinei", "Rogerio", "Romildo", "Romilson", "Romario", "Romero", "Romeu", "Roniel", "Ronaldo", "Ronilson", "Ronald", "Rone", "Ronivon", "Ronivaldo", "Roque", "Rosalino", "Rosalvo", "Rosenildo", "Rosinaldo", "Rosivaldo", "Rubem", "Rubens", "Rudimar", "Rudinei", "Sabino", "Sadi", "Saul", "Saulo", "Saimon", "Salatiel", "Selio", "Salomao", "Salvador", "Silvino", "Silvio", "Samuel", "Samir", "Sandoval", "Sandro", "Santiago", "Santo", "Santos", "Savio", "Sebastiao", "Zenildo", "Sergio", "Severino", "Sidinei", "Sidnei", "Silas", "Silvano", "Silverio", "Silvestre", "Simao", "Sinesio", "Sinval", "Sivaldo", "Tadeu", "Tiago", "Tales", "Talis", "Talisson", "Taylor", "Tainan", "Tulio", "Talison", "Talles", "Telmo", "Tarcisio", "Tauan", "Theo", "Teodoro", "Tomas", "Toni", "Vilson", "Vagner", "Valber", "Valdo", "Valdemir", "Valdenir", "Valderi", "Valdir", "Valcir", "Valdeci", "Valdeli", "Valdemar", "Valdemiro", "Valdenor", "Valdevino", "Valdinei", "Valdivino", "Valdomiro", "Valentim", "Valerio", "Valmir", "Valmor", "Volnei", "Valter", "Vanilson", "Vanildo", "Vander", "Vandir", "Vanderlan", "Vanderlei", "Vanderson", "Vando", "Venancio", "Vicente", "Victor", "Vinicio", "Vinicios", "Vinicius", "Virgilio", "Vital", "Vitor", "Vitorio", "Vivaldo", "Vladimir", "Washington", "Wagner", "Wilson", "Wilton", "Walace", "Wilhan", "Welder", "Waldir", "Waldemar", "Welington", "Welinton", "Walison", "Walisson", "Weliton", "Wilker", "Wallace", "Willan", "Willy", "Wellington", "Wallison", "Welliton", "Walmir", "Walter", "Wander", "Wanderlei", "Wanderson", "Warley", "Weber", "Wederson", "Wedson", "Weligton", "Willian", "Welligton", "Wellinton", "Wemerson", "Wendel", "Wender", "Wendell", "Wenderson", "Wesley", "Weslen", "Weslley", "Weverton", "Wilian", "Willians", "Zacarias", "Zaqueu"
    };

    private static string[] _femaleNames =
    {
        "Aline", "Adelia", "Adelina", "Adelma", "Abigail", "Adalgisa", "Adelaide", "Adria", "Adriana", "Adriane", "Adriele", "Adrieli", "Edi", "Edna", "Eliane", "Elen", "Lia", "Eliana", "Elida", "Elita", "Ilma", "Erica", "Agata", "Agda", "Agnes", "Aida", "Aide", "Aila", "Alana", "Iolanda", "Elane", "Alani", "Ilka", "Ilda", "Ildete", "Leda", "Lene", "Leila", "Lili", "Elza", "Iana", "Iane", "Iara", "Laci", "Ladir", "Laiane", "Alaide", "Eliani", "Laisa", "Laise", "Lara", "Lauane", "Albertina", "Albina", "Alcilene", "Alcione", "Aldenora", "Lea", "Leandra", "Alessandra", "Leci", "Leia", "Leide", "Lidiana", "Lidiane", "Lina", "Luiza", "Luize", "Lilia", "Liliane", "Helena", "Leni", "Elenice", "Lenilda", "Lenira", "Lenise", "Elenita", "Alesandra", "Alexandrina", "Alexia", "Leticia", "Alexsandra", "Olga", "Liandra", "Laira", "Lidia", "Alice", "Alicia", "Eliene", "Eliete", "Ligia", "Lilian", "Olinda", "Alini", "Elisandra", "Elizane", "Elisangela", "Elizete", "Elisia", "Elissandra", "Elizabete", "Lisiane", "Leilane", "Ellen", "Almira", "Almerinda", "Eloa", "Heloisa", "Eloise", "Lorrane", "Alzenir", "Alzira", "Luana", "Luane", "Lucelia", "Luci", "Lucilene", "Lucimar", "Luma", "Luzia", "Luzinete", "Alvina", "Elvira", "Amelia", "Amanda", "Amara", "Ana", "Ane", "Anieli", "Analia", "Anelise", "Anair", "Analice", "Ananda", "Andrelina", "Andrea", "Andrieli", "Andreia", "Andriele", "Andreza", "Andressa", "Anny", "Anesia", "Angela", "Angelica", "Angelina", "Angelita", "Anisia", "Anita", "Antonia", "Antonieta", "Aparecida", "Araci", "Ariana", "Ariane", "Ariele", "Arlene", "Arlete", "Arlinda", "Arminda", "Augusta", "Aurea", "Aurilene", "Aurelina", "Aurora", "Avani", "Barbara", "Beatriz", "Delia", "Deli", "Deliane", "Deolinda", "Dalila", "Dilma", "Delmira", "Dilza", "Benedita", "Denise", "Berenice", "Bernadete", "Betania", "Bianca", "Brenda", "Diana", "Diane", "Dina", "Diva", "Brena", "Bruna", "Cacilda", "Keila", "Kelen", "Kaline", "Kailane", "Kele", "Cilene", "Kiara", "Cleide", "Keli", "Keliane", "Kelly", "Celina", "Celita", "Celma", "Camila", "Camile", "Camili", "Camilla", "Camille", "Camilly", "Candida", "Karen", "Carol", "Carla", "Karina", "Karine", "Carolaine", "Carolina", "Caroline", "Carmelita", "Carmem", "Cassia", "Cassiana", "Cassiane", "Catarina", "Katia", "Katiane", "Katiana", "Kauana", "Kauane", "Kauany", "Cecilia", "Celia", "Cleane", "Cleci", "Cleia", "Celeste", "Cleusa", "Clelia", "Kenia", "Kesia", "Kessia", "Chaiane", "Sheila", "Charlene", "Shirley", "Shirlene", "Cibele", "Cicera", "Clea", "Cintia", "Cirlei", "Cirlene", "Clara", "Clarice", "Clarissa", "Clarisse", "Claudete", "Claudia", "Claudenice", "Claudiana", "Claudiane", "Claudineia", "Cleidiane", "Clemilda", "Cleonice", "Cleunice", "Clotilde", "Conceicao", "Corina", "Cosma", "Cremilda", "Creuza", "Cristiane", "Crislaine", "Crislane", "Cristiana", "Cristina", "Cristine", "Dagmar", "Daiana", "Daiane", "Dara", "Daiani", "Dulce", "Dalva", "Dayse", "Delci", "Dulcineia", "Dalvina", "Damaris", "Damiana", "Daniela", "Dandara", "Danielle", "Danielly", "Daniele", "Danieli", "Daniella", "Danubia", "Darlene", "Debora", "Deise", "Deisiane", "Dejanira", "Deusa", "Dienifer", "Dinalva", "Dirce", "Divina", "Dolores", "Domingas", "Dora", "Doraci", "Doralice", "Durvalina", "Ediane", "Edilma", "Edilza", "Edila", "Edilaine", "Edilane", "Edilene", "Edileuza", "Edite", "Edina", "Edinalva", "Edineia", "Edineide", "Edith", "Edivania", "Edjane", "Ednalva", "Edneia", "Eduarda", "Edvania", "Efigenia", "Ida", "Ide", "Isa", "Iva", "Leonice", "Leonilda", "Leonor", "Leonora", "Eleuza", "Liduina", "Liliana", "Lindalva", "Lindinalva", "Elizabeth", "Elizabeti", "Elisama", "Elivania", "Livia", "Lorraine", "Luara", "Lucia", "Luciana", "Luciane", "Luciene", "Luziane", "Luzimar", "Emanuela", "Emanuele", "Emanuelle", "Emanuelly", "Emanueli", "Emile", "Emily", "Emilly", "Emilia", "Enilda", "Enedina", "Eni", "Ercilia", "Erminia", "Ernestina", "Erondina", "Esmeralda", "Estefane", "Estefani", "Estefania", "Estela", "Estelita", "Ester", "Etelvina", "Eugenia", "Eunice", "Eurides", "Eva", "Eveline", "Evanir", "Evanilda", "Evely", "Evelin", "Evellyn", "Expedita", "Fabia", "Fabiana", "Fabiane", "Fabiola", "Fabricia", "Fatima", "Filomena", "Fernanda", "Flavia", "Flaviana", "Flaviane", "Flora", "Florinda", "Franciele", "Francilene", "Francieli", "Franciane", "Francine", "Francineide", "Francinete", "Francisca", "Gabriela", "Gabriele", "Gabrieli", "Gabriella", "Gabrielle", "Gabrielly", "Jaiane", "Gilda", "Juliana", "Gilvania", "Janete", "Gardenia", "Jeane", "Juli", "Julha", "Juliane", "Gilza", "Geisa", "Geise", "Gisela", "Gislaine", "Gislane", "Gisele", "Gislene", "Giseli", "Geisiane", "Giselle", "Julia", "Gleice", "Juliene", "Genilda", "Geneci", "Jenefer", "Geni", "Jenifer", "Georgia", "Georgina", "Geovana", "Geralda", "Geraldina", "Gerlane", "Gerusa", "Jesica", "Jesuina", "Gessi", "Jessica", "Giovana", "Jaine", "Gildete", "Gleide", "Guilhermina", "Gilmara", "Gilvanete", "Guiomar", "Girlene", "Giselda", "Giselia", "Glaucia", "Gleiciane", "Glenda", "Gloria", "Jordana", "Gorete", "Graca", "Graciele", "Gracilene", "Graciela", "Graziela", "Graziele", "Grazieli", "Greice", "Ianca", "Yasmin", "Ieda", "Ingred", "Ingrid", "Ingride", "Ingridi", "Ione", "Irene", "Iris", "Irma", "Isabela", "Isadora", "Isis", "Ivana", "Ivone", "Odete", "Ondina", "Hortencia", "Hosana", "Osmarina", "Otilia", "Idalina", "Laura", "Inacia", "Ines", "Iracema", "Iraci", "Iracilda", "Iria", "Irani", "Iraneide", "Ireni", "Isabel", "Isabele", "Isabeli", "Isabella", "Isabelle", "Isabelly", "Izilda", "Isolina", "Isamara", "Isaura", "Ivete", "Ivanilda", "Ivani", "Ivanice", "Ivaneide", "Ivanilde", "Ivanete", "Ivania", "Ivoni", "Ivoneide", "Ivonete", "Jakeline", "Jaciane", "Jaciara", "Jacilene", "Jacinta", "Jacira", "Jackeline", "Jacqueline", "Jamile", "Jamili", "Jane", "Janiele", "Janaina", "Jandira", "Jani", "Janine", "Janice", "Jaqueline", "Joana", "Joice", "Josi", "Joaquina", "Joceli", "Jocilene", "Jocelia", "Joise", "Juliete", "Jordania", "Jorgina", "Josilda", "Josiane", "Joselia", "Joseane", "Joselma", "Josefa", "Josefina", "Josina", "Joselaine", "Josiele", "Joseli", "Josilene", "Joselina", "Joselita", "Josenilda", "Josenir", "Josiene", "Josimara", "Josineide", "Josinete", "Jovelina", "Juceli", "Jucileide", "Jucilene", "Jucelia", "Juciara", "Jucimara", "Judite", "Julieta", "Junia", "Juraci", "Jurema", "Jussara", "Justina", "Kellen", "Kemili", "Ketlen", "Ketley", "Ketlin", "Larisa", "Larissa", "Lazara", "Laudiceia", "Laurinda", "Laurita", "Lavinia", "Leontina", "Lorrana", "Lindaura", "Lorrany", "Lorena", "Lurdes", "Luciele", "Lucileide", "Lucila", "Lucicleide", "Lucidalva", "Lucileia", "Lucimara", "Lucimeire", "Lucinda", "Lucineia", "Lucineide", "Lucinete", "Lucivania", "Ludimila", "Ludmila", "Luna", "Luzineide", "Maria", "Madalena", "Maila", "Milene", "Mercia", "Magali", "Magda", "Magna", "Magnolia", "Mara", "Maiara", "Maira", "Maiana", "Maiane", "Milena", "Maisa", "Malvina", "Manuela", "Manuele", "Marilda", "Marilza", "Mariana", "Mariane", "Marli", "Marlise", "Marluce", "Marlucia", "Marcelina", "Marcela", "Marcele", "Marceli", "Marcilene", "Marcilia", "Marcia", "Marciana", "Marlene", "Marluci", "Mari", "Margareth", "Margarete", "Margarida", "Mariangela", "Maricelia", "Marla", "Mariele", "Marilena", "Marilia", "Marieta", "Marina", "Marileia", "Marileide", "Marlete", "Marinalva", "Marineide", "Marines", "Marinete", "Marisa", "Marise", "Marizete", "Maristela", "Marivalda", "Marta", "Martinha", "Matilde", "Maura", "Maurina", "Meire", "Mirele", "Miria", "Mirian", "Mireli", "Melissa", "Mercedes", "Micaela", "Micaele", "Micaeli", "Michele", "Michelle", "Michelli", "Micheli", "Mirela", "Mirella", "Mirtes", "Monalisa", "Monica", "Monique", "Morgana", "Nara", "Nadir", "Nadia", "Nadja", "Neila", "Neli", "Noelia", "Nelma", "Nilza", "Nagila", "Naiara", "Nair", "Naiana", "Naiane", "Nilce", "Nilda", "Nilde", "Nilva", "Naira", "Nelci", "Nelsi", "Nanci", "Nazare", "Natasha", "Natiele", "Natali", "Natalia", "Natalie", "Natalina", "Neide", "Nina", "Neiva", "Nivia", "Nilzete", "Neusa", "Nicole", "Nicoli", "Nicolly", "Nilceia", "Nivea", "Noemi", "Noemia", "Norma", "Nubia", "Odilia", "Odila", "Osvaldina", "Paula", "Poliane", "Palmira", "Paloma", "Pamela", "Patricia", "Poliana", "Paulina", "Pedrina", "Perla", "Pietra", "Pricila", "Priscila", "Priscilla", "Queila", "Quesia", "Quiteria", "Rachel", "Rafaela", "Rafaele", "Rafaella", "Raiane", "Raissa", "Raiana", "Raiani", "Raila", "Railane", "Railda", "Raimunda", "Riana", "Rainara", "Raine", "Raisa", "Raniele", "Raquel", "Rebeca", "Rejane", "Regiane", "Regina", "Renilda", "Renata", "Reni", "Rubia", "Rute", "Rita", "Roberta", "Rogeria", "Romilda", "Rosa", "Roseli", "Rosilda", "Rosiane", "Rosilane", "Rosileide", "Rosilene", "Rosalia", "Rosalina", "Rosana", "Rosane", "Rosani", "Rosangela", "Rosania", "Rosaria", "Rose", "Roseane", "Rosimeire", "Roselaine", "Rosemar", "Rosemary", "Rosemeire", "Rosemere", "Rosemeri", "Rosenilda", "Roseni", "Rosi", "Rosicleia", "Rosicleide", "Rosimar", "Rosimari", "Rosimere", "Rosimeri", "Rosinei", "Rosineia", "Rosineide", "Rosinete", "Ruth", "Ruti", "Sara", "Sabrina", "Suelen", "Sueli", "Zila", "Suiane", "Zaira", "Zuleide", "Silene", "Salete", "Zelia", "Suelaine", "Zelina", "Zelita", "Selma", "Zulmira", "Silva", "Silvana", "Silvani", "Silvania", "Silvia", "Silvina", "Samia", "Samila", "Samanta", "Samara", "Samira", "Sandy", "Sandra", "Santa", "Santina", "Sebastiana", "Zilda", "Suellen", "Silmara", "Zenaide", "Zeneide", "Zeni", "Zenilda", "Severina", "Sibele", "Sidneia", "Sulamita", "Solange", "Silvane", "Simone", "Simoni", "Sinara", "Sintia", "Sirlei", "Sirlene", "Socorro", "Sofia", "Sonia", "Soraia", "Zoraide", "Stefane", "Stefani", "Stephanie", "Stela", "Zuleica", "Suzana", "Suzane", "Suzete", "Suzi", "Tabata", "Taciana", "Taciane", "Taiana", "Taiane", "Taila", "Taina", "Tainara", "Tais", "Taisa", "Taise", "Tailane", "Talia", "Taline", "Telma", "Taine", "Taissa", "Talita", "Tamara", "Tamires", "Tamiris", "Tania", "Tassia", "Tatiana", "Tatiane", "Tatiele", "Tauane", "Tauani", "Tereza", "Terezinha", "Tifani", "Tuane", "Tuani", "Vilma", "Valda", "Valdenice", "Valdilene", "Valdina", "Valdira", "Valdelice", "Valdete", "Valdineia", "Valdirene", "Valentina", "Valeria", "Valesca", "Valmira", "Valquiria", "Vanilda", "Vania", "Vanda", "Vanderleia", "Vani", "Vaneide", "Vanesa", "Vanessa", "Vanusa", "Vanuzia", "Vera", "Veridiana", "Veronica", "Vicentina", "Victoria", "Virginia", "Vitalina", "Vitoria", "Vivian", "Viviane", "Wilma", "Wanda", "Wanessa", "Zumira"
    };

    private static string[] _surNames =
    {
        "Smith", "Johnson", "Jones", "Williams", "Brown", "Lee", "Khan", "Singh", "Kumar", "Miller", "Davis", "Wilson", "Taylor", "Thomas", "Garcia", "Anderson", "Sharma", "Martin", "Rodriguez", "Ali", "White", "Jackson", "Thompson", "Moore", "Ahmed", "Martinez", "Lopez", "Harris", "Patel", "King", "Walker", "Hernandez", "Clark", "Lewis", "Robinson", "Young", "Gonzalez", "Hall", "Wright", "Scott", "Perez", "Green", "Allen", "Tan", "Shah", "Roberts", "Adams", "Nguyen", "James", "Hill", "Baker", "Campbell", "Wong", "Sanchez", "Evans", "Cruz", "Gupta", "Chan", "Mitchell", "Carter", "Reyes", "Nelson", "Edwards", "Rivera", "Parker", "Turner", "Phillips", "Lim", "Murphy", "Stewart", "Collins", "Jain", "Torres", "Morris", "Santos", "Kelly", "Morgan", "Cooper", "Ramirez", "Flores", "Bell", "Cook", "Wood", "Rogers", "Ramos", "Watson", "Ward", "Diaz", "Bailey", "Rose", "Ahmad", "Hughes", "Bennett", "Love", "Kim", "Mohamed", "Gomez", "Mendoza", "Gray", "Richardson", "Ross", "Cox", "Chen", "Reed", "Brooks", "Peterson", "Howard", "Price", "Gonzales", "Ng", "Fernandez", "Russell", "Foster", "Murray", "Long", "Black", "Graham", "Jenkins", "Harrison", "Alexander", "Fisher", "Morales", "Ryan", "Henderson", "Stevens", "Powell", "Butler", "Hamilton", "Marshall", "Perry", "Jordan", "George", "Barnes", "Cole", "Kennedy", "West", "Simpson", "Mcdonald", "Sullivan", "Reynolds", "Ortiz", "Shaw", "Hassan", "Castillo", "Ellis", "Myers", "Wallace", "Sanders", "Gibson", "Rahman", "Marie", "Hunter", "Fox", "Joseph", "Wang", "Gutierrez", "Li", "Hayes", "Clarke", "Tran", "Patterson", "Henry", "Ford", "Coleman", "Mason", "Richards", "Simmons", "Castro", "Robertson", "Gordon", "Woods", "Grant", "Griffin", "Paul", "Silva", "Roy", "Stone", "John", "Hunt", "Webb", "Wells", "Knight", "Johnston", "Palmer", "Mills", "Alvarez", "Burns", "Holmes", "Davies", "Andrews", "Reid", "Hussain", "Matthews", "Peters", "David", "Porter", "Bryant", "Dixon", "Santiago", "Ferguson", "Freeman", "Lawrence", "Ruiz", "Reddy", "Agarwal", "Crawford", "Jimenez", "Ray", "Malik", "Obrien", "Armstrong", "Verma", "Spencer", "Raj", "Walsh", "Elliott", "Hart", "Kaur", "Tucker", "Ho", "Daniels", "Ibrahim", "Owens", "Meyer", "Morrison", "Warren", "Dunn", "Payne", "Hansen", "Lane", "Chapman", "Romero", "Jacobs", "May", "Chavez", "Francis", "Bradley", "Liu", "Boyd", "Man", "Berry", "Duncan", "Stephens", "Gill", "Mohammed", "Medina", "Harvey", "Daniel", "Lam", "Burke", "Arora", "Cunningham", "Das", "Hicks", "Schmidt", "Gardner", "Hudson", "Yang", "Riley", "Yadav", "Olson", "Davidson", "Dean", "Day", "Hawkins", "Bautista", "Cohen", "Park", "Wagner", "Arnold", "Rice", "Lin", "Mishra", "Carroll", "Lynch", "Mehta", "Joshi", "Vargas", "Lynn", "Washington", "Moreno", "Harper", "Oliver", "Carr", "Shrestha", "Aguilar", "Zhang", "Nichols", "Williamson", "Austin", "Ong", "Snyder", "Villanueva", "Vasquez", "Willis", "Wheeler", "Jensen", "Islam", "Herrera", "Lucas", "Bishop", "Douglas", "Lawson", "Macdonald", "Hasan", "Newman", "Le", "Gilbert", "Greene", "Pierce", "Yu", "Salazar", "Chang", "Pearson", "Burton", "Kelley", "Mendez", "Watkins", "Lau", "Mann", "Barrett", "Wu", "Perkins", "Walters", "Carpenter", "Dawson", "Banks", "Franklin", "Barker", "Little", "Curtis", "Hanson", "Weaver", "Hoffman", "Miranda", "Ismail", "Holland", "Angel", "Fuller", "Montgomery", "Page", "Valdez", "Hossain", "Mccarthy", "Fletcher", "Guzman", "Doyle", "Lambert", "Saunders", "Oconnor", "Larson", "Nair", "Carlson", "Lowe", "Stanley", "Shaikh", "Simon", "Howell", "Fowler", "Chambers", "Watts", "Huang", "Quinn", "Patil", "Chua", "Craig", "Munoz", "Anthony", "Rana", "Weber", "Charles", "Cheng", "Michael", "Bates", "Sims", "Rao", "Hopkins", "Marquez", "Gregory", "Cross", "Pandey", "Tang", "Ball", "Stevenson", "Blake", "Rai", "Fleming", "Sutton", "Mercado", "Navarro", "Cameron", "Wade", "Schneider", "Pena", "Soto", "Welch", "Mccoy", "Hardy", "Jennings", "Alam", "Steele", "Delgado", "Benson", "Leung", "Abdullah", "Lloyd", "Mckenzie", "Chong", "Miles", "Beck", "Bowman", "Vega", "Webster", "Parsons", "Ortega", "Schultz", "Leonard", "Higgins", "Owen", "Garrett", "Brewer", "Newton", "Kapoor", "Fitzgerald", "Cortez", "Ann", "Norris", "Wilkinson", "Barnett", "Chauhan", "Nunez", "Potter", "Padilla", "Agrawal", "Aquino", "Gallagher", "Pham", "Burgess", "Lyons", "Moss", "Sharp", "Warner", "Cheung", "Srivastava", "Iqbal", "Prasad", "Fernandes", "Fields", "Garza", "Dennis", "Holt", "Oneill", "Luna", "Rhodes", "Keller", "Vazquez", "Moon", "Estrada", "Reeves", "Acosta", "Prince", "Lai", "Rowe", "Farmer", "Guerrero", "Blair", "Wolf", "Garg", "Moran", "Becker", "Brady", "Caldwell", "Law", "Terry", "Barber", "Rios", "Powers", "Marsh", "Hale", "Baldwin", "Molina", "Todd", "Manning", "Neal", "Patrick", "Logan", "Maxwell", "Klein", "Yap", "Hammond", "Haynes", "Francisco", "Walton", "Vincent", "Mclaughlin", "Bowen", "Richard", "Thornton", "Waters", "Bush", "Aziz", "Goodwin", "Mclean", "Cabrera", "Parks", "Nicole", "Atkinson", "Chin", "Chung", "Sandoval", "Frank", "Barton", "Omar", "Osborne", "Bond", "Shepherd", "Chandler", "Lang", "Figueroa", "Kay", "Rodgers", "Alvarado", "Norman", "Fernando", "Flynn", "Desai", "Thomson", "Horton", "Nicholson", "Fraser", "Casey", "Maldonado", "Cummings", "Nash", "Wolfe", "Serrano", "Kerr", "Thakur", "French", "Amin", "Rojas", "Christensen", "Shop", "Tyler", "Mack", "Malone", "Ang", "Townsend", "Abbas", "Pereira", "Samuel", "Sweet", "Farrell", "Tiwari", "Robbins", "Dominguez", "Gibbs", "Contreras", "Hogan", "Graves", "Solomon", "Shelton", "Sam", "Buchanan", "Brennan", "Bruce", "Chowdhury", "Fischer", "Ma", "Griffith", "Mcgee", "Suarez", "Lo", "Erickson", "Cool", "Goodman", "Yates", "Christian", "Choi", "Butt", "Byrne", "Swanson", "Schwartz", "Bird", "Byrd", "Frazier", "Morton", "Vaughn", "Low", "Olsen", "Summers", "Goh", "Petersen", "Soni", "Sinha", "Perera", "Booth", "Anand", "Garner", "Pineda", "Campos", "Baxter", "Bryan", "Mckay", "Harrington", "Jay", "Mcdaniel", "Wall", "Ramsey", "Chow", "Barry", "Lamb", "Robles", "Fuentes", "Valencia", "Lu", "Leblanc", "Stokes", "Drake", "Mckinney", "Kamal", "Briggs", "Curry", "Muhammad", "Glover", "Cannon", "Mejia", "Carey", "Grace", "Duran", "Ghosh", "Colon", "Roman", "Ingram", "Guy", "Avila", "Mahmoud", "Thapa", "Kane", "Hodges", "Leon", "Adam", "Pratt", "Raza", "Pearce", "Khalid", "Gabriel", "Saad", "Chu", "Rosales", "Kent", "Mcguire", "Nolan", "Clayton", "Wise", "Costa", "Savage", "Tate", "Manuel", "Chandra", "Jacob", "Abraham", "Mcbride", "Adel", "Mccormick", "Chaudhary", "Frost", "Sherman", "Harding", "Sparks", "Abbott", "Mullins", "Larsen", "Zimmerman", "Dee", "Norton", "Franco", "Skinner", "Hanna", "Carson", "Rodrigues", "Gurung", "Stephenson", "Griffiths", "Wilkins", "Bauer", "Shetty", "Goyal", "Dsouza", "Malhotra", "Bansal", "Hubbard", "Kemp", "Pope", "Saini", "Jose", "Reese", "Kirk", "Hampton", "Hines", "Soriano", "Preston", "Ferreira", "Aggarwal", "Poole", "Hutchinson", "Johns", "Burnett", "Bowers", "Short", "Snow", "Moody", "Randall", "Power", "Choudhary", "Joy", "Noble", "Foley", "Sinclair", "Harmon", "Mathews", "Solis", "House", "Rock", "Aja", "Rich", "Babu", "Mueller", "Jack", "Buckley", "Gross", "Tolentino", "Benjamin", "Rosario", "Small", "Ayala", "Pacheco", "Monroe", "Best", "Shukla", "Houston", "Espinoza", "Maria", "Bhatia", "Enriquez", "Schroeder", "Mcintyre", "Heath", "Kramer", "Kirby", "Levy", "Mohan", "Lara", "Saeed", "Dalton", "Han", "Chase", "Mathew", "Ling", "Cain", "Gates", "Holloway", "Gee", "Muller", "Adkins", "Calderon", "Sheikh", "Bartlett", "Joe", "Patton", "Hood", "Strickland", "Collier", "Santana", "Odonnell", "Atkins", "Marks", "Duffy", "Allison", "Velez", "Mcintosh", "Hancock", "Krishna", "Ocampo", "Sun", "Dillon", "Saleh", "Cooke", "Fitzpatrick", "Saxena", "Conway", "Hong", "Maher", "Khanna", "Wijaya", "Mcleod", "Sweeney", "Conner", "Valentine", "Andrade", "Floyd", "Moses", "Kulkarni", "Wilcox", "Camacho", "Krishnan", "Underwood", "Berg", "Dyer", "Prakash", "Elizabeth", "Mcmahon", "Velasquez", "Blue", "Cullen", "Bass", "Velasco", "Roth", "Koh", "Sutherland", "Flowers", "Morrow", "Hartman", "Tanner", "Boyle", "Brock", "Aguirre", "Ballard", "Dizon", "Cobb", "Domingo", "Siddiqui", "Shields", "Nielsen", "Stuart", "Peter", "Bear", "Massey", "Bernard", "Raymond", "Sawyer", "Samson", "Howe", "Dickson", "Cat", "Wyatt", "Leong", "Salinas", "Ashraf", "Antonio", "Zamora", "Bradford", "English", "Forbes", "York", "Middleton", "Meyers", "Joyce", "Reilly", "Davenport", "B", "Mohammad", "Bradshaw", "Walter", "Gomes", "Bee", "Hodge", "Smart", "Ashley", "Jean", "Valenzuela", "Mcmillan", "Javier", "Xu", "Greer", "Said", "Uddin", "Anwar", "Spence", "Donovan", "Horn", "Hobbs", "Barr", "Lindsey", "Whitehead", "Montoya", "Russo", "Jefferson", "Guerra", "Alex", "Villa", "Weiss", "Ansari", "Rivas", "Raja", "Andersen", "Mohd", "Copeland", "M", "Rehman", "Bridges", "Go", "Teo", "Mittal", "Vaughan", "Ram", "Kang", "Browne", "Shannon", "Carrillo", "Hess", "Jane", "Huynh", "Rashid", "Sheppard", "Saha", "Sampson", "S", "Mark", "Decker", "Goel", "Osman", "Haddad", "Slater", "Anne", "Gould", "Mcgrath", "Bentley", "Giles", "Keith", "Ferrer", "Donnelly", "Salas", "Knox", "Mostafa", "Whitaker", "Strong", "Pascual", "Peralta", "Eaton", "Starr", "Jarvis", "Singleton", "Daly", "Khoury", "Lindsay", "Mac", "Doherty", "Cervantes", "Gandhi", "Koch", "Mackenzie", "Yee", "Stark", "Archer", "Winter", "Dale", "Stafford", "Hurst", "Phelps", "Leach", "Winters", "Bhardwaj", "Humphrey", "Felix", "Gillespie", "Jha", "Hewitt", "Salah", "Khalil", "Salvador", "Connolly", "Cochran", "Qureshi", "Oconnell", "Woodward", "Shaffer", "Bhatt", "Church", "Donaldson", "Tam", "Albert", "Espinosa", "Oliveira", "Castaneda", "Nixon", "Jo", "Lozano", "Sim", "Grimes", "Clements", "Mccann", "Cardenas", "Landry", "Mustafa", "Delacruz", "Juarez", "Roach", "Mcdowell", "Hurley"
    };

    private static string[] _lorem =
    {
        "Lorem", "ipsum", "dolor", "sit", "amet", "consectetur", "adipiscing", "elit", "Suspendisse", "tempus", "sapien", "maximus", "dictum", "pretium", "tellus", "dui", "tincidunt", "massa", "lobortis", "pellentesque", "dolor", "ligula", "et", "nulla"
    };

    private static string[] _departments =
    {
        "Legal", "Marketing", "Business Development", "Services", "Support", "Human Resources", "Sales", "Product Management", "Engineering", "Training", "Accounting", "Research and Development"
    };

    private static string[] _jobTitles =
    {
        "Sales Representative", "Structural Engineer", "Payment Adjustment Coordinator", "Senior Editor", "Nurse Practicioner", "Occupational Therapist", "Director of Sales", "Safety Technician", "Account Executive", "Marketing Manager", "Food Chemist", "Civil Engineer", "Associate Professor", "Statistician", "Research Nurse", "Data Coordinator", "Chief Design Engineer", "Computer Systems Analyst", "Environmental Tech", "Administrative Officer", "Social Worker", "Executive Secretary", "Help Desk", "Analyst Programmer", "Developer", "Programmer Analyst", "Software Test Engineer", "Biostatistician", "Office Assistant", "Systems Administrator", "Automation Specialist", "Analog Circuit Design manager", "Structural Analysis Engineer", "Technical Writer", "Software Engineer", "Budget/Accounting Analyst IV", "GIS Technical Architect", "Speech Pathologist", "Research Assistant", "Nuclear Power Engineer", "Quality Control Specialist", "General Manager", "Accountant", "Account Coordinator", "Operator", "Junior Executive", "Geological Engineer", "Recruiting Manager", "Financial Analyst", "Marketing Assistant", "Electrical Engineer", "Internal Auditor", "Paralegal", "Senior Developer", "VP Quality Control", "Media Manager", "Senior Sales Associate", "Product Engineer", "Quality Engineer", "VP Marketing", "Health Coach", "Legal Assistant", "Dental Hygienist", "Information Systems Manager", "Pharmacist", "Desktop Support Technician", "Staff Scientist", "Project Manager", "Technician", "Mechanical Systems Engineer", "Assistant Manager", "Assistant Media Planner", "Teacher", "Registered Nurse", "Sales Associate", "Geologist", "Physical Therapy Assistant"
    };

    private static string[] _countries = 
    { 
        "Afghanistan", "land Islands", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahrain", "Bahamas", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia, Plurinational State of", "Bonaire, Sint Eustatius and Saba", "Bosnia and Herzegovina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo", "Congo, the Democratic Republic of the", "Cook Islands", "Costa Rica", "Cte d'Ivoire", "Croatia", "Cuba", "Curaao", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Falkland Islands (Malvinas)", "Faroe Islands", "Fiji", "Finland", "France", "French Guiana", "French Polynesia", "French Southern Territories", "Gabon", "Gambia", "Georgia", "Germany", "Ghana", "Gibraltar", "Greece", "Greenland", "Grenada", "Guadeloupe", "Guam", "Guatemala", "Guernsey", "Guinea", "Guinea-Bissau", "Guyana", "Haiti", "Heard Island and McDonald Islands", "Holy See (Vatican City State)", "Honduras", "Hong Kong", "Hungary", "Iceland", "India", "Indonesia", "Iran, Islamic Republic of", "Iraq", "Ireland", "Isle of Man", "Israel", "Italy", "Jamaica", "Japan", "Jersey", "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Korea", "Kuwait", "Kyrgyzstan", "Lao People's Democratic Republic", "Latvia", "Lebanon", "Lesotho", "Liberia", "Libya", "Liechtenstein", "Lithuania", "Luxembourg", "Macao", "Macedonia", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands", "Martinique", "Mauritania", "Mauritius", "Mayotte", "Mexico", "Micronesia", "Moldova, Republic of", "Monaco", "Mongolia", "Montenegro", "Montserrat", "Morocco", "Mozambique", "Myanmar", "Namibia", "Nauru", "Nepal", "Netherlands", "New Caledonia", "New Zealand", "Nicaragua", "Niger", "Nigeria", "Niue", "Norfolk Island", "Northern Mariana Islands", "Norway", "Oman", "Pakistan", "Palau", "Palestine, State of", "Panama", "Papua New Guinea", "Paraguay", "Peru", "Philippines", "Pitcairn", "Poland", "Portugal", "Puerto Rico", "Qatar", "Runion", "Romania", "Russian Federation", "Rwanda", "Saint Barthlemy", "Saint Helena", "Saint Kitts and Nevis", "Saint Lucia", "Saint Martin (French part)", "Saint Pierre and Miquelon", "Saint Vincent and the Grenadines", "Samoa", "San Marino", "Sao Tome and Principe", "Saudi Arabia", "Senegal", "Serbia", "Seychelles", "Sierra Leone", "Singapore", "Sint Maarten (Dutch part)", "Slovakia", "Slovenia", "Solomon Islands", "Somalia", "South Africa", "South Georgia and the South Sandwich Islands", "South Sudan", "Spain", "Sri Lanka", "Sudan", "Suriname", "Svalbard and Jan Mayen", "Swaziland", "Sweden", "Switzerland", "Syrian Arab Republic", "Taiwan", "Tajikistan", "Tanzania", "Thailand", "Timor-Leste", "Togo", "Tokelau", "Tonga", "Trinidad and Tobago", "Tunisia", "Turkey", "Turkmenistan", "Turks and Caicos Islands", "Tuvalu", "Uganda", "Ukraine", "United Arab Emirates", "United Kingdom", "United States", "United States Minor Outlying Islands", "Uruguay", "Uzbekistan", "Vanuatu", "Venezuela, Bolivarian Republic of", "Viet Nam", "Virgin Islands, British", "Virgin Islands, U.S.", "Wallis and Futuna", "Western Sahara", "Yemen", "Zambia", "Zimbabwe" 
    };

    private static string[] _languages =
    {
        "English", "Mandarin Chinese", "Hindi", "Spanish", "French", "Standard Arabic", "Bengali", "Russian", "Portuguese", "Indonesian", "Urdu", "Standard German", "Japanese", "Swahili", "Marathi", "Telugu", "Western Punjabi", "Wu Chinese", "Tamil", "Turkish", "Korean", "Vietnamese", "Yue Chinese", "Javanese", "Italian", "Egyptian Spoken Arabic", "Hausa", "Thai", "Gujarati", "Kannada", "Iranian Persian", "Bhojpuri", "Southern Min Chinese", "Hakka Chinese", "Jinyu Chinese", "Filipino", "Burmese", "Polish", "Yoruba", "Odia", "Malayalam ", "Xiang Chinese", "Maithili", "Ukrainian", "Moroccan Spoken Arabic", "Eastern Punjabi", "Sunda", "Algerian Spoken Arabic", "Sundanese Spoken Arabic", "Nigerian Pidgin", "Zulu", "Igbo", "Amharic", "Northern Uzbek", "Sindhi", "North Levantine Spoken Arabic", "Nepali", "Romanian", "Tagalog", "Dutch", "Sa'idi Spoken Arabic", "Gan Chinese", "Northern Pashto", "Magahi", "Saraiki", "Xhosa", "Malay", "Khmer", "Afrikaans", "Sinhala", "Somali", "Chhattisgarhi", "Cebuano", "Mesopotamian Spoken Arabic", "Assamese", "Northeastern Thai", "Northern Kurdish", "Hijazi Spoken Arabic", "Nigerian Fulfulde", "Bavarian", "Bamanankan", "South Azerbaijani", "Northern Sotho", "Setswana", "Souther Sotho", "Czech", "Greek", "Chittagonian", "Kazakh", "Swedish", "Deccan", "Hungarian", "Jula", "Sadri", "Kinyarwanda", "Cameroonian Pidgin", "Sylheti", "South Levantine Spoken Arabic", "Tunisian Spoken Arabic", "Sanaani Spoken Arabic"
    };

    private static string[] _skuDigits =
    {
        "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "R", "S", "T", "U", "W", "X", "Y", "Z"
    };
}


================================================
FILE: ConsoleApp1/Tools/Faker.cs
================================================
using LiteDB;

internal static partial class Faker
{
    private static Random _random = new Random(420);

    public static string Fullname()
    {
        var names = _random.NextBool() ? _maleNames : _femaleNames;

        return names[_random.Next(names.Length - 1)] + " " + _surNames[_random.Next(_surNames.Length - 1)];
    }

    public static int Age()
    {
        return _random.Next(18, 96);
    }

    public static DateTime Birthday()
    {
        var oldest = DateTime.Today.AddYears(-110).Ticks;
        var now = DateTime.Now.Ticks;
        var range =  now - oldest;

        var date = new DateTime(oldest + _random.NextLong(0, range));

        return date;
    }

    public static string Lorem(int size, int end = -1)
    {
        return string.Join(" ", Enumerable.Range(1, end == -1 ? size : _random.Next(size, end))
            .Select(x => _lorem[_random.Next(_lorem.Length - 1)]));
    }

    public static int Next(int start, int end)
    {
        return _random.Next(start, end);
    }

    public static double NextDouble(double start, double end)
    {
        return start + (_random.NextDouble() * (end - start));
    }

    // https://stackoverflow.com/a/13095144/3286260
    public static long NextLong(this Random random, long min, long max)
    {
        if (max <= min)
            throw new ArgumentOutOfRangeException("max", "max must be > min!");

        //Working with ulong so that modulo works correctly with values > long.MaxValue
        ulong uRange = (ulong)(max - min);

        //Prevent a modolo bias; see https://stackoverflow.com/a/10984975/238419
        //for more information.
        //In the worst case, the expected number of calls is 2 (though usually it's
        //much closer to 1) so this loop doesn't really hurt performance at all.
        ulong ulongRand;
        do
        {
            byte[] buf = new byte[8];
            random.NextBytes(buf);
            ulongRand = (ulong)BitConverter.ToInt64(buf, 0);
        } while (ulongRand > ulong.MaxValue - ((ulong.MaxValue % uRange) + 1) % uRange);

        return (long)(ulongRand % uRange) + min;
    }

    public static bool NextBool(this Random random)
    {
        return random.NextSingle() >= 0.5;
    }

    public static string Departments() => _departments[_random.Next(0, _departments.Length - 1)];

    internal static BsonValue Created()
    {
        var oldest = DateTime.Today.AddYears(-5).Ticks;
        var now = DateTime.Now.Ticks;
        var range = now - oldest;

        var date = new DateTime(oldest + _random.NextLong(0, range));

        return date;
    }

    public static string Language() => _departments[_random.Next(0, _departments.Length - 1)];

    public static string Department() => _departments[_random.Next(0, _departments.Length - 1)];

    public static string Country() => _countries[_random.Next(0, _countries.Length - 1)];

    public static string Job() => _jobTitles[_random.Next(0, _jobTitles.Length - 1)];

    internal static string SkuNumber() =>
        string.Join("", Enumerable.Range(1, 8).Select(x => _skuDigits[_random.Next(0, _skuDigits.Length - 1)]));

}


================================================
FILE: LICENSE
================================================
The MIT License (MIT)

Copyright (c) 2014-2022 Mauricio David

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: LiteDB/Client/Database/Collections/Aggregate.cs
================================================
using System;
using System.Linq;
using System.Linq.Expressions;
using static LiteDB.Constants;

namespace LiteDB
{
    public partial class LiteCollection<T>
    {
        #region Count

        /// <summary>
        /// Get document count in collection
        /// </summary>
        public int Count()
        {
            // do not use indexes - collections has DocumentCount property
            return this.Query().Count();
        }

        /// <summary>
        /// Get document count in collection using predicate filter expression
        /// </summary>
        public int Count(BsonExpression predicate)
        {
            if (predicate == null) throw new ArgumentNullException(nameof(predicate));

            return this.Query().Where(predicate).Count();
        }

        /// <summary>
        /// Get document count in collection using predicate filter expression
        /// </summary>
        public int Count(string predicate, BsonDocument parameters) => this.Count(BsonExpression.Create(predicate, parameters));

        /// <summary>
        /// Get document count in collection using predicate filter expression
        /// </summary>
        public int Count(string predicate, params BsonValue[] args) => this.Count(BsonExpression.Create(predicate, args));

        /// <summary>
        /// Count documents matching a query. This method does not deserialize any documents. Needs indexes on query expression
        /// </summary>
        public int Count(Expression<Func<T, bool>> predicate) => this.Count(_mapper.GetExpression(predicate));

        /// <summary>
        /// Get document count in collection using predicate filter expression
        /// </summary>
        public int Count(Query query) => new LiteQueryable<T>(_engine, _mapper, _collection, query).Count();

        #endregion

        #region LongCount

        /// <summary>
        /// Get document count in collection
        /// </summary>
        public long LongCount()
        {
            return this.Query().LongCount();
        }

        /// <summary>
        /// Get document count in collection using predicate filter expression
        /// </summary>
        public long LongCount(BsonExpression predicate)
        {
            if (predicate == null) throw new ArgumentNullException(nameof(predicate));

            return this.Query().Where(predicate).LongCount();
        }

        /// <summary>
        /// Get document count in collection using predicate filter expression
        /// </summary>
        public long LongCount(string predicate, BsonDocument parameters) => this.LongCount(BsonExpression.Create(predicate, parameters));

        /// <summary>
        /// Get document count in collection using predicate filter expression
        /// </summary>
        public long LongCount(string predicate, params BsonValue[] args) => this.LongCount(BsonExpression.Create(predicate, args));

        /// <summary>
        /// Get document count in collection using predicate filter expression
        /// </summary>
        public long LongCount(Expression<Func<T, bool>> predicate) => this.LongCount(_mapper.GetExpression(predicate));

        /// <summary>
        /// Get document count in collection using predicate filter expression
        /// </summary>
        public long LongCount(Query query) => new LiteQueryable<T>(_engine, _mapper, _collection, query).Count();

        #endregion

        #region Exists

        /// <summary>
        /// Get true if collection contains at least 1 document that satisfies the predicate expression
        /// </summary>
        public bool Exists(BsonExpression predicate)
        {
            if (predicate == null) throw new ArgumentNullException(nameof(predicate));

            return this.Query().Where(predicate).Exists();
        }

        /// <summary>
        /// Get true if collection contains at least 1 document that satisfies the predicate expression
        /// </summary>
        public bool Exists(string predicate, BsonDocument parameters) => this.Exists(BsonExpression.Create(predicate, parameters));

        /// <summary>
        /// Get true if collection contains at least 1 document that satisfies the predicate expression
        /// </summary>
        public bool Exists(string predicate, params BsonValue[] args) => this.Exists(BsonExpression.Create(predicate, args));

        /// <summary>
        /// Get true if collection contains at least 1 document that satisfies the predicate expression
        /// </summary>
        public bool Exists(Expression<Func<T, bool>> predicate) => this.Exists(_mapper.GetExpression(predicate));

        /// <summary>
        /// Get true if collection contains at least 1 document that satisfies the predicate expression
        /// </summary>
        public bool Exists(Query query) => new LiteQueryable<T>(_engine, _mapper, _collection, query).Exists();

        #endregion

        #region Min/Max

        /// <summary>
        /// Returns the min value from specified key value in collection
        /// </summary>
        public BsonValue Min(BsonExpression keySelector)
        {
            if (string.IsNullOrEmpty(keySelector)) throw new ArgumentNullException(nameof(keySelector));

            var doc = this.Query()
                .OrderBy(keySelector)
                .Select(keySelector)
                .ToDocuments()
                .First();

            // return first field of first document
            return doc[doc.Keys.First()];
        }

        /// <summary>
        /// Returns the min value of _id index
        /// </summary>
        public BsonValue Min() => this.Min("_id");

        /// <summary>
        /// Returns the min value from specified key value in collection
        /// </summary>
        public K Min<K>(Expression<Func<T, K>> keySelector)
        {
            if (keySelector == null) throw new ArgumentNullException(nameof(keySelector));

            var expr = _mapper.GetExpression(keySelector);

            var value = this.Min(expr);

            return (K)_mapper.Deserialize(typeof(K), value);
        }

        /// <summary>
        /// Returns the max value from specified key value in collection
        /// </summary>
        public BsonValue Max(BsonExpression keySelector)
        {
            if (string.IsNullOrEmpty(keySelector)) throw new ArgumentNullException(nameof(keySelector));

            var doc = this.Query()
                .OrderByDescending(keySelector)
                .Select(keySelector)
                .ToDocuments()
                .First();

            // return first field of first document
            return doc[doc.Keys.First()];
        }

        /// <summary>
        /// Returns the max _id index key value
        /// </summary>
        public BsonValue Max() => this.Max("_id");

        /// <summary>
        /// Returns the last/max field using a linq expression
        /// </summary>
        public K Max<K>(Expression<Func<T, K>> keySelector)
        {
            if (keySelector == null) throw new ArgumentNullException(nameof(keySelector));

            var expr = _mapper.GetExpression(keySelector);

            var value = this.Max(expr);

            return (K)_mapper.Deserialize(typeof(K), value);
        }

        #endregion
    }
}

================================================
FILE: LiteDB/Client/Database/Collections/Delete.cs
================================================
using System;
using System.Linq.Expressions;
using static LiteDB.Constants;

namespace LiteDB
{
    public partial class LiteCollection<T>
    {
        /// <summary>
        /// Delete a single document on collection based on _id index. Returns true if document was deleted
        /// </summary>
        public bool Delete(BsonValue id)
        {
            if (id == null || id.IsNull) throw new ArgumentNullException(nameof(id));

            return _engine.Delete(_collection, new [] { id }) == 1;
        }

        /// <summary>
        /// Delete all documents inside collection. Returns how many documents was deleted. Run inside current transaction
        /// </summary>
        public int DeleteAll()
        {
            return _engine.DeleteMany(_collection, null);
        }

        /// <summary>
        /// Delete all documents based on predicate expression. Returns how many documents was deleted
        /// </summary>
        public int DeleteMany(BsonExpression predicate)
        {
            if (predicate == null) throw new ArgumentNullException(nameof(predicate));

            return _engine.DeleteMany(_collection, predicate);
        }

        /// <summary>
        /// Delete all documents based on predicate expression. Returns how many documents was deleted
        /// </summary>
        public int DeleteMany(string predicate, BsonDocument parameters) => this.DeleteMany(BsonExpression.Create(predicate, parameters));

        /// <summary>
        /// Delete all documents based on predicate expression. Returns how many documents was deleted
        /// </summary>
        public int DeleteMany(string predicate, params BsonValue[] args) => this.DeleteMany(BsonExpression.Create(predicate, args));

        /// <summary>
        /// Delete all documents based on predicate expression. Returns how many documents was deleted
        /// </summary>
        public int DeleteMany(Expression<Func<T, bool>> predicate) => this.DeleteMany(_mapper.GetExpression(predicate));
    }
}

================================================
FILE: LiteDB/Client/Database/Collections/Find.cs
================================================
using LiteDB.Engine;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using static LiteDB.Constants;

namespace LiteDB
{
    public partial class LiteCollection<T>
    {
        /// <summary>
        /// Return a new LiteQueryable to build more complex queries
        /// </summary>
        public ILiteQueryable<T> Query()
        {
            return new LiteQueryable<T>(_engine, _mapper, _collection, new Query()).Include(_includes);
        }

        #region Find

        /// <summary>
        /// Find documents inside a collection using predicate expression.
        /// </summary>
        public IEnumerable<T> Find(BsonExpression predicate, int skip = 0, int limit = int.MaxValue)
        {
            if (predicate == null) throw new ArgumentNullException(nameof(predicate));

            return this.Query()
                .Include(_includes)
                .Where(predicate)
                .Skip(skip)
                .Limit(limit)
                .ToEnumerable();
        }

        /// <summary>
        /// Find documents inside a collection using query definition.
        /// </summary>
        public IEnumerable<T> Find(Query query, int skip = 0, int limit = int.MaxValue)
        {
            if (query == null) throw new ArgumentNullException(nameof(query));

            if (skip != 0) query.Offset = skip;
            if (limit != int.MaxValue) query.Limit = limit;

            return new LiteQueryable<T>(_engine, _mapper, _collection, query)
                .ToEnumerable();
        }

        /// <summary>
        /// Find documents inside a collection using predicate expression.
        /// </summary>
        public IEnumerable<T> Find(Expression<Func<T, bool>> predicate, int skip = 0, int limit = int.MaxValue) => this.Find(_mapper.GetExpression(predicate), skip, limit);

        #endregion

        #region FindById + One + All

        /// <summary>
        /// Find a document using Document Id. Returns null if not found.
        /// </summary>
        public T FindById(BsonValue id)
        {
            if (id == null || id.IsNull) throw new ArgumentNullException(nameof(id));

            return this.Find(BsonExpression.Create("_id = @0", id)).FirstOrDefault();
        }

        /// <summary>
        /// Find the first document using predicate expression. Returns null if not found
        /// </summary>
        public T FindOne(BsonExpression predicate) => this.Find(predicate).FirstOrDefault();

        /// <summary>
        /// Find the first document using predicate expression. Returns null if not found
        /// </summary>
        public T FindOne(string predicate, BsonDocument parameters) => this.FindOne(BsonExpression.Create(predicate, parameters));

        /// <summary>
        /// Find the first document using predicate expression. Returns null if not found
        /// </summary>
        public T FindOne(BsonExpression predicate, params BsonValue[] args) => this.FindOne(BsonExpression.Create(predicate, args));

        /// <summary>
        /// Find the first document using predicate expression. Returns null if not found
        /// </summary>
        public T FindOne(Expression<Func<T, bool>> predicate) => this.FindOne(_mapper.GetExpression(predicate));

        /// <summary>
        /// Find the first document using defined query structure. Returns null if not found
        /// </summary>
        public T FindOne(Query query) => this.Find(query).FirstOrDefault();

        /// <summary>
        /// Returns all documents inside collection order by _id index.
        /// </summary>
        public IEnumerable<T> FindAll() => this.Query().Include(_includes).ToEnumerable();

        #endregion
    }
}

================================================
FILE: LiteDB/Client/Database/Collections/Include.cs
================================================
using System;
using System.Linq;
using System.Linq.Expressions;
using static LiteDB.Constants;

namespace LiteDB
{
    public partial class LiteCollection<T>
    {
        /// <summary>
        /// Run an include action in each document returned by Find(), FindById(), FindOne() and All() methods to load DbRef documents
        /// Returns a new Collection with this action included
        /// </summary>
        public ILiteCollection<T> Include<K>(Expression<Func<T, K>> keySelector)
        {
            if (keySelector == null) throw new ArgumentNullException(nameof(keySelector));

            var path = _mapper.GetExpression(keySelector);

            return this.Include(path);
        }

        /// <summary>
        /// Run an include action in each document returned by Find(), FindById(), FindOne() and All() methods to load DbRef documents
        /// Returns a new Collection with this action included
        /// </summary>
        public ILiteCollection<T> Include(BsonExpression keySelector)
        {
            if (string.IsNullOrEmpty(keySelector)) throw new ArgumentNullException(nameof(keySelector));

            // cloning this collection and adding this include
            var newcol = new LiteCollection<T>(_collection, _autoId, _engine, _mapper);

            newcol._includes.AddRange(_includes);
            newcol._includes.Add(keySelector);

            return newcol;
        }
    }
}

================================================
FILE: LiteDB/Client/Database/Collections/Index.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text.RegularExpressions;
using static LiteDB.Constants;

namespace LiteDB
{
    public partial class LiteCollection<T>
    {
        /// <summary>
        /// Create a new permanent index in all documents inside this collections if index not exists already. Returns true if index was created or false if already exits
        /// </summary>
        /// <param name="name">Index name - unique name for this collection</param>
        /// <param name="expression">Create a custom expression function to be indexed</param>
        /// <param name="unique">If is a unique index</param>
        public bool EnsureIndex(string name, BsonExpression expression, bool unique = false)
        {
            if (string.IsNullOrEmpty(name)) throw new ArgumentNullException(nameof(name));
            if (expression == null) throw new ArgumentNullException(nameof(expression));

            return _engine.EnsureIndex(_collection, name, expression, unique);
        }

        /// <summary>
        /// Create a new permanent index in all documents inside this collections if index not exists already. Returns true if index was created or false if already exits
        /// </summary>
        /// <param name="expression">Document field/expression</param>
        /// <param name="unique">If is a unique index</param>
        public bool EnsureIndex(BsonExpression expression, bool unique = false)
        {
            if (expression == null) throw new ArgumentNullException(nameof(expression));

            var name = Regex.Replace(expression.Source, @"[^a-z0-9]", "", RegexOptions.IgnoreCase | RegexOptions.Compiled);

            return this.EnsureIndex(name, expression, unique);
        }

        /// <summary>
        /// Create a new permanent index in all documents inside this collections if index not exists already.
        /// </summary>
        /// <param name="keySelector">LinqExpression to be converted into BsonExpression to be indexed</param>
        /// <param name="unique">Create a unique keys index?</param>
        public bool EnsureIndex<K>(Expression<Func<T, K>> keySelector, bool unique = false)
        {
            var expression = this.GetIndexExpression(keySelector);

            return this.EnsureIndex(expression, unique);
        }

        /// <summary>
        /// Create a new permanent index in all documents inside this collections if index not exists already.
        /// </summary>
        /// <param name="name">Index name - unique name for this collection</param>
        /// <param name="keySelector">LinqExpression to be converted into BsonExpression to be indexed</param>
        /// <param name="unique">Create a unique keys index?</param>
        public bool EnsureIndex<K>(string name, Expression<Func<T, K>> keySelector, bool unique = false)
        {
            var expression = this.GetIndexExpression(keySelector);

            return this.EnsureIndex(name, expression, unique);
        }

        /// <summary>
        /// Get index expression based on LINQ expression. Convert IEnumerable in MultiKey indexes
        /// </summary>
        private BsonExpression GetIndexExpression<K>(Expression<Func<T, K>> keySelector)
        {
            var expression = _mapper.GetIndexExpression(keySelector);

            if (typeof(K).IsEnumerable() && expression.IsScalar == true)
            {
                if (expression.Type == BsonExpressionType.Path)
                {
                    // convert LINQ expression that returns an IEnumerable but expression returns a single value
                    // `x => x.Phones` --> `$.Phones[*]`
                    // works only if exression is a simple path
                    expression = expression.Source + "[*]";
                }
                else
                {
                    throw new LiteException(0, $"Expression `{expression.Source}` must return a enumerable expression");
                }
            }

            return expression;
        }

        /// <summary>
        /// Drop index and release slot for another index
        /// </summary>
        public bool DropIndex(string name)
        {
            return _engine.DropIndex(_collection, name);
        }
    }
}

================================================
FILE: LiteDB/Client/Database/Collections/Insert.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using static LiteDB.Constants;

namespace LiteDB
{
    public partial class LiteCollection<T>
    {
        /// <summary>
        /// Insert a new entity to this collection. Document Id must be a new value in collection - Returns document Id
        /// </summary>
        public BsonValue Insert(T entity)
        {
            if (entity == null) throw new ArgumentNullException(nameof(entity));

            var doc = _mapper.ToDocument(entity);
            var removed = this.RemoveDocId(doc);

            _engine.Insert(_collection, new[] { doc }, _autoId);

            var id = doc["_id"];

            // checks if must update _id value in entity
            if (removed)
            {
                _id.Setter(entity, id.RawValue);
            }

            return id;
        }

        /// <summary>
        /// Insert a new document to this collection using passed id value.
        /// </summary>
        public void Insert(BsonValue id, T entity)
        {
            if (entity == null) throw new ArgumentNullException(nameof(entity));
            if (id == null || id.IsNull) throw new ArgumentNullException(nameof(id));

            var doc = _mapper.ToDocument(entity);

            doc["_id"] = id;

            _engine.Insert(_collection, new [] { doc }, _autoId);
        }

        /// <summary>
        /// Insert an array of new documents to this collection. Document Id must be a new value in collection. Can be set buffer size to commit at each N documents
        /// </summary>
        public int Insert(IEnumerable<T> entities)
        {
            if (entities == null) throw new ArgumentNullException(nameof(entities));

            return _engine.Insert(_collection, this.GetBsonDocs(entities), _autoId);
        }

        /// <summary>
        /// Implements bulk insert documents in a collection. Usefull when need lots of documents.
        /// </summary>
        [Obsolete("Use normal Insert()")]
        public int InsertBulk(IEnumerable<T> entities, int batchSize = 5000)
        {
            if (entities == null) throw new ArgumentNullException(nameof(entities));

            return _engine.Insert(_collection, this.GetBsonDocs(entities), _autoId);
        }

        /// <summary>
        /// Convert each T document in a BsonDocument, setting autoId for each one
        /// </summary>
        private IEnumerable<BsonDocument> GetBsonDocs(IEnumerable<T> documents)
        {
            foreach (var document in documents)
            {
                var doc = _mapper.ToDocument(document);
                var removed = this.RemoveDocId(doc);

                yield return doc;

                if (removed && _id != null)
                {
                    _id.Setter(document, doc["_id"].RawValue);
                }
            }
        }

        /// <summary>
        /// Remove document _id if contains a "empty" value (checks for autoId bson type)
        /// </summary>
        private bool RemoveDocId(BsonDocument doc)
        {
            if (_id != null && doc.TryGetValue("_id", out var id)) 
            {
                // check if exists _autoId and current id is "empty"
                if ((_autoId == BsonAutoId.Int32 && (id.IsInt32 && id.AsInt32 == 0)) ||
                    (_autoId == BsonAutoId.ObjectId && (id.IsNull || (id.IsObjectId && id.AsObjectId == ObjectId.Empty))) ||
                    (_autoId == BsonAutoId.Guid && id.IsGuid && id.AsGuid == Guid.Empty) ||
                    (_autoId == BsonAutoId.Int64 && id.IsInt64 && id.AsInt64 == 0))
                {
                    // in this cases, remove _id and set new value after
                    doc.Remove("_id");
                    return true;
                }
            }

            return false;   
        }
    }
}

================================================
FILE: LiteDB/Client/Database/Collections/Update.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using static LiteDB.Constants;

namespace LiteDB
{
    public partial class LiteCollection<T>
    {
        /// <summary>
        /// Update a document in this collection. Returns false if not found document in collection
        /// </summary>
        public bool Update(T entity)
        {
            if (entity == null) throw new ArgumentNullException(nameof(entity));

            // get BsonDocument from object
            var doc = _mapper.ToDocument(entity);

            return _engine.Update(_collection, new BsonDocument[] { doc }) > 0;
        }

        /// <summary>
        /// Update a document in this collection. Returns false if not found document in collection
        /// </summary>
        public bool Update(BsonValue id, T entity)
        {
            if (entity == null) throw new ArgumentNullException(nameof(entity));
            if (id == null || id.IsNull) throw new ArgumentNullException(nameof(id));

            // get BsonDocument from object
            var doc = _mapper.ToDocument(entity);

            // set document _id using id parameter
            doc["_id"] = id;

            return _engine.Update(_collection, new BsonDocument[] { doc }) > 0;
        }

        /// <summary>
        /// Update all documents
        /// </summary>
        public int Update(IEnumerable<T> entities)
        {
            if (entities == null) throw new ArgumentNullException(nameof(entities));

            return _engine.Update(_collection, entities.Select(x => _mapper.ToDocument(x)));
        }

        /// <summary>
        /// Update many documents based on transform expression. This expression must return a new document that will be replaced over current document (according with predicate).
        /// Eg: col.UpdateMany("{ Name: UPPER($.Name), Age }", "_id > 0")
        /// </summary>
        public int UpdateMany(BsonExpression transform, BsonExpression predicate)
        {
            if (transform == null) throw new ArgumentNullException(nameof(transform));
            if (predicate == null) throw new ArgumentNullException(nameof(predicate));

            if (transform.Type != BsonExpressionType.Document)
            {
                throw new ArgumentException("Extend expression must return a document. Eg: `col.UpdateMany('{ Name: UPPER(Name) }', 'Age > 10')`");
            }

            return _engine.UpdateMany(_collection, transform, predicate);
        }

        /// <summary>
        /// Update many document based on merge current document with extend expression. Use your class with initializers. 
        /// Eg: col.UpdateMany(x => new Customer { Name = x.Name.ToUpper(), Salary: 100 }, x => x.Name == "John")
        /// </summary>
        public int UpdateMany(Expression<Func<T, T>> extend, Expression<Func<T, bool>> predicate)
        {
            if (extend == null) throw new ArgumentNullException(nameof(extend));
            if (predicate == null) throw new ArgumentNullException(nameof(predicate));

            var ext = _mapper.GetExpression(extend);
            var pred = _mapper.GetExpression(predicate);

            if (ext.Type != BsonExpressionType.Document)
            {
                throw new ArgumentException("Extend expression must return an anonymous class to be merge with entities. Eg: `col.UpdateMany(x => new { Name = x.Name.ToUpper() }, x => x.Age > 10)`");
            }

            return _engine.UpdateMany(_collection, ext, pred);
        }
    }
}

================================================
FILE: LiteDB/Client/Database/Collections/Upsert.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using static LiteDB.Constants;

namespace LiteDB
{
    public partial class LiteCollection<T>
    {
        /// <summary>
        /// Insert or Update a document in this collection.
        /// </summary>
        public bool Upsert(T entity)
        {
            if (entity == null) throw new ArgumentNullException(nameof(entity));

            return this.Upsert(new T[] { entity }) == 1;
        }

        /// <summary>
        /// Insert or Update all documents
        /// </summary>
        public int Upsert(IEnumerable<T> entities)
        {
            if (entities == null) throw new ArgumentNullException(nameof(entities));

            return _engine.Upsert(_collection, this.GetBsonDocs(entities), _autoId);
        }

        /// <summary>
        /// Insert or Update a document in this collection.
        /// </summary>
        public bool Upsert(BsonValue id, T entity)
        {
            if (entity == null) throw new ArgumentNullException(nameof(entity));
            if (id == null || id.IsNull) throw new ArgumentNullException(nameof(id));

            // get BsonDocument from object
            var doc = _mapper.ToDocument(entity);

            // set document _id using id parameter
            doc["_id"] = id;

            return _engine.Upsert(_collection, new[] { doc }, _autoId) > 0;
        }
    }
}

================================================
FILE: LiteDB/Client/Database/ILiteCollection.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq.Expressions;

namespace LiteDB
{
    public interface ILiteCollection<T>
    {
        /// <summary>
        /// Get collection name
        /// </summary>
        string Name { get; }

        /// <summary>
        /// Get collection auto id type
        /// </summary>
        BsonAutoId AutoId { get; }

        /// <summary>
        /// Getting entity mapper from current collection. Returns null if collection are BsonDocument type
        /// </summary>
        EntityMapper EntityMapper { get; }

        /// <summary>
        /// Run an include action in each document returned by Find(), FindById(), FindOne() and All() methods to load DbRef documents
        /// Returns a new Collection with this action included
        /// </summary>
        ILiteCollection<T> Include<K>(Expression<Func<T, K>> keySelector);

        /// <summary>
        /// Run an include action in each document returned by Find(), FindById(), FindOne() and All() methods to load DbRef documents
        /// Returns a new Collection with this action included
        /// </summary>
        ILiteCollection<T> Include(BsonExpression keySelector);

        /// <summary>
        /// Insert or Update a document in this collection.
        /// </summary>
        bool Upsert(T entity);

        /// <summary>
        /// Insert or Update all documents
        /// </summary>
        int Upsert(IEnumerable<T> entities);

        /// <summary>
        /// Insert or Update a document in this collection.
        /// </summary>
        bool Upsert(BsonValue id, T entity);

        /// <summary>
        /// Update a document in this collection. Returns false if not found document in collection
        /// </summary>
        bool Update(T entity);

        /// <summary>
        /// Update a document in this collection. Returns false if not found document in collection
        /// </summary>
        bool Update(BsonValue id, T entity);

        /// <summary>
        /// Update all documents
        /// </summary>
        int Update(IEnumerable<T> entities);

        /// <summary>
        /// Update many documents based on transform expression. This expression must return a new document that will be replaced over current document (according with predicate).
        /// Eg: col.UpdateMany("{ Name: UPPER($.Name), Age }", "_id > 0")
        /// </summary>
        int UpdateMany(BsonExpression transform, BsonExpression predicate);

        /// <summary>
        /// Update many document based on merge current document with extend expression. Use your class with initializers. 
        /// Eg: col.UpdateMany(x => new Customer { Name = x.Name.ToUpper(), Salary: 100 }, x => x.Name == "John")
        /// </summary>
        int UpdateMany(Expression<Func<T, T>> extend, Expression<Func<T, bool>> predicate);

        /// <summary>
        /// Insert a new entity to this collection. Document Id must be a new value in collection - Returns document Id
        /// </summary>
        BsonValue Insert(T entity);

        /// <summary>
        /// Insert a new document to this collection using passed id value.
        /// </summary>
        void Insert(BsonValue id, T entity);

        /// <summary>
        /// Insert an array of new documents to this collection. Document Id must be a new value in collection. Can be set buffer size to commit at each N documents
        /// </summary>
        int Insert(IEnumerable<T> entities);

        /// <summary>
        /// Implements bulk insert documents in a collection. Usefull when need lots of documents.
        /// </summary>
        int InsertBulk(IEnumerable<T> entities, int batchSize = 5000);

        /// <summary>
        /// Create a new permanent index in all documents inside this collections if index not exists already. Returns true if index was created or false if already exits
        /// </summary>
        /// <param name="name">Index name - unique name for this collection</param>
        /// <param name="expression">Create a custom expression function to be indexed</param>
        /// <param name="unique">If is a unique index</param>
        bool EnsureIndex(string name, BsonExpression expression, bool unique = false);

        /// <summary>
        /// Create a new permanent index in all documents inside this collections if index not exists already. Returns true if index was created or false if already exits
        /// </summary>
        /// <param name="expression">Document field/expression</param>
        /// <param name="unique">If is a unique index</param>
        bool EnsureIndex(BsonExpression expression, bool unique = false);

        /// <summary>
        /// Create a new permanent index in all documents inside this collections if index not exists already.
        /// </summary>
        /// <param name="keySelector">LinqExpression to be converted into BsonExpression to be indexed</param>
        /// <param name="unique">Create a unique keys index?</param>
        bool EnsureIndex<K>(Expression<Func<T, K>> keySelector, bool unique = false);

        /// <summary>
        /// Create a new permanent index in all documents inside this collections if index not exists already.
        /// </summary>
        /// <param name="name">Index name - unique name for this collection</param>
        /// <param name="keySelector">LinqExpression to be converted into BsonExpression to be indexed</param>
        /// <param name="unique">Create a unique keys index?</param>
        bool EnsureIndex<K>(string name, Expression<Func<T, K>> keySelector, bool unique = false);

        /// <summary>
        /// Drop index and release slot for another index
        /// </summary>
        bool DropIndex(string name);

        /// <summary>
        /// Return a new LiteQueryable to build more complex queries
        /// </summary>
        ILiteQueryable<T> Query();

        /// <summary>
        /// Find documents inside a collection using predicate expression.
        /// </summary>
        IEnumerable<T> Find(BsonExpression predicate, int skip = 0, int limit = int.MaxValue);

        /// <summary>
        /// Find documents inside a collection using query definition.
        /// </summary>
        IEnumerable<T> Find(Query query, int skip = 0, int limit = int.MaxValue);

        /// <summary>
        /// Find documents inside a collection using predicate expression.
        /// </summary>
        IEnumerable<T> Find(Expression<Func<T, bool>> predicate, int skip = 0, int limit = int.MaxValue);

        /// <summary>
        /// Find a document using Document Id. Returns null if not found.
        /// </summary>
        T FindById(BsonValue id);

        /// <summary>
        /// Find the first document using predicate expression. Returns null if not found
        /// </summary>
        T FindOne(BsonExpression predicate);

        /// <summary>
        /// Find the first document using predicate expression. Returns null if not found
        /// </summary>
        T FindOne(string predicate, BsonDocument parameters);

        /// <summary>
        /// Find the first document using predicate expression. Returns null if not found
        /// </summary>
        T FindOne(BsonExpression predicate, params BsonValue[] args);

        /// <summary>
        /// Find the first document using predicate expression. Returns null if not found
        /// </summary>
        T FindOne(Expression<Func<T, bool>> predicate);

        /// <summary>
        /// Find the first document using defined query structure. Returns null if not found
        /// </summary>
        T FindOne(Query query);

        /// <summary>
        /// Returns all documents inside collection order by _id index.
        /// </summary>
        IEnumerable<T> FindAll();

        /// <summary>
        /// Delete a single document on collection based on _id index. Returns true if document was deleted
        /// </summary>
        bool Delete(BsonValue id);

        /// <summary>
        /// Delete all documents inside collection. Returns how many documents was deleted. Run inside current transaction
        /// </summary>
        int DeleteAll();

        /// <summary>
        /// Delete all documents based on predicate expression. Returns how many documents was deleted
        /// </summary>
        int DeleteMany(BsonExpression predicate);

        /// <summary>
        /// Delete all documents based on predicate expression. Returns how many documents was deleted
        /// </summary>
        int DeleteMany(string predicate, BsonDocument parameters);

        /// <summary>
        /// Delete all documents based on predicate expression. Returns how many documents was deleted
        /// </summary>
        int DeleteMany(string predicate, params BsonValue[] args);

        /// <summary>
        /// Delete all documents based on predicate expression. Returns how many documents was deleted
        /// </summary>
        int DeleteMany(Expression<Func<T, bool>> predicate);

        /// <summary>
        /// Get document count using property on collection.
        /// </summary>
        int Count();

        /// <summary>
        /// Count documents matching a query. This method does not deserialize any document. Needs indexes on query expression
        /// </summary>
        int Count(BsonExpression predicate);

        /// <summary>
        /// Count documents matching a query. This method does not deserialize any document. Needs indexes on query expression
        /// </summary>
        int Count(string predicate, BsonDocument parameters);

        /// <summary>
        /// Count documents matching a query. This method does not deserialize any document. Needs indexes on query expression
        /// </summary>
        int Count(string predicate, params BsonValue[] args);

        /// <summary>
        /// Count documents matching a query. This method does not deserialize any documents. Needs indexes on query expression
        /// </summary>
        int Count(Expression<Func<T, bool>> predicate);

        /// <summary>
        /// Count documents matching a query. This method does not deserialize any documents. Needs indexes on query expression
        /// </summary>
        int Count(Query query);

        /// <summary>
        /// Get document count using property on collection.
        /// </summary>
        long LongCount();

        /// <summary>
        /// Count documents matching a query. This method does not deserialize any documents. Needs indexes on query expression
        /// </summary>
        long LongCount(BsonExpression predicate);

        /// <summary>
        /// Count documents matching a query. This method does not deserialize any documents. Needs indexes on query expression
        /// </summary>
        long LongCount(string predicate, BsonDocument parameters);

        /// <summary>
        /// Count documents matching a query. This method does not deserialize any documents. Needs indexes on query expression
        /// </summary>
        long LongCount(string predicate, params BsonValue[] args);

        /// <summary>
        /// Count documents matching a query. This method does not deserialize any documents. Needs indexes on query expression
        /// </summary>
        long LongCount(Expression<Func<T, bool>> predicate);

        /// <summary>
        /// Count documents matching a query. This method does not deserialize any documents. Needs indexes on query expression
        /// </summary>
        long LongCount(Query query);

        /// <summary>
        /// Returns true if query returns any document. This method does not deserialize any document. Needs indexes on query expression
        /// </summary>
        bool Exists(BsonExpression predicate);

        /// <summary>
        /// Returns true if query returns any document. This method does not deserialize any document. Needs indexes on query expression
        /// </summary>
        bool Exists(string predicate, BsonDocument parameters);

        /// <summary>
        /// Returns true if query returns any document. This method does not deserialize any document. Needs indexes on query expression
        /// </summary>
        bool Exists(string predicate, params BsonValue[] args);

        /// <summary>
        /// Returns true if query returns any document. This method does not deserialize any document. Needs indexes on query expression
        /// </summary>
        bool Exists(Expression<Func<T, bool>> predicate);

        /// <summary>
        /// Returns true if query returns any document. This method does not deserialize any document. Needs indexes on query expression
        /// </summary>
        bool Exists(Query query);

        /// <summary>
        /// Returns the min value from specified key value in collection
        /// </summary>
        BsonValue Min(BsonExpression keySelector);

        /// <summary>
        /// Returns the min value of _id index
        /// </summary>
        BsonValue Min();

        /// <summary>
        /// Returns the min value from specified key value in collection
        /// </summary>
        K Min<K>(Expression<Func<T, K>> keySelector);

        /// <summary>
        /// Returns the max value from specified key value in collection
        /// </summary>
        BsonValue Max(BsonExpression keySelector);

        /// <summary>
        /// Returns the max _id index key value
        /// </summary>
        BsonValue Max();

        /// <summary>
        /// Returns the last/max field using a linq expression
        /// </summary>
        K Max<K>(Expression<Func<T, K>> keySelector);
    }
}

================================================
FILE: LiteDB/Client/Database/ILiteDatabase.cs
================================================
using System;
using System.Collections.Generic;
using System.IO;
using LiteDB.Engine;

namespace LiteDB
{
    public interface ILiteDatabase : IDisposable
    {
        /// <summary>
        /// Get current instance of BsonMapper used in this database instance (can be BsonMapper.Global)
        /// </summary>
        BsonMapper Mapper { get; }

        /// <summary>
        /// Returns a special collection for storage files/stream inside datafile. Use _files and _chunks collection names. FileId is implemented as string. Use "GetStorage" for custom options
        /// </summary>
        ILiteStorage<string> FileStorage { get; }

        /// <summary>
        /// Get a collection using a entity class as strong typed document. If collection does not exits, create a new one.
        /// </summary>
        /// <param name="name">Collection name (case insensitive)</param>
        /// <param name="autoId">Define autoId data type (when object contains no id field)</param>
        ILiteCollection<T> GetCollection<T>(string name, BsonAutoId autoId = BsonAutoId.ObjectId);

        /// <summary>
        /// Get a collection using a name based on typeof(T).Name (BsonMapper.ResolveCollectionName function)
        /// </summary>
        ILiteCollection<T> GetCollection<T>();

        /// <summary>
        /// Get a collection using a name based on typeof(T).Name (BsonMapper.ResolveCollectionName function)
        /// </summary>
        ILiteCollection<T> GetCollection<T>(BsonAutoId autoId);

        /// <summary>
        /// Get a collection using a generic BsonDocument. If collection does not exits, create a new one.
        /// </summary>
        /// <param name="name">Collection name (case insensitive)</param>
        /// <param name="autoId">Define autoId data type (when document contains no _id field)</param>
        ILiteCollection<BsonDocument> GetCollection(string name, BsonAutoId autoId = BsonAutoId.ObjectId);

        /// <summary>
        /// Initialize a new transaction. Transaction are created "per-thread". There is only one single transaction per thread.
        /// Return true if transaction was created or false if current thread already in a transaction.
        /// </summary>
        bool BeginTrans();

        /// <summary>
        /// Commit current transaction
        /// </summary>
        bool Commit();

        /// <summary>
        /// Rollback current transaction
        /// </summary>
        bool Rollback();

        /// <summary>
        /// Get new instance of Storage using custom FileId type, custom "_files" collection name and custom "_chunks" collection. LiteDB support multiples file storages (using different files/chunks collection names)
        /// </summary>
        ILiteStorage<TFileId> GetStorage<TFileId>(string filesCollection = "_files", string chunksCollection = "_chunks");

        /// <summary>
        /// Get all collections name inside this database.
        /// </summary>
        IEnumerable<string> GetCollectionNames();

        /// <summary>
        /// Checks if a collection exists on database. Collection name is case insensitive
        /// </summary>
        bool CollectionExists(string name);

        /// <summary>
        /// Drop a collection and all data + indexes
        /// </summary>
        bool DropCollection(string name);

        /// <summary>
        /// Rename a collection. Returns false if oldName does not exists or newName already exists
        /// </summary>
        bool RenameCollection(string oldName, string newName);

        /// <summary>
        /// Execute SQL commands and return as data reader.
        /// </summary>
        IBsonDataReader Execute(TextReader commandReader, BsonDocument parameters = null);

        /// <summary>
        /// Execute SQL commands and return as data reader
        /// </summary>
        IBsonDataReader Execute(string command, BsonDocument parameters = null);

        /// <summary>
        /// Execute SQL commands and return as data reader
        /// </summary>
        IBsonDataReader Execute(string command, params BsonValue[] args);

        /// <summary>
        /// Do database checkpoint. Copy all commited transaction from log file into datafile.
        /// </summary>
        void Checkpoint();

        /// <summary>
        /// Rebuild all database to remove unused pages - reduce data file
        /// </summary>
        long Rebuild(RebuildOptions options = null);

        /// <summary>
        /// Get value from internal engine variables
        /// </summary>
        BsonValue Pragma(string name);

        /// <summary>
        /// Set new value to internal engine variables
        /// </summary>
        BsonValue Pragma(string name, BsonValue value);

        /// <summary>
        /// Get/Set database user version - use this version number to control database change model
        /// </summary>
        int UserVersion { get; set; }

        /// <summary>
        /// Get/Set database timeout - this timeout is used to wait for unlock using transactions
        /// </summary>
        TimeSpan Timeout { get; set; }

        /// <summary>
        /// Get/Set if database will deserialize dates in UTC timezone or Local timezone (default: Local)
        /// </summary>
        bool UtcDate { get; set; }

        /// <summary>
        /// Get/Set database limit size (in bytes). New value must be equals or larger than current database size
        /// </summary>
        long LimitSize { get; set; }

        /// <summary>
        /// Get/Set in how many pages (8 Kb each page) log file will auto checkpoint (copy from log file to data file). Use 0 to manual-only checkpoint (and no checkpoint on dispose)
        /// Default: 1000 pages
        /// </summary>
        int CheckpointSize { get; set; }

        /// <summary>
        /// Get database collection (this options can be changed only in rebuild proces)
        /// </summary>
        Collation Collation { get; }
    }
}

================================================
FILE: LiteDB/Client/Database/ILiteQueryable.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;

namespace LiteDB
{
    public interface ILiteQueryable<T> : ILiteQueryableResult<T>
    {
        ILiteQueryable<T> Include(BsonExpression path);
        ILiteQueryable<T> Include(List<BsonExpression> paths);
        ILiteQueryable<T> Include<K>(Expression<Func<T, K>> path);

        ILiteQueryable<T> Where(BsonExpression predicate);
        ILiteQueryable<T> Where(string predicate, BsonDocument parameters);
        ILiteQueryable<T> Where(string predicate, params BsonValue[] args);
        ILiteQueryable<T> Where(Expression<Func<T, bool>> predicate);

        ILiteQueryable<T> OrderBy(BsonExpression keySelector, int order = 1);
        ILiteQueryable<T> OrderBy<K>(Expression<Func<T, K>> keySelector, int order = 1);
        ILiteQueryable<T> OrderByDescending(BsonExpression keySelector);
        ILiteQueryable<T> OrderByDescending<K>(Expression<Func<T, K>> keySelector);

        ILiteQueryable<T> GroupBy(BsonExpression keySelector);
        ILiteQueryable<T> Having(BsonExpression predicate);

        ILiteQueryableResult<BsonDocument> Select(BsonExpression selector);
        ILiteQueryableResult<K> Select<K>(Expression<Func<T, K>> selector);
    }

    public interface ILiteQueryableResult<T>
    {
        ILiteQueryableResult<T> Limit(int limit);
        ILiteQueryableResult<T> Skip(int offset);
        ILiteQueryableResult<T> Offset(int offset);
        ILiteQueryableResult<T> ForUpdate();

        BsonDocument GetPlan();
        IBsonDataReader ExecuteReader();
        IEnumerable<BsonDocument> ToDocuments();
        IEnumerable<T> ToEnumerable();
        List<T> ToList();
        T[] ToArray();

        int Into(string newCollection, BsonAutoId autoId = BsonAutoId.ObjectId);

        T First();
        T FirstOrDefault();
        T Single();
        T SingleOrDefault();

        int Count();
        long LongCount();
        bool Exists();
    }
}

================================================
FILE: LiteDB/Client/Database/ILiteRepository.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq.Expressions;

namespace LiteDB
{
    public interface ILiteRepository : IDisposable
    {
        /// <summary>
        /// Get database instance
        /// </summary>
        ILiteDatabase Database { get; }

        /// <summary>
        /// Insert a new document into collection. Document Id must be a new value in collection - Returns document Id
        /// </summary>
        BsonValue Insert<T>(T entity, string collectionName = null);

        /// <summary>
        /// Insert an array of new documents into collection. Document Id must be a new value in collection. Can be set buffer size to commit at each N documents
        /// </summary>
        int Insert<T>(IEnumerable<T> entities, string collectionName = null);

        /// <summary>
        /// Update a document into collection. Returns false if not found document in collection
        /// </summary>
        bool Update<T>(T entity, string collectionName = null);

        /// <summary>
        /// Update all documents
        /// </summary>
        int Update<T>(IEnumerable<T> entities, string collectionName = null);

        /// <summary>
        /// Insert or Update a document based on _id key. Returns true if insert entity or false if update entity
        /// </summary>
        bool Upsert<T>(T entity, string collectionName = null);

        /// <summary>
        /// Insert or Update all documents based on _id key. Returns entity count that was inserted
        /// </summary>
        int Upsert<T>(IEnumerable<T> entities, string collectionName = null);

        /// <summary>
        /// Delete entity based on _id key
        /// </summary>
        bool Delete<T>(BsonValue id, string collectionName = null);

        /// <summary>
        /// Delete entity based on Query
        /// </summary>
        int DeleteMany<T>(BsonExpression predicate, string collectionName = null);

        /// <summary>
        /// Delete entity based on predicate filter expression
        /// </summary>
        int DeleteMany<T>(Expression<Func<T, bool>> predicate, string collectionName = null);

        /// <summary>
        /// Returns new instance of LiteQueryable that provides all method to query any entity inside collection. Use fluent API to apply filter/includes an than run any execute command, like ToList() or First()
        /// </summary>
        ILiteQueryable<T> Query<T>(string collectionName = null);

        /// <summary>
        /// Create a new permanent index in all documents inside this collections if index not exists already. Returns true if index was created or false if already exits
        /// </summary>
        /// <param name="name">Index name - unique name for this collection</param>
        /// <param name="expression">Create a custom expression function to be indexed</param>
        /// <param name="unique">If is a unique index</param>
        /// <param name="collectionName">Collection Name</param>
        bool EnsureIndex<T>(string name, BsonExpression expression, bool unique = false, string collectionName = null);

        /// <summary>
        /// Create a new permanent index in all documents inside this collections if index not exists already. Returns true if index was created or false if already exits
        /// </summary>
        /// <param name="expression">Create a custom expression function to be indexed</param>
        /// <param name="unique">If is a unique index</param>
        /// <param name="collectionName">Collection Name</param>
        bool EnsureIndex<T>(BsonExpression expression, bool unique = false, string collectionName = null);

        /// <summary>
        /// Create a new permanent index in all documents inside this collections if index not exists already.
        /// </summary>
        /// <param name="keySelector">LinqExpression to be converted into BsonExpression to be indexed</param>
        /// <param name="unique">Create a unique keys index?</param>
        /// <param name="collectionName">Collection Name</param>
        bool EnsureIndex<T, K>(Expression<Func<T, K>> keySelector, bool unique = false, string collectionName = null);

        /// <summary>
        /// Create a new permanent index in all documents inside this collections if index not exists already.
        /// </summary>
        /// <param name="name">Index name - unique name for this collection</param>
        /// <param name="keySelector">LinqExpression to be converted into BsonExpression to be indexed</param>
        /// <param name="unique">Create a unique keys index?</param>
        /// <param name="collectionName">Collection Name</param>
        bool EnsureIndex<T, K>(string name, Expression<Func<T, K>> keySelector, bool unique = false, string collectionName = null);

        /// <summary>
        /// Search for a single instance of T by Id. Shortcut from Query.SingleById
        /// </summary>
        T SingleById<T>(BsonValue id, string collectionName = null);

        /// <summary>
        /// Execute Query[T].Where(predicate).ToList();
        /// </summary>
        List<T> Fetch<T>(BsonExpression predicate, string collectionName = null);

        /// <summary>
        /// Execute Query[T].Where(predicate).ToList();
        /// </summary>
        List<T> Fetch<T>(Expression<Func<T, bool>> predicate, string collectionName = null);

        /// <summary>
        /// Execute Query[T].Where(predicate).First();
        /// </summary>
        T First<T>(BsonExpression predicate, string collectionName = null);

        /// <summary>
        /// Execute Query[T].Where(predicate).First();
        /// </summary>
        T First<T>(Expression<Func<T, bool>> predicate, string collectionName = null);

        /// <summary>
        /// Execute Query[T].Where(predicate).FirstOrDefault();
        /// </summary>
        T FirstOrDefault<T>(BsonExpression predicate, string collectionName = null);

        /// <summary>
        /// Execute Query[T].Where(predicate).FirstOrDefault();
        /// </summary>
        T FirstOrDefault<T>(Expression<Func<T, bool>> predicate, string collectionName = null);

        /// <summary>
        /// Execute Query[T].Where(predicate).Single();
        /// </summary>
        T Single<T>(BsonExpression predicate, string collectionName = null);

        /// <summary>
        /// Execute Query[T].Where(predicate).Single();
        /// </summary>
        T Single<T>(Expression<Func<T, bool>> predicate, string collectionName = null);

        /// <summary>
        /// Execute Query[T].Where(predicate).SingleOrDefault();
        /// </summary>
        T SingleOrDefault<T>(BsonExpression predicate, string collectionName = null);

        /// <summary>
        /// Execute Query[T].Where(predicate).SingleOrDefault();
        /// </summary>
        T SingleOrDefault<T>(Expression<Func<T, bool>> predicate, string collectionName = null);
    }
}

================================================
FILE: LiteDB/Client/Database/LiteCollection.cs
================================================
using LiteDB.Engine;
using System;
using System.Collections.Generic;
using static LiteDB.Constants;

namespace LiteDB
{
    public sealed partial class LiteCollection<T> : ILiteCollection<T>
    {
        private readonly string _collection;
        private readonly ILiteEngine _engine;
        private readonly List<BsonExpression> _includes;
        private readonly BsonMapper _mapper;
        private readonly EntityMapper _entity;
        private readonly MemberMapper _id;
        private readonly BsonAutoId _autoId;

        /// <summary>
        /// Get collection name
        /// </summary>
        public string Name => _collection;

        /// <summary>
        /// Get collection auto id type
        /// </summary>
        public BsonAutoId AutoId => _autoId;

        /// <summary>
        /// Getting entity mapper from current collection. Returns null if collection are BsonDocument type
        /// </summary>
        public EntityMapper EntityMapper => _entity;

        internal LiteCollection(string name, BsonAutoId autoId, ILiteEngine engine, BsonMapper mapper)
        {
            _collection = name ?? mapper.ResolveCollectionName(typeof(T));
            _engine = engine;
            _mapper = mapper;
            _includes = new List<BsonExpression>();

            // if strong typed collection, get _id member mapped (if exists)
            if (typeof(T) == typeof(BsonDocument))
            {
                _entity = null;
                _id = null;
                _autoId = autoId;
            }
            else
            {
                _entity = mapper.GetEntityMapper(typeof(T));
                _entity.WaitForInitialization();
                
                _id = _entity.Id;

                if (_id != null && _id.AutoId)
                {
                    _autoId =
                        _id.DataType == typeof(Int32) || _id.DataType == typeof(Int32?) ? BsonAutoId.Int32 :
                        _id.DataType == typeof(Int64) || _id.DataType == typeof(Int64?) ? BsonAutoId.Int64 :
                        _id.DataType == typeof(Guid) || _id.DataType == typeof(Guid?) ? BsonAutoId.Guid :
                        BsonAutoId.ObjectId;
                }
                else
                {
                    _autoId = autoId;
                }
            }
        }
    }
}

================================================
FILE: LiteDB/Client/Database/LiteDatabase.cs
================================================
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Threading;
using LiteDB.Engine;
using static LiteDB.Constants;

namespace LiteDB
{
    /// <summary>
    /// The LiteDB database. Used for create a LiteDB instance and use all storage resources. It's the database connection
    /// </summary>
    public partial class LiteDatabase : ILiteDatabase
    {
        #region Properties

        private readonly ILiteEngine _engine;
        private readonly BsonMapper _mapper;
        private readonly bool _disposeOnClose;

        /// <summary>
        /// Get current instance of BsonMapper used in this database instance (can be BsonMapper.Global)
        /// </summary>
        public BsonMapper Mapper => _mapper;

        #endregion

        #region Ctor

        /// <summary>
        /// Starts LiteDB database using a connection string for file system database
        /// </summary>
        public LiteDatabase(string connectionString, BsonMapper mapper = null)
            : this(new ConnectionString(connectionString), mapper)
        {
        }

        /// <summary>
        /// Starts LiteDB database using a connection string for file system database
        /// </summary>
        public LiteDatabase(ConnectionString connectionString, BsonMapper mapper = null)
        {
            if (connectionString == null) throw new ArgumentNullException(nameof(connectionString));

            _engine = connectionString.CreateEngine();
            _mapper = mapper ?? BsonMapper.Global;
            _disposeOnClose = true;
        }

        /// <summary>
        /// Starts LiteDB database using a generic Stream implementation (mostly MemoryStream).
        /// </summary>
        /// <param name="stream">DataStream reference </param>
        /// <param name="mapper">BsonMapper mapper reference</param>
        /// <param name="logStream">LogStream reference </param>
        public LiteDatabase(Stream stream, BsonMapper mapper = null, Stream logStream = null)
        {
            var settings = new EngineSettings
            {
                DataStream = stream ?? throw new ArgumentNullException(nameof(stream)),
                LogStream = logStream
            };

            _engine = new LiteEngine(settings);
            _mapper = mapper ?? BsonMapper.Global;
            _disposeOnClose = true;
        }

        /// <summary>
        /// Start LiteDB database using a pre-exiting engine. When LiteDatabase instance dispose engine instance will be disposed too
        /// </summary>
        public LiteDatabase(ILiteEngine engine, BsonMapper mapper = null, bool disposeOnClose = true)
        {
            _engine = engine ?? throw new ArgumentNullException(nameof(engine));
            _mapper = mapper ?? BsonMapper.Global;
            _disposeOnClose = disposeOnClose;
        }

        #endregion

        #region Collections

        /// <summary>
        /// Get a collection using an entity class as strong typed document. If collection does not exist, create a new one.
        /// </summary>
        /// <param name="name">Collection name (case insensitive)</param>
        /// <param name="autoId">Define autoId data type (when object contains no id field)</param>
        public ILiteCollection<T> GetCollection<T>(string name, BsonAutoId autoId = BsonAutoId.ObjectId)
        {
            return new LiteCollection<T>(name, autoId, _engine, _mapper);
        }

        /// <summary>
        /// Get a collection using a name based on typeof(T).Name (BsonMapper.ResolveCollectionName function)
        /// </summary>
        public ILiteCollection<T> GetCollection<T>()
        {
            return this.GetCollection<T>(null);
        }

        /// <summary>
        /// Get a collection using a name based on typeof(T).Name (BsonMapper.ResolveCollectionName function)
        /// </summary>
        public ILiteCollection<T> GetCollection<T>(BsonAutoId autoId)
        {
            return this.GetCollection<T>(null, autoId);
        }

        /// <summary>
        /// Get a collection using a generic BsonDocument. If collection does not exist, create a new one.
        /// </summary>
        /// <param name="name">Collection name (case insensitive)</param>
        /// <param name="autoId">Define autoId data type (when document contains no _id field)</param>
        public ILiteCollection<BsonDocument> GetCollection(string name, BsonAutoId autoId = BsonAutoId.ObjectId)
        {
            if (name.IsNullOrWhiteSpace()) throw new ArgumentNullException(nameof(name));

            return new LiteCollection<BsonDocument>(name, autoId, _engine, _mapper);
        }

        #endregion

        #region Transaction

        /// <summary>
        /// Initialize a new transaction. Transaction are created "per-thread". There is only one single transaction per thread.
        /// Return true if transaction was created or false if current thread already in a transaction.
        /// </summary>
        public bool BeginTrans() => _engine.BeginTrans();

        /// <summary>
        /// Commit current transaction
        /// </summary>
        public bool Commit() => _engine.Commit();

        /// <summary>
        /// Rollback current transaction
        /// </summary>
        public bool Rollback() => _engine.Rollback();

        #endregion

        #region FileStorage

        private ILiteStorage<string> _fs = null;

        /// <summary>
        /// Returns a special collection for storage files/stream inside datafile. Use _files and _chunks collection names. FileId is implemented as string. Use "GetStorage" for custom options
        /// </summary>
        public ILiteStorage<string> FileStorage
        {
            get { return _fs ?? (_fs = this.GetStorage<string>()); }
        }

        /// <summary>
        /// Get new instance of Storage using custom FileId type, custom "_files" collection name and custom "_chunks" collection. LiteDB support multiples file storages (using different files/chunks collection names)
        /// </summary>
        public ILiteStorage<TFileId> GetStorage<TFileId>(string filesCollection = "_files", string chunksCollection = "_chunks")
        {
            return new LiteStorage<TFileId>(this, filesCollection, chunksCollection);
        }

        #endregion

        #region Shortcut

        /// <summary>
        /// Get all collections name inside this database.
        /// </summary>
        public IEnumerable<string> GetCollectionNames()
        {
            // use $cols system collection with type = user only
            var cols = this.GetCollection("$cols")
                .Query()
                .Where("type = 'user'")
                .ToDocuments()
                .Select(x => x["name"].AsString)
                .ToArray();

            return cols;
        }

        /// <summary>
        /// Checks if a collection exists on database. Collection name is case insensitive
        /// </summary>
        public bool CollectionExists(string name)
        {
            if (name.IsNullOrWhiteSpace()) throw new ArgumentNullException(nameof(name));

            return this.GetCollectionNames().Contains(name, StringComparer.OrdinalIgnoreCase);
        }

        /// <summary>
        /// Drop a collection and all data + indexes
        /// </summary>
        public bool DropCollection(string name)
        {
            if (name.IsNullOrWhiteSpace()) throw new ArgumentNullException(nameof(name));

            return _engine.DropCollection(name);
        }

        /// <summary>
        /// Rename a collection. Returns false if oldName does not exists or newName already exists
        /// </summary>
        public bool RenameCollection(string oldName, string newName)
        {
            if (oldName.IsNullOrWhiteSpace()) throw new ArgumentNullException(nameof(oldName));
            if (newName.IsNullOrWhiteSpace()) throw new ArgumentNullException(nameof(newName));

            return _engine.RenameCollection(oldName, newName);
        }

        #endregion

        #region Execute SQL

        /// <summary>
        /// Execute SQL commands and return as data reader.
        /// </summary>
        public IBsonDataReader Execute(TextReader commandReader, BsonDocument parameters = null)
        {
            if (commandReader == null) throw new ArgumentNullException(nameof(commandReader));

            var tokenizer = new Tokenizer(commandReader);
            var sql = new SqlParser(_engine, tokenizer, parameters);
            var reader = sql.Execute();

            return reader;
        }

        /// <summary>
        /// Execute SQL commands and return as data reader
        /// </summary>
        public IBsonDataReader Execute(string command, BsonDocument parameters = null)
        {
            if (command == null) throw new ArgumentNullException(nameof(command));

            var tokenizer = new Tokenizer(command);
            var sql = new SqlParser(_engine, tokenizer, parameters);
            var reader = sql.Execute();

            return reader;
        }

        /// <summary>
        /// Execute SQL commands and return as data reader
        /// </summary>
        public IBsonDataReader Execute(string command, params BsonValue[] args)
        {
            var p = new BsonDocument();
            var index = 0;

            foreach (var arg in args)
            {
                p[index.ToString()] = arg;
                index++;
            }

            return this.Execute(command, p);
        }

        #endregion

        #region Checkpoint/Rebuild

        /// <summary>
        /// Do database checkpoint. Copy all commited transaction from log file into datafile.
        /// </summary>
        public void Checkpoint()
        {
            _engine.Checkpoint();
        }

        /// <summary>
        /// Rebuild all database to remove unused pages - reduce data file
        /// </summary>
        public long Rebuild(RebuildOptions options = null)
        {
            return _engine.Rebuild(options ?? new RebuildOptions());
        }

        #endregion

        #region Pragmas

        /// <summary>
        /// Get value from internal engine variables
        /// </summary>
        public BsonValue Pragma(string name)
        {
            return _engine.Pragma(name);
        }

        /// <summary>
        /// Set new value to internal engine variables
        /// </summary>
        public BsonValue Pragma(string name, BsonValue value)
        {
            return _engine.Pragma(name, value);
        }

        /// <summary>
        /// Get/Set database user version - use this version number to control database change model
        /// </summary>
        public int UserVersion
        {
            get => _engine.Pragma(Pragmas.USER_VERSION);
            set => _engine.Pragma(Pragmas.USER_VERSION, value);
        }

        /// <summary>
        /// Get/Set database timeout - this timeout is used to wait for unlock using transactions
        /// </summary>
        public TimeSpan Timeout
        {
            get => TimeSpan.FromSeconds(_engine.Pragma(Pragmas.TIMEOUT).AsInt32);
            set => _engine.Pragma(Pragmas.TIMEOUT, (int)value.TotalSeconds);
        }

        /// <summary>
        /// Get/Set if database will deserialize dates in UTC timezone or Local timezone (default: Local)
        /// </summary>
        public bool UtcDate
        {
            get => _engine.Pragma(Pragmas.UTC_DATE);
            set => _engine.Pragma(Pragmas.UTC_DATE, value);
        }

        /// <summary>
        /// Get/Set database limit size (in bytes). New value must be equals or larger than current database size
        /// </summary>
        public long LimitSize
        {
            get => _engine.Pragma(Pragmas.LIMIT_SIZE);
            set => _engine.Pragma(Pragmas.LIMIT_SIZE, value);
        }

        /// <summary>
        /// Get/Set in how many pages (8 Kb each page) log file will auto checkpoint (copy from log file to data file). Use 0 to manual-only checkpoint (and no checkpoint on dispose)
        /// Default: 1000 pages
        /// </summary>
        public int CheckpointSize
        {
            get => _engine.Pragma(Pragmas.CHECKPOINT);
            set => _engine.Pragma(Pragmas.CHECKPOINT, value);
        }

        /// <summary>
        /// Get database collection (this options can be changed only in rebuild proces)
        /// </summary>
        public Collation Collation
        {
            get => new Collation(_engine.Pragma(Pragmas.COLLATION).AsString);
        }

        #endregion

        public void Dispose()
        {
            this.Dispose(true);
            GC.SuppressFinalize(this);
        }

        ~LiteDatabase()
        {
            this.Dispose(false);
        }

        protected virtual void Dispose(bool disposing)
        {
            if (disposing && _disposeOnClose)
            {
                _engine.Dispose();
            }
        }
    }
}


================================================
FILE: LiteDB/Client/Database/LiteQueryable.cs
================================================
using LiteDB.Engine;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using static LiteDB.Constants;

namespace LiteDB
{
    /// <summary>
    /// An IQueryable-like class to write fluent query in documents in collection.
    /// </summary>
    public class LiteQueryable<T> : ILiteQueryable<T>
    {
        protected readonly ILiteEngine _engine;
        protected readonly BsonMapper _mapper;
        protected readonly string _collection;
        protected readonly Query _query;

        // indicate that T type are simple and result are inside first document fields (query always return a BsonDocument)
        private readonly bool _isSimpleType = Reflection.IsSimpleType(typeof(T));

        internal LiteQueryable(ILiteEngine engine, BsonMapper mapper, string collection, Query query)
        {
            _engine = engine;
            _mapper = mapper;
            _collection = collection;
            _query = query;
        }

        #region Includes

        /// <summary>
        /// Load cross reference documents from path expression (DbRef reference)
        /// </summary>
        public ILiteQueryable<T> Include<K>(Expression<Func<T, K>> path)
        {
            _query.Includes.Add(_mapper.GetExpression(path));
            return this;
        }

        /// <summary>
        /// Load cross reference documents from path expression (DbRef reference)
        /// </summary>
        public ILiteQueryable<T> Include(BsonExpression path)
        {
            _query.Includes.Add(path);
            return this;
        }

        /// <summary>
        /// Load cross reference documents from path expression (DbRef reference)
        /// </summary>
        public ILiteQueryable<T> Include(List<BsonExpression> paths)
        {
            _query.Includes.AddRange(paths);
            return this;
        }

        #endregion

        #region Where

        /// <summary>
        /// Filters a sequence of documents based on a predicate expression
        /// </summary>
        public ILiteQueryable<T> Where(BsonExpression predicate)
        {
            _query.Where.Add(predicate);
            return this;
        }

        /// <summary>
        /// Filters a sequence of documents based on a predicate expression
        /// </summary>
        public ILiteQueryable<T> Where(string predicate, BsonDocument parameters)
        {
            _query.Where.Add(BsonExpression.Create(predicate, parameters));
            return this;
        }

        /// <summary>
        /// Filters a sequence of documents based on a predicate expression
        /// </summary>
        public ILiteQueryable<T> Where(string predicate, params BsonValue[] args)
        {
            _query.Where.Add(BsonExpression.Create(predicate, args));
            return this;
        }

        /// <summary>
        /// Filters a sequence of documents based on a predicate expression
        /// </summary>
        public ILiteQueryable<T> Where(Expression<Func<T, bool>> predicate)
        {
            return this.Where(_mapper.GetExpression(predicate));
        }

        #endregion

        #region OrderBy

        /// <summary>
        /// Sort the documents of resultset in ascending (or descending) order according to a key (support only one OrderBy)
        /// </summary>
        public ILiteQueryable<T> OrderBy(BsonExpression keySelector, int order = Query.Ascending)
        {
            if (_query.OrderBy != null) throw new ArgumentException("ORDER BY already defined in this query builder");

            _query.OrderBy = keySelector;
            _query.Order = order;
            return this;
        }

        /// <summary>
        /// Sort the documents of resultset in ascending (or descending) order according to a key (support only one OrderBy)
        /// </summary>
        public ILiteQueryable<T> OrderBy<K>(Expression<Func<T, K>> keySelector, int order = Query.Ascending)
        {
            return this.OrderBy(_mapper.GetExpression(keySelector), order);
        }

        /// <summary>
        /// Sort the documents of resultset in descending order according to a key (support only one OrderBy)
        /// </summary>
        public ILiteQueryable<T> OrderByDescending(BsonExpression keySelector) => this.OrderBy(keySelector, Query.Descending);

        /// <summary>
        /// Sort the documents of resultset in descending order according to a key (support only one OrderBy)
        /// </summary>
        public ILiteQueryable<T> OrderByDescending<K>(Expression<Func<T, K>> keySelector) => this.OrderBy(keySelector, Query.Descending);

        #endregion

        #region GroupBy

        /// <summary>
        /// Groups the documents of resultset according to a specified key selector expression (support only one GroupBy)
        /// </summary>
        public ILiteQueryable<T> GroupBy(BsonExpression keySelector)
        {
            if (_query.GroupBy != null) throw new ArgumentException("GROUP BY already defined in this query");

            _query.GroupBy = keySelector;
            return this;
        }

        #endregion

        #region Having

        /// <summary>
        /// Filter documents after group by pipe according to predicate expression (requires GroupBy and support only one Having)
        /// </summary>
        public ILiteQueryable<T> Having(BsonExpression predicate)
        {
            if (_query.Having != null) throw new ArgumentException("HAVING already defined in this query");

            _query.Having = predicate;
            return this;
        }

        #endregion

        #region Select

        /// <summary>
        /// Transform input document into a new output document. Can be used with each document, group by or all source
        /// </summary>
        public ILiteQueryableResult<BsonDocument> Select(BsonExpression selector)
        {
            _query.Select = selector;

            return new LiteQueryable<BsonDocument>(_engine, _mapper, _collection, _query);
        }

        /// <summary>
        /// Project each document of resultset into a new document/value based on selector expression
        /// </summary>
        public ILiteQueryableResult<K> Select<K>(Expression<Func<T, K>> selector)
        {
            if (_query.GroupBy != null) throw new ArgumentException("Use Select(BsonExpression selector) when using GroupBy query");

            _query.Select = _mapper.GetExpression(selector);

            return new LiteQueryable<K>(_engine, _mapper, _collection, _query);
        }

        #endregion

        #region Offset/Limit/ForUpdate

        /// <summary>
        /// Execute query locking collection in write mode. This is avoid any other thread change results after read document and before transaction ends
        /// </summary>
        public ILiteQueryableResult<T> ForUpdate()
        {
            _query.ForUpdate = true;
            return this;
        }

        /// <summary>
        /// Bypasses a specified number of documents in resultset and retun the remaining documents (same as Skip)
        /// </summary>
        public ILiteQueryableResult<T> Offset(int offset)
        {
            _query.Offset = offset;
            return this;
        }

        /// <summary>
        /// Bypasses a specified number of documents in resultset and retun the remaining documents (same as Offset)
        /// </summary>
        public ILiteQueryableResult<T> Skip(int offset) => this.Offset(offset);

        /// <summary>
        /// Return a specified number of contiguous documents from start of resultset
        /// </summary>
        public ILiteQueryableResult<T> Limit(int limit)
        {
            _query.Limit = limit;
            return this;
        }

        #endregion

        #region Execute Result

        /// <summary>
        /// Execute query and returns resultset as generic BsonDataReader
        /// </summary>
        public IBsonDataReader ExecuteReader()
        {
            _query.ExplainPlan = false;

            return _engine.Query(_collection, _query);
        }

        /// <summary>
        /// Execute query and return resultset as IEnumerable of documents
        /// </summary>
        public IEnumerable<BsonDocument> ToDocuments()
        {
            using (var reader = this.ExecuteReader())
            {
                while (reader.Read())
                {
                    yield return reader.Current as BsonDocument;
                }
            }
        }

        /// <summary>
        /// Execute query and return resultset as IEnumerable of T. If T is a ValueType or String, return values only (not documents)
        /// </summary>
        public IEnumerable<T> ToEnumerable()
        {
            if (_isSimpleType)
            {
                return this.ToDocuments()
                    .Select(x => x[x.Keys.First()])
                    .Select(x => (T)_mapper.Deserialize(typeof(T), x));
            }
            else
            {
                return this.ToDocuments()
                    .Select(x => (T)_mapper.Deserialize(typeof(T), x));
            }
        }

        /// <summary>
        /// Execute query and return results as a List
        /// </summary>
        public List<T> ToList()
        {
            return this.ToEnumerable().ToList();
        }

        /// <summary>
        /// Execute query and return results as an Array
        /// </summary>
        public T[] ToArray()
        {
            return this.ToEnumerable().ToArray();
        }

        /// <summary>
        /// Get execution plan over current query definition to see how engine will execute query
        /// </summary>
        public BsonDocument GetPlan()
        {
            _query.ExplainPlan = true;

            var reader = _engine.Query(_collection, _query);

            return reader.ToEnumerable().FirstOrDefault()?.AsDocument;
        }

        #endregion

        #region Execute Single/First

        /// <summary>
        /// Returns the only document of resultset, and throw an exception if there not exactly one document in the sequence
        /// </summary>
        public T Single()
        {
            return this.ToEnumerable().Single();
        }

        /// <summary>
        /// Returns the only document of resultset, or null if resultset are empty; this method throw an exception if there not exactly one document in the sequence
        /// </summary>
        public T SingleOrDefault()
        {
            return this.ToEnumerable().SingleOrDefault();
        }

        /// <summary>
        /// Returns first document of resultset
        /// </summary>
        public T First()
        {
            return this.ToEnumerable().First();
        }

        /// <summary>
        /// Returns first document of resultset or null if resultset are empty
        /// </summary>
        public T FirstOrDefault()
        {
            return this.ToEnumerable().FirstOrDefault();
        }

        #endregion

        #region Execute Count

        /// <summary>
        /// Execute Count methos in filter query
        /// </summary>
        public int Count()
        {
            var oldSelect = _query.Select;

            try
            {
                this.Select($"{{ count: COUNT(*._id) }}");
                var ret = this.ToDocuments().Single()["count"].AsInt32;

                return ret;
            }
            finally
            {
                _query.Select = oldSelect;
            }
        }

        /// <summary>
        /// Execute Count methos in filter query
        /// </summary>
        public long LongCount()
        {
            var oldSelect = _query.Select;

            try
            {
                this.Select($"{{ count: COUNT(*._id) }}");
                var ret = this.ToDocuments().Single()["count"].AsInt64;

                return ret;
            }
            finally
            {
                _query.Select = oldSelect;
            }
        }

        /// <summary>
        /// Returns true/false if query returns any result
        /// </summary>
        public bool Exists()
        {
            var oldSelect = _query.Select;

            try
            {
                this.Select($"{{ exists: ANY(*._id) }}");
                var ret = this.ToDocuments().Single()["exists"].AsBoolean;

                return ret;
            }
            finally
            {
                _query.Select = oldSelect;
            }
        }

        #endregion

        #region Execute Into

        public int Into(string newCollection, BsonAutoId autoId = BsonAutoId.ObjectId)
        {
            _query.Into = newCollection;
            _query.IntoAutoId = autoId;

            using (var reader = this.ExecuteReader())
            {
                return reader.Current.AsInt32;
            }
        }

        #endregion
    }
}

================================================
FILE: LiteDB/Client/Database/LiteRepository.cs
================================================
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Linq.Expressions;
using static LiteDB.Constants;

namespace LiteDB
{
    /// <summary>
    /// The LiteDB repository pattern. A simple way to access your documents in a single class with fluent query api
    /// </summary>
    public class LiteRepository : ILiteRepository
    {
        #region Properties

        private readonly ILiteDatabase _db = null;

        /// <summary>
        /// Get database instance
        /// </summary>
        public ILiteDatabase Database => _db;

        #endregion

        #region Ctor

        /// <summary>
        /// Starts LiteDB database an existing Database instance
        /// </summary>
        public LiteRepository(ILiteDatabase database)
        {
            _db = database;
        }

        /// <summary>
        /// Starts LiteDB database using a connection string for file system database
        /// </summary>
        public LiteRepository(string connectionString, BsonMapper mapper = null)
        {
            _db = new LiteDatabase(connectionString, mapper);
        }

        /// <summary>
        /// Starts LiteDB database using a connection string for file system database
        /// </summary>
        public LiteRepository(ConnectionString connectionString, BsonMapper mapper = null)
        {
            _db = new LiteDatabase(connectionString, mapper);
        }

        /// <summary>
        /// Starts LiteDB database using a Stream disk
        /// </summary>
        public LiteRepository(Stream stream, BsonMapper mapper = null, Stream logStream = null)
        {
            _db = new LiteDatabase(stream, mapper, logStream);
        }

        #endregion

        #region Insert

        /// <summary>
        /// Insert a new document into collection. Document Id must be a new value in collection - Returns document Id
        /// </summary>
        public BsonValue Insert<T>(T entity, string collectionName = null)
        {
            return _db.GetCollection<T>(collectionName).Insert(entity);
        }

        /// <summary>
        /// Insert an array of new documents into collection. Document Id must be a new value in collection. Can be set buffer size to commit at each N documents
        /// </summary>
        public int Insert<T>(IEnumerable<T> entities, string collectionName = null)
        {
            return _db.GetCollection<T>(collectionName).Insert(entities);
        }

        #endregion

        #region Update

        /// <summary>
        /// Update a document into collection. Returns false if not found document in collection
        /// </summary>
        public bool Update<T>(T entity, string collectionName = null)
        {
            return _db.GetCollection<T>(collectionName).Update(entity);
        }

        /// <summary>
        /// Update all documents
        /// </summary>
        public int Update<T>(IEnumerable<T> entities, string collectionName = null)
        {
            return _db.GetCollection<T>(collectionName).Update(entities);
        }

        #endregion

        #region Upsert

        /// <summary>
        /// Insert or Update a document based on _id key. Returns true if insert entity or false if update entity
        /// </summary>
        public bool Upsert<T>(T entity, string collectionName = null)
        {
            return _db.GetCollection<T>(collectionName).Upsert(entity);
        }

        /// <summary>
        /// Insert or Update all documents based on _id key. Returns entity count that was inserted
        /// </summary>
        public int Upsert<T>(IEnumerable<T> entities, string collectionName = null)
        {
            return _db.GetCollection<T>(collectionName).Upsert(entities);
        }

        #endregion

        #region Delete

        /// <summary>
        /// Delete entity based on _id key
        /// </summary>
        public bool Delete<T>(BsonValue id, string collectionName = null)
        {
            return _db.GetCollection<T>(collectionName).Delete(id);
        }

        /// <summary>
        /// Delete entity based on Query
        /// </summary>
        public int DeleteMany<T>(BsonExpression predicate, string collectionName = null)
        {
            return _db.GetCollection<T>(collectionName).DeleteMany(predicate);
        }

        /// <summary>
        /// Delete entity based on predicate filter expression
        /// </summary>
        public int DeleteMany<T>(Expression<Func<T, bool>> predicate, string collectionName = null)
        {
            return _db.GetCollection<T>(collectionName).DeleteMany(predicate);
        }

        #endregion

        #region Query

        /// <summary>
        /// Returns new instance of LiteQueryable that provides all method to query any entity inside collection. Use fluent API to apply filter/includes an than run any execute command, like ToList() or First()
        /// </summary>
        public ILiteQueryable<T> Query<T>(string collectionName = null)
        {
            return _db.GetCollection<T>(collectionName).Query();
        }

        #endregion

        #region EnsureIndex

        /// <summary>
        /// Create a new permanent index in all documents inside this collections if index not exists already. Returns true if index was created or false if already exits
        /// </summary>
        /// <param name="name">Index name - unique name for this collection</param>
        /// <param name="expression">Create a custom expression function to be indexed</param>
        /// <param name="unique">If is a unique index</param>
        /// <param name="collectionName">Collection Name</param>
        public bool EnsureIndex<T>(string name, BsonExpression expression, bool unique = false, string collectionName = null)
        {
            return _db.GetCollection<T>(collectionName).EnsureIndex(name, expression, unique);
        }

        /// <summary>
        /// Create a new permanent index in all documents inside this collections if index not exists already. Returns true if index was created or false if already exits
        /// </summary>
        /// <param name="expression">Create a custom expression function to be indexed</param>
        /// <param name="unique">If is a unique index</param>
        /// <param name="collectionName">Collection Name</param>
        public bool EnsureIndex<T>(BsonExpression expression, bool unique = false, string collectionName = null)
        {
            return _db.GetCollection<T>(collectionName).EnsureIndex(expression, unique);
        }

        /// <summary>
        /// Create a new permanent index in all documents inside this collections if index not exists already.
        /// </summary>
        /// <param name="keySelector">LinqExpression to be converted into BsonExpression to be indexed</param>
        /// <param name="unique">Create a unique keys index?</param>
        /// <param name="collectionName">Collection Name</param>
        public bool EnsureIndex<T, K>(Expression<Func<T, K>> keySelector, bool unique = false, string collectionName = null)
        {
            return _db.GetCollection<T>(collectionName).EnsureIndex(keySelector, unique);
        }

        /// <summary>
        /// Create a new permanent index in all documents inside this collections if index not exists already.
        /// </summary>
        /// <param name="name">Index name - unique name for this collection</param>
        /// <param name="keySelector">LinqExpression to be converted into BsonExpression to be indexed</param>
        /// <param name="unique">Create a unique keys index?</param>
        /// <param name="collectionName">Collection Name</param>
        public bool EnsureIndex<T, K>(string name, Expression<Func<T, K>> keySelector, bool unique = false, string collectionName = null)
        {
            return _db.GetCollection<T>(collectionName).EnsureIndex(name, keySelector, unique);
        }

        #endregion

        #region Shortcuts

        /// <summary>
        /// Search for a single instance of T by Id. Shortcut from Query.SingleById
        /// </summary>
        public T SingleById<T>(BsonValue id, string collectionName = null)
        {
            return _db.GetCollection<T>(collectionName).Query()
                .Where("_id = @0", id)
                .Single();
        }

        /// <summary>
        /// Execute Query[T].Where(predicate).ToList();
        /// </summary>
        public List<T> Fetch<T>(BsonExpression predicate, string collectionName = null)
        {
            return this.Query<T>(collectionName)
                .Where(predicate)
                .ToList();
        }

        /// <summary>
        /// Execute Query[T].Where(predicate).ToList();
        /// </summary>
        public List<T> Fetch<T>(Expression<Func<T, bool>> predicate, string collectionName = null)
        {
            return this.Query<T>(collectionName)
                .Where(predicate)
                .ToList();
        }

        /// <summary>
        /// Execute Query[T].Where(predicate).First();
        /// </summary>
        public T First<T>(BsonExpression predicate, string collectionName = null)
        {
            return this.Query<T>(collectionName)
                .Where(predicate)
                .First();
        }

        /// <summary>
        /// Execute Query[T].Where(predicate).First();
        /// </summary>
        public T First<T>(Expression<Func<T, bool>> predicate, string collectionName = null)
        {
            return this.Query<T>(collectionName)
                .Where(predicate)
                .First();
        }

        /// <summary>
        /// Execute Query[T].Where(predicate).FirstOrDefault();
        /// </summary>
        public T FirstOrDefault<T>(BsonExpression predicate, string collectionName = null)
        {
            return this.Query<T>(collectionName)
                .Where(predicate)
                .FirstOrDefault();
        }

        /// <summary>
        /// Execute Query[T].Where(predicate).FirstOrDefault();
        /// </summary>
        public T FirstOrDefault<T>(Expression<Func<T, bool>> predicate, string collectionName = null)
        {
            return this.Query<T>(collectionName)
                .Where(predicate)
                .FirstOrDefault();
        }

        /// <summary>
        /// Execute Query[T].Where(predicate).Single();
        /// </summary>
        public T Single<T>(BsonExpression predicate, string collectionName = null)
        {
            return this.Query<T>(collectionName)
                .Where(predicate)
                .Single();
        }

        /// <summary>
        /// Execute Query[T].Where(predicate).Single();
        /// </summary>
        public T Single<T>(Expression<Func<T, bool>> predicate, string collectionName = null)
        {
            return this.Query<T>(collectionName)
                .Where(predicate)
                .Single();
        }

        /// <summary>
        /// Execute Query[T].Where(predicate).SingleOrDefault();
        /// </summary>
        public T SingleOrDefault<T>(BsonExpression predicate, string collectionName = null)
        {
            return this.Query<T>(collectionName)
                .Where(predicate)
                .SingleOrDefault();
        }

        /// <summary>
        /// Execute Query[T].Where(predicate).SingleOrDefault();
        /// </summary>
        public T SingleOrDefault<T>(Expression<Func<T, bool>> predicate, string collectionName = null)
        {
            return this.Query<T>(collectionName)
                .Where(predicate)
                .SingleOrDefault();
        }

        #endregion

        public void Dispose()
        {
            this.Dispose(true);
            GC.SuppressFinalize(this);
        }

        ~LiteRepository()
        {
            this.Dispose(false);
        }

        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                _db.Dispose();
            }
        }
    }
}

================================================
FILE: LiteDB/Client/Mapper/Attributes/BsonCtorAttribute.cs
================================================
using System;
using static LiteDB.Constants;

namespace LiteDB
{
    /// <summary>
    /// Indicate which constructor method will be used in this entity
    /// </summary>
    public class BsonCtorAttribute : Attribute
    {
    }
}

================================================
FILE: LiteDB/Client/Mapper/Attributes/BsonFieldAttribute.cs
================================================
using System;
using static LiteDB.Constants;

namespace LiteDB
{
    /// <summary>
    /// Set a name to this property in BsonDocument
    /// </summary>
    public class BsonFieldAttribute : Attribute
    {
        public string Name { get; set; }

        public BsonFieldAttribute(string name)
        {
            this.Name = name;
        }

        public BsonFieldAttribute()
        {
        }
    }
}

================================================
FILE: LiteDB/Client/Mapper/Attributes/BsonIdAttribute.cs
================================================
using System;
using static LiteDB.Constants;

namespace LiteDB
{
    /// <summary>
    /// Indicate that property will be used as BsonDocument Id
    /// </summary>
    public class BsonIdAttribute : Attribute
    {
        public bool AutoId { get; private set; }

        public BsonIdAttribute()
        {
            this.AutoId = true;
        }

        public BsonIdAttribute(bool autoId)
        {
            this.AutoId = autoId;
        }
    }
}

================================================
FILE: LiteDB/Client/Mapper/Attributes/BsonIgnoreAttribute.cs
================================================
using System;
using static LiteDB.Constants;

namespace LiteDB
{
    /// <summary>
    /// Indicate that property will not be persist in Bson serialization
    /// </summary>
    public class BsonIgnoreAttribute : Attribute
    {
    }
}

================================================
FILE: LiteDB/Client/Mapper/Attributes/BsonRefAttribute.cs
================================================
using System;
using static LiteDB.Constants;

namespace LiteDB
{
    /// <summary>
    /// Indicate that field are not persisted inside this document but it's a reference for another document (DbRef)
    /// </summary>
    public class BsonRefAttribute : Attribute
    {
        public string Collection { get; set; }

        public BsonRefAttribute(string collection)
        {
            this.Collection = collection;
        }

        public BsonRefAttribute()
        {
            this.Collection = null;
        }
    }
}

================================================
FILE: LiteDB/Client/Mapper/BsonMapper.Deserialize.cs
================================================
using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using static LiteDB.Constants;

namespace LiteDB
{
    public partial class BsonMapper
    {
        #region Deserialization Hooks

        /// <summary>
        /// Delegate for deserialization callback.
        /// </summary>
        /// <param name="sender">The BsonMapper instance that triggered the deserialization.</param>
        /// <param name="target">The target type for deserialization.</param>
        /// <param name="value">The BsonValue to be deserialized.</param>
        /// <returns>The deserialized BsonValue.</returns>
        public delegate BsonValue DeserializationCallback(BsonMapper sender, Type target, BsonValue value);

        /// <summary>
        /// Gets called before deserialization of a value
        /// </summary>
        public DeserializationCallback? OnDeserialization { get; set; }

        #endregion Deserialization Hooks

        #region Basic direct .NET convert types

        // direct bson types
        private readonly HashSet<Type> _bsonTypes = new HashSet<Type>
        {
            typeof(String),
            typeof(Int32),
            typeof(Int64),
            typeof(Boolean),
            typeof(Guid),
            typeof(DateTime),
            typeof(Byte[]),
            typeof(ObjectId),
            typeof(Double),
            typeof(Decimal)
        };

        // simple convert types
        private readonly HashSet<Type> _basicTypes = new HashSet<Type>
        {
            typeof(Int16),
            typeof(UInt16),
            typeof(UInt32),
            typeof(Single),
            typeof(Char),
            typeof(Byte),
            typeof(SByte)
        };

        #endregion

        /// <summary>
        /// Deserialize a BsonDocument to entity class
        /// </summary>
        public virtual object ToObject(Type type, BsonDocument doc)
        {
            if (doc == null) throw new ArgumentNullException(nameof(doc));

            // if T is BsonDocument, just return them
            if (type == typeof(BsonDocument)) return doc;

            return this.Deserialize(type, doc);
        }

        /// <summary>
        /// Deserialize a BsonDocument to entity class
        /// </summary>
        public virtual T ToObject<T>(BsonDocument doc)
        {
            return (T)this.ToObject(typeof(T), doc);
        }

        /// <summary>
        /// Deserialize a BsonValue to .NET object typed in T
        /// </summary>
        public T Deserialize<T>(BsonValue value)
        {
            if (value == null) return default(T);

            var result = this.Deserialize(typeof(T), value);

            return (T)result;
        }

        /// <summary>
        /// Deserilize a BsonValue to .NET object based on type parameter
        /// </summary>
        public object Deserialize(Type type, BsonValue value)
        {
            if (OnDeserialization is not null)
            {
                var result = OnDeserialization(this, type, value);
                if (result is not null)
                {
                    value = result;
                }
            }

            // null value - null returns
            if (value.IsNull) return null;

            // if is nullable, get underlying type
            if (Reflection.IsNullable(type))
            {
                type = Reflection.UnderlyingTypeOf(type);
            }

            // test if has a custom type implementation
            if (_customDeserializer.TryGetValue(type, out Func<BsonValue, object> custom))
            {
                return custom(value);
            }

            var typeInfo = type.GetTypeInfo();

            // check if your type is already a BsonValue/BsonDocument/BsonArray
            if (type == typeof(BsonValue))
            {
                return value;
            }
            else if (type == typeof(BsonDocument))
            {
                return value.AsDocument;
            }
            else if (type == typeof(BsonArray))
            {
                return value.AsArray;
            }

            // raw values to native bson values
            else if (_bsonTypes.Contains(type))
            {
                return value.RawValue;
            }

            // simple ConvertTo to basic .NET types
            else if (_basicTypes.Contains(type))
            {
                return Convert.ChangeType(value.RawValue, type);
            }

            // special cast to UInt64 to Int64
            else if (type == typeof(UInt64))
            {
                return unchecked((UInt64)value.AsInt64);
            }

            // enum value is an int
            else if (typeInfo.IsEnum)
            {
                if (value.IsString) return Enum.Parse(type, value.AsString);

                if (value.IsNumber) return Enum.ToObject(type, value.AsInt32);
            }

            // if value is array, deserialize as array
            else if (value.IsArray)
            {
                // when array are from an object (like in Dictionary<string, object> { ["array"] = new string[] { "a", "b" } 
                if (type == typeof(object))
                {
                    return this.DeserializeArray(typeof(object), value.AsArray);
                }
                if (type.IsArray)
                {
                    return this.DeserializeArray(type.GetElementType(), value.AsArray);
                }
                else
                {
                    return this.DeserializeList(type, value.AsArray);
                }
            }

            // if value is document, deserialize as document
            else if (value.IsDocument)
            {
                // if type is anonymous use special handler
                if (type.IsAnonymousType())
                {
                    return this.DeserializeAnonymousType(type, value.AsDocument);
                }

                var doc = value.AsDocument;

                // test if value is object and has _type
                if (doc.TryGetValue("_type", out var typeField) && typeField.IsString)
                {
                    var actualType = _typeNameBinder.GetType(typeField.AsString);

                    if (actualType == null) throw LiteException.InvalidTypedName(typeField.AsString);

                    // avoid initialize class that are not assignable 
                    if (!type.IsAssignableFrom(actualType))
                    {
                        throw LiteException.DataTypeNotAssignable(type.FullName, actualType.FullName);
                    }

                    type = actualType;
                }
                // when complex type has no definition (== typeof(object)) use Dictionary<string, object> to better set values
                else if (type == typeof(object))
                {
                    type = typeof(Dictionary<string, object>);
                }

                var entity = this.GetEntityMapper(type);
                entity.WaitForInitialization();

                // initialize CreateInstance
                if (entity.CreateInstance == null)
                {
                    entity.CreateInstance =
                        this.GetTypeCtor(entity) ??
                        ((BsonDocument v) => Reflection.CreateInstance(entity.ForType));
                }

                var o = _typeInstantiator(type) ?? entity.CreateInstance(doc);

                if (o is IDictionary dict)
                {
                    if (o.GetType().GetTypeInfo().IsGenericType)
                    {
                        var k = type.GetGenericArguments()[0];
                        var t = type.GetGenericArguments()[1];

                        this.DeserializeDictionary(k, t, dict, value.AsDocument);
                    }
                    else
                    {
                        this.DeserializeDictionary(typeof(object), typeof(object), dict, value.AsDocument);
                    }
                }
                else
                {
                    this.DeserializeObject(entity, o, doc);
                }

                return o;
            }

            // in last case, return value as-is - can cause "cast error"
            // it's used for "public object MyInt { get; set; }"
            return value.RawValue;
        }

        private object DeserializeArray(Type type, BsonArray array)
        {
            var arr = Array.CreateInstance(type, array.Count);
            var idx = 0;

            foreach (var item in array)
            {
                arr.SetValue(this.Deserialize(type, item), idx++);
            }

            return arr;
        }

        private object DeserializeList(Type type, BsonArray value)
        {
            var itemType = Reflection.GetListItemType(type);
            var enumerable = (IEnumerable)Reflection.CreateInstance(type);

            if (enumerable is IList list)
            {
                foreach (BsonValue item in value)
                {
                    list.Add(this.Deserialize(itemType, item));
                }
            }
            else
            {
                var addMethod = type.GetMethod("Add", new Type[] { itemType });

                foreach (BsonValue item in value)
                {
                    addMethod.Invoke(enumerable, new[] { this.Deserialize(itemType, item) });
                }
            }

            return enumerable;
        }

        private void DeserializeDictionary(Type K, Type T, IDictionary dict, BsonDocument value)
        {
            var isKEnum = K.GetTypeInfo().IsEnum;
            foreach (var el in value.GetElements())
            {
                var k = isKEnum ? Enum.Parse(K, el.Key) : K == typeof(Uri) ? new Uri(el.Key) : Convert.ChangeType(el.Key, K);
                var v = this.Deserialize(T, el.Value);

                dict.Add(k, v);
            }
        }

        private void DeserializeObject(EntityMapper entity, object obj, BsonDocument value)
        {
            foreach (var member in entity.Members.Where(x => x.Setter != null))
            {
                if (value.TryGetValue(member.FieldName, out var val))
                {
                    // check if has a custom deserialize function
                    if (member.Deserialize != null)
                    {
                        member.Setter(obj, member.Deserialize(val, this));
                    }
                    else
                    {
                        member.Setter(obj, this.Deserialize(member.DataType, val));
                    }
                }
            }
        }

        private object DeserializeAnonymousType(Type type, BsonDocument value)
        {
            var args = new List<object>();
            var ctor = type.GetConstructors()[0];

            foreach (var par in ctor.GetParameters())
            {
                var arg = this.Deserialize(par.ParameterType, value[par.Name]);

                //  if name is Id and arg is null, look for _id
                if (arg == null && StringComparer.OrdinalIgnoreCase.Equals(par.Name, "Id") && value.TryGetValue("_id", out var id))
                {
                    arg = this.Deserialize(par.ParameterType, id);
                }

                args.Add(arg);
            }

            var obj = Activator.CreateInstance(type, args.ToArray());

            return obj;
        }
    }
}


================================================
FILE: LiteDB/Client/Mapper/BsonMapper.GetEntityMapper.cs
================================================
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading;

namespace LiteDB;

public partial class BsonMapper
{
    /// <summary>
    /// Mapping cache between Class/BsonDocument
    /// </summary>
    private readonly ConcurrentDictionary<Type, EntityMapper> _entities = new();

    /// <summary>
    /// Get property mapper between typed .NET class and BsonDocument - Cache results
    /// </summary>
    internal EntityMapper GetEntityMapper(Type type)
    {
        if (_entities.TryGetValue(type, out EntityMapper mapper))
        {
            return mapper;
        }

        using var cts = new CancellationTokenSource();
        try
        {
            // We need to add the empty shell, because ``BuildEntityMapper`` may use this method recursively
            var newMapper = new EntityMapper(type, cts.Token);
            mapper = _entities.GetOrAdd(type, newMapper);
            if (ReferenceEquals(mapper, newMapper))
            {
                try
                {
                    this.BuildEntityMapper(mapper);
                }
                catch (Exception ex)
                {
                    _entities.TryRemove(type, out _);
                    throw new LiteException(LiteException.MAPPING_ERROR, $"Error in '{type.Name}' mapping: {ex.Message}", ex);
                }
            }
        }
        finally
        {
            // Allow the Mapper to be used for de-/serialization
            cts.Cancel();
        }

        return mapper;
    }

    /// <summary>
    /// Use this method to override how your class can be, by default, mapped from entity to Bson document.
    /// Returns an EntityMapper from each requested Type
    /// </summary>
    protected void BuildEntityMapper(EntityMapper mapper)
    {
        var idAttr = typeof(BsonIdAttribute);
        var ignoreAttr = typeof(BsonIgnoreAttribute);
        var fieldAttr = typeof(BsonFieldAttribute);
        var dbrefAttr = typeof(BsonRefAttribute);

        var members = this.GetTypeMembers(mapper.ForType);
        var id = this.GetIdMember(members);

        foreach (var memberInfo in members)
        {
            // checks [BsonIgnore]
            if (CustomAttributeExtensions.IsDefined(memberInfo, ignoreAttr, true)) continue;

            // checks field name conversion
            var name = this.ResolveFieldName(memberInfo.Name);

            // check if property has [BsonField]
            var field = (BsonFieldAttribute)CustomAttributeExtensions.GetCustomAttributes(memberInfo, fieldAttr, true)
                .FirstOrDefault();

            // check if property has [BsonField] with a custom field name
            if (field != null && field.Name != null)
            {
                name = field.Name;
            }

            // checks if memberInfo is id field
            if (memberInfo == id)
            {
                name = "_id";
            }

            // create getter/setter function
            var getter = Reflection.CreateGenericGetter(mapper.ForType, memberInfo);
            var setter = Reflection.CreateGenericSetter(mapper.ForType, memberInfo);

            // check if property has [BsonId] to get with was setted AutoId = true
            var autoId = (BsonIdAttribute)CustomAttributeExtensions.GetCustomAttributes(memberInfo, idAttr, true)
                .FirstOrDefault();

            // get data type
            var dataType = memberInfo is PropertyInfo
                ? (memberInfo as PropertyInfo).PropertyType
                : (memberInfo as FieldInfo).FieldType;

            // check if datatype is list/array
            var isEnumerable = Reflection.IsEnumerable(dataType);

            // create a property mapper
            var member = new MemberMapper
            {
                AutoId = autoId == null ? true : autoId.AutoId,
                FieldName = name,
                MemberName = memberInfo.Name,
                DataType = dataType,
                IsEnumerable = isEnumerable,
                UnderlyingType = isEnumerable ? Reflection.GetListItemType(dataType) : dataType,
                Getter = getter,
                Setter = setter
            };

            // check if property has [BsonRef]
            var dbRef = (BsonRefAttribute)CustomAttributeExtensions.GetCustomAttributes(memberInfo, dbrefAttr, false)
                .FirstOrDefault();

            if (dbRef != null && memberInfo is PropertyInfo)
            {
                BsonMapper.RegisterDbRef(this, member, _typeNameBinder,
                    dbRef.Collection ?? this.ResolveCollectionName((memberInfo as PropertyInfo).PropertyType));
            }

            // support callback to user modify member mapper
            this.ResolveMember?.Invoke(mapper.ForType, memberInfo, member);

            // test if has name and there is no duplicate field
            // when member is not ignore
            if (member.FieldName != null &&
                mapper.Members.Any(x => x.FieldName.Equals(name, StringComparison.OrdinalIgnoreCase)) == false &&
                !member.IsIgnore)
            {
                mapper.Members.Add(member);
            }
        }
    }

    /// <summary>
    /// Gets MemberInfo that refers to Id from a document object.
    /// </summary>
    protected virtual MemberInfo GetIdMember(IEnumerable<MemberInfo> members)
    {
        return Reflection.SelectMember(members,
            x => CustomAttributeExtensions.IsDefined(x, typeof(BsonIdAttribute), true),
            x => x.Name.Equals("Id", StringComparison.OrdinalIgnoreCase),
            x => x.Name.Equals(x.DeclaringType.Name + "Id", StringComparison.OrdinalIgnoreCase));
    }

    /// <summary>
    /// Returns all member that will be have mapper between POCO class to document
    /// </summary>
    protected virtual IEnumerable<MemberInfo> GetTypeMembers(Type type)
    {
        var members = new List<MemberInfo>();

        var flags = this.IncludeNonPublic
            ? (BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance)
            : (BindingFlags.Public | BindingFlags.Instance);

        members.AddRange(type.GetProperties(flags)
            .Where(x => x.CanRead && x.GetIndexParameters().Length == 0)
            .Select(x => x as MemberInfo));

        var shouldIncludeFields = members.Count == 0
                                  && type.GetTypeInfo().IsValueType;
                                  
        if (shouldIncludeFields || this.IncludeFields)
        {
            members.AddRange(type.GetFields(flags).Where(x => !x.Name.EndsWith("k__BackingField") && x.IsStatic == false)
                .Select(x => x as MemberInfo));
        }

        return members;
    }

    /// <summary>
    /// Get best construtor to use to initialize this entity.
    /// - Look if contains [BsonCtor] attribute
    /// - Look for parameterless ctor
    /// - Look for first contructor with parameter and use BsonDocument to send RawValue
    /// </summary>
    protected virtual CreateObject GetTypeCtor(EntityMapper mapper)
    {
        Type type = mapper.ForType;
        List<CreateObject> Mappings = new List<CreateObject>();
        bool returnZeroParamNull = false;
        foreach (ConstructorInfo ctor in type.GetConstructors())
        {
            ParameterInfo[] pars = ctor.GetParameters();
            // For 0 parameters, we can let the Reflection.CreateInstance handle it, unless they've specified a [BsonCtor] attribute on a different constructor.
            if (pars.Length == 0)
            {
                returnZeroParamNull = true;
                continue;
            }

            KeyValuePair<string, Type>[] paramMap = new KeyValuePair<string, Type>[pars.Length];
            int i;
            for (i = 0; i < pars.Length; i++)
            {
                ParameterInfo par = pars[i];
                MemberMapper mi = null;
                foreach (MemberMapper member in mapper.Members)
                {
                    if (member.MemberName.ToLower() == par.Name.ToLower() && member.DataType == par.ParameterType)
                    {
                        mi = member;
                        break;
                    }
                }

                if (mi == null)
                {
                    break;
                }

                paramMap[i] = new KeyValuePair<string, Type>(mi.FieldName, mi.DataType);
            }

            if (i < pars.Length)
            {
                continue;
            }

            CreateObject toAdd = (BsonDocument value) =>
                Activator.CreateInstance(type, paramMap.Select(x =>
                    this.Deserialize(x.Value, value[x.Key])).ToArray());
            if (ctor.GetCustomAttribute<BsonCtorAttribute>() != null)
            {
                return toAdd;
            }
            else
            {
                Mappings.Add(toAdd);
            }
        }

        if (returnZeroParamNull)
        {
            return null;
        }

        return Mappings.FirstOrDefault();
    }
}

================================================
FILE: LiteDB/Client/Mapper/BsonMapper.Serialize.cs
================================================
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using static LiteDB.Constants;

namespace LiteDB
{
    public partial class BsonMapper
    {
        /// <summary>
        /// Serialize a entity class to BsonDocument
        /// </summary>
        public virtual BsonDocument ToDocument(Type type, object entity)
        {
            if (entity == null) throw new ArgumentNullException(nameof(entity));

            // if object is BsonDocument, just return them
            if (entity is BsonDocument) return (BsonDocument)(object)entity;

            return this.Serialize(type, entity, 0).AsDocument;
        }

        /// <summary>
        /// Serialize a entity class to BsonDocument
        /// </summary>
        public virtual BsonDocument ToDocument<T>(T entity)
        {
            return this.ToDocument(typeof(T), entity)?.AsDocument;
        }

        /// <summary>
        /// Serialize to BsonValue any .NET object based on T type (using mapping rules)
        /// </summary>
        public BsonValue Serialize<T>(T obj)
        {
            return this.Serialize(typeof(T), obj, 0);
        }

        /// <summary>
        /// Serialize to BsonValue any .NET object based on type parameter (using mapping rules)
        /// </summary>
        public BsonValue Serialize(Type type, object obj)
        {
            return this.Serialize(type, obj, 0);
        }

        internal BsonValue Serialize(Type type, object obj, int depth)
        {
            if (++depth > MaxDepth) throw LiteException.DocumentMaxDepth(MaxDepth, type);

            if (obj == null) return BsonValue.Null;

            // if is already a bson value
            if (obj is BsonValue bsonValue) return bsonValue;

            // check if is a custom type
            else if (_customSerializer.TryGetValue(type, out var custom) || _customSerializer.TryGetValue(obj.GetType(), out custom))
            {
                return custom(obj);
            }
            // test string - mapper has some special options
            else if (obj is String)
            {
                var str = this.TrimWhitespace ? (obj as String).Trim() : (String)obj;

                if (this.EmptyStringToNull && str.Length == 0)
                {
                    return BsonValue.Null;
                }
                else
                {
                    return new BsonValue(str);
                }
            }
            // basic Bson data types (cast datatype for better performance optimization)
            else if (obj is Int32) return new BsonValue((Int32)obj);
            else if (obj is Int64) return new BsonValue((Int64)obj);
            else if (obj is Double) return new BsonValue((Double)obj);
            else if (obj is Decimal) return new BsonValue((Decimal)obj);
            else if (obj is Byte[]) return new BsonValue((Byte[])obj);
            else if (obj is ObjectId) return new BsonValue((ObjectId)obj);
            else if (obj is Guid) return new BsonValue((Guid)obj);
            else if (obj is Boolean) return new BsonValue((Boolean)obj);
            else if (obj is DateTime) return new BsonValue((DateTime)obj);
            // basic .net type to convert to bson
            else if (obj is Int16 || obj is UInt16 || obj is Byte || obj is SByte)
            {
                return new BsonValue(Convert.ToInt32(obj));
            }
            else if (obj is UInt32)
            {
                return new BsonValue(Convert.ToInt64(obj));
            }
            else if (obj is UInt64)
            {
                var ulng = ((UInt64)obj);
                var lng = unchecked((Int64)ulng);

                return new BsonValue(lng);
            }
            else if (obj is Single)
            {
                return new BsonValue(Convert.ToDouble(obj));
            }
            else if (obj is Char)
            {
                return new BsonValue(obj.ToString());
            }
            else if (obj is Enum)
            {
                if (this.EnumAsInteger)
                {
                    return new BsonValue((int)obj);
                }
                else
                {
                    return new BsonValue(obj.ToString());
                }
            }
            // for dictionary
            else if (obj is IDictionary dict)
            {
                // when you are converting Dictionary<string, object>
                if (type == typeof(object))
                {
                    type = obj.GetType();
                }

                var itemType = type.GetTypeInfo().IsGenericType ? type.GetGenericArguments()[1] : typeof(object);

                return this.SerializeDictionary(itemType, dict, depth);
            }
            // check if is a list or array
            else if (obj is IEnumerable)
            {
                return this.SerializeArray(Reflection.GetListItemType(type), obj as IEnumerable, depth);
            }
            // otherwise serialize as a plain object
            else
            {
                return this.SerializeObject(type, obj, depth);
            }
        }

        private BsonArray SerializeArray(Type type, IEnumerable array, int depth)
        {
            var arr = new BsonArray();

            foreach (var item in array)
            {
                arr.Add(this.Serialize(type, item, depth));
            }

            return arr;
        }

        private BsonDocument SerializeDictionary(Type type, IDictionary dict, int depth)
        {
            var o = new BsonDocument();

            foreach (var key in dict.Keys)
            {
                var value = dict[key];
                var skey = key.ToString();

                if (key is DateTime dateKey)
                {
                    skey = dateKey.ToString("o");
                }

                o[skey] = this.Serialize(type, value, depth);
            }

            return o;
        }

        private BsonDocument SerializeObject(Type type, object obj, int depth)
        {
            var t = obj.GetType();
            var doc = new BsonDocument();
            var entity = this.GetEntityMapper(t);
            entity.WaitForInitialization();

            // adding _type only where property Type is not same as object instance type
            if (type != t)
            {
                doc["_type"] = new BsonValue(_typeNameBinder.GetName(t));
            }

            foreach (var member in entity.Members.Where(x => x.Getter != null))
            {
                // get member value
                var value = member.Getter(obj);

                if (value == null && this.SerializeNullValues == false && member.FieldName != "_id") continue;

                // if member has a custom serialization, use it
                if (member.Serialize != null)
                {
                    doc[member.FieldName] = member.Serialize(value, this);
                }
                else
                {
                    doc[member.FieldName] = this.Serialize(member.DataType, value, depth);
                }
            }

            return doc;
        }
    }
}

================================================
FILE: LiteDB/Client/Mapper/BsonMapper.cs
================================================
using System;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Text.RegularExpressions;
using static LiteDB.Constants;

namespace LiteDB
{
    /// <summary>
    /// Class that converts your entity class to/from BsonDocument
    /// If you prefer use a new instance of BsonMapper (not Global), be sure cache this instance for better performance
    /// Serialization rules:
    ///     - Classes must be "public" with a public constructor (without parameters)
    ///     - Properties must have public getter (can be read-only)
    ///     - Entity class must have Id property, [ClassName]Id property or [BsonId] attribute
    ///     - No circular references
    ///     - Fields are not valid
    ///     - IList, Array supports
    ///     - IDictionary supports (Key must be a simple datatype - converted by ChangeType)
    /// </summary>
    public partial class BsonMapper
    {
        #region Properties
        /// <summary>
        /// Map serializer/deserialize for custom types
        /// </summary>
        private readonly ConcurrentDictionary<Type, Func<object, BsonValue>> _customSerializer = new ConcurrentDictionary<Type, Func<object, BsonValue>>();

        private readonly ConcurrentDictionary<Type, Func<BsonValue, object>> _customDeserializer = new ConcurrentDictionary<Type, Func<BsonValue, object>>();

        /// <summary>
        /// Type instantiator function to support IoC
        /// </summary>
        private readonly Func<Type, object> _typeInstantiator;

        /// <summary>
        /// Type name binder to control how type names are serialized to BSON documents
        /// </summary>
        private readonly ITypeNameBinder _typeNameBinder;

        /// <summary>
        /// Global instance used when no BsonMapper are passed in LiteDatabase ctor
        /// </summary>
        public static BsonMapper Global = new BsonMapper();

        /// <summary>
        /// A resolver name for field
        /// </summary>
        public Func<string, string> ResolveFieldName;

        /// <summary>
        /// Indicate that mapper do not serialize null values (default false)
        /// </summary>
        public bool SerializeNullValues { get; set; }

        /// <summary>
        /// Apply .Trim() in strings when serialize (default true)
        /// </summary>
        public bool TrimWhitespace { get; set; }

        /// <summary>
        /// Convert EmptyString to Null (default true)
        /// </summary>
        public bool EmptyStringToNull { get; set; }

        /// <summary>
        /// Get/Set if enum must be converted into Integer value. If false, enum will be converted into String value.
        /// MUST BE "true" to support LINQ expressions (default false)
        /// </summary>
        public bool EnumAsInteger { get; set; }

        /// <summary>
        /// Get/Set that mapper must include fields (default: false)
        /// </summary>
        public bool IncludeFields { get; set; }

        /// <summary>
        /// Get/Set that mapper must include non public (private, protected and internal) (default: false)
        /// </summary>
        public bool IncludeNonPublic { get; set; }

        /// <summary>
        /// Get/Set maximum depth for nested object (default 20)
        /// </summary>
        public int MaxDepth { get; set; }

        /// <summary>
        /// A custom callback to change MemberInfo behavior when converting to MemberMapper.
        /// Use mapper.ResolveMember(Type entity, MemberInfo property, MemberMapper documentMappedField)
        /// Set FieldName to null if you want remove from mapped document
        /// </summary>
        public Action<Type, MemberInfo, MemberMapper> ResolveMember;

        /// <summary>
        /// Custom resolve name collection based on Type 
        /// </summary>
        public Func<Type, string> ResolveCollectionName;

        #endregion

        public BsonMapper(Func<Type, object> customTypeInstantiator = null, ITypeNameBinder typeNameBinder = null)
        {
            this.SerializeNullValues = false;
            this.TrimWhitespace = true;
            this.EmptyStringToNull = true;
            this.EnumAsInteger = false;
            this.ResolveFieldName = (s) => s;
            this.ResolveMember = (t, mi, mm) => { };
            this.ResolveCollectionName = (t) => Reflection.IsEnumerable(t) ? Reflection.GetListItemType(t).Name : t.Name;
            this.IncludeFields = false;
            this.MaxDepth = 20;

            _typeInstantiator = customTypeInstantiator ?? ((Type t) => null);
            _typeNameBinder = typeNameBinder ?? DefaultTypeNameBinder.Instance;

            #region Register CustomTypes

            RegisterType<Uri>(uri => uri.IsAbsoluteUri ? uri.AbsoluteUri : uri.ToString(), bson => new Uri(bson.AsString));
            RegisterType<DateTimeOffset>(value => new BsonValue(value.UtcDateTime), bson => bson.AsDateTime.ToUniversalTime());
            RegisterType<TimeSpan>(value => new BsonValue(value.Ticks), bson => new TimeSpan(bson.AsInt64));
            RegisterType<Regex>(
                r => r.Options == RegexOptions.None ? new BsonValue(r.ToString()) : new BsonDocument { { "p", r.ToString() }, { "o", (int)r.Options } },
                value => value.IsString ? new Regex(value) : new Regex(value.AsDocument["p"].AsString, (RegexOptions)value.AsDocument["o"].AsInt32)
            );


            #endregion

        }

        #region Register CustomType

        /// <summary>
        /// Register a custom type serializer/deserialize function
        /// </summary>
        public void RegisterType<T>(Func<T, BsonValue> serialize, Func<BsonValue, T> deserialize)
        {
            _customSerializer[typeof(T)] = (o) => serialize((T)o);
            _customDeserializer[typeof(T)] = (b) => (T)deserialize(b);
        }

        /// <summary>
        /// Register a custom type serializer/deserialize function
        /// </summary>
        public void RegisterType(Type type, Func<object, BsonValue> serialize, Func<BsonValue, object> deserialize)
        {
            _customSerializer[type] = (o) => serialize(o);
            _customDeserializer[type] = (b) => deserialize(b);
        }

        #endregion

        /// <summary>
        /// Map your entity class to BsonDocument using fluent API
        /// </summary>
        public EntityBuilder<T> Entity<T>()
        {
            return new EntityBuilder<T>(this, _typeNameBinder);
        }

        #region Get LinqVisitor processor

        /// <summary>
        /// Resolve LINQ expression into BsonExpression
        /// </summary>
        public BsonExpression GetExpression<T, K>(Expression<Func<T, K>> predicate)
        {
            var visitor = new LinqExpressionVisitor(this, predicate);

            var expr = visitor.Resolve(typeof(K) == typeof(bool));

            LOG($"`{predicate.ToString()}` -> `{expr.Source}`", "LINQ");

            return expr;
        }

        /// <summary>
        /// Resolve LINQ expression into BsonExpression (for index only)
        /// </summary>
        public BsonExpression GetIndexExpression<T, K>(Expression<Func<T, K>> predicate)
        {
            var visitor = new LinqExpressionVisitor(this, predicate);

            var expr = visitor.Resolve(false);

            LOG($"`{predicate.ToString()}` -> `{expr.Source}`", "LINQ");

            return expr;
        }

        #endregion

        #region Predefinded Property Resolvers

        /// <summary>
        /// Use lower camel case resolution for convert property names to field names
        /// </summary>
        public BsonMapper UseCamelCase()
        {
            this.ResolveFieldName = (s) => char.ToLower(s[0]) + s.Substring(1);

            return this;
        }

        private readonly Regex _lowerCaseDelimiter = new Regex("(?!(^[A-Z]))([A-Z])", RegexOptions.Compiled);

        /// <summary>
        /// Uses lower camel case with delimiter to convert property names to field names
        /// </summary>
        public BsonMapper UseLowerCaseDelimiter(char delimiter = '_')
        {
            this.ResolveFieldName = (s) => _lowerCaseDelimiter.Replace(s, delimiter + "$2").ToLower();

            return this;
        }

        #endregion

        #region Register DbRef

        /// <summary>
        /// Register a property mapper as DbRef to serialize/deserialize only document reference _id
        /// </summary>
        internal static void RegisterDbRef(BsonMapper mapper, MemberMapper member, ITypeNameBinder typeNameBinder, string collection)
        {
            member.IsDbRef = true;

            if (member.IsEnumerable)
            {
                RegisterDbRefList(mapper, member, typeNameBinder, collection);
            }
            else
            {
                RegisterDbRefItem(mapper, member, typeNameBinder, collection);
            }
        }

        /// <summary>
        /// Register a property as a DbRef - implement a custom Serialize/Deserialize actions to convert entity to $id, $ref only
        /// </summary>
        private static void RegisterDbRefItem(BsonMapper mapper, MemberMapper member, ITypeNameBinder typeNameBinder, string collection)
        {
            // get entity
            var entity = mapper.GetEntityMapper(member.DataType);
            
            member.Serialize = (obj, m) =>
            {
                // supports null values when "SerializeNullValues = true"
                if (obj == null) return BsonValue.Null;
                entity.WaitForInitialization();
                
                var idField = entity.Id;

                // #768 if using DbRef with interface with no ID mapped
                if (idField == null) throw new LiteException(0, "There is no _id field mapped in your type: " + member.DataType.FullName);

                var id = idField.Getter(obj);

                var bsonDocument = new BsonDocument
                {
                    ["$id"] = m.Serialize(id.GetType(), id, 0),
                    ["$ref"] = collection
                };

                if (member.DataType != obj.GetType())
                {
                    bsonDocument["$type"] = typeNameBinder.GetName(obj.GetType());
                }

                return bsonDocument;
            };

            member.Deserialize = (bson, m) =>
            {
                // if not a document (maybe BsonValue.null) returns null
                if (bson == null || bson.IsDocument == false) return null;

                var doc = bson.AsDocument;
                var idRef = doc["$id"];
                var missing = doc["$missing"] == true;
                var included = doc.ContainsKey("$ref") == false;

                if (missing) return null;

                if (included)
                {
                    doc["_id"] = idRef;
                    if (doc.ContainsKey("$type"))
                    {
                        doc["_type"] = bson["$type"];
                    }

                    return m.Deserialize(entity.ForType, doc);

                }
                else
                {
                    return m.Deserialize(entity.ForType,
                        doc.ContainsKey("$type") ?
                            new BsonDocument { ["_id"] = idRef, ["_type"] = bson["$type"] } :
                            new BsonDocument { ["_id"] = idRef }); // if has $id, deserialize object using only _id object
                }

            };
        }

        /// <summary>
        /// Register a property as a DbRefList - implement a custom Serialize/Deserialize actions to convert entity to $id, $ref only
        /// </summary>
        private static void RegisterDbRefList(BsonMapper mapper, MemberMapper member, ITypeNameBinder typeNameBinder, string collection)
        {
            // get entity from list item type
            var entity = mapper.GetEntityMapper(member.UnderlyingType);

            member.Serialize = (list, m) =>
            {
                // supports null values when "SerializeNullValues = true"
                if (list == null) return BsonValue.Null;
                entity.WaitForInitialization();
                
                var result = new BsonArray();
                var idField = entity.Id;

                foreach (var item in (IEnumerable)list)
                {
                    if (item == null) continue;

                    var id = idField.Getter(ite
Download .txt
gitextract_mf5hhct9/

├── .github/
│   └── ISSUE_TEMPLATE/
│       ├── bug_report.md
│       ├── feature_request.md
│       └── question.md
├── .gitignore
├── CODE_OF_CONDUCT.md
├── ConsoleApp1/
│   ├── ConsoleApp1.csproj
│   ├── Program.cs
│   └── Tools/
│       ├── Faker.Names.cs
│       └── Faker.cs
├── LICENSE
├── LiteDB/
│   ├── Client/
│   │   ├── Database/
│   │   │   ├── Collections/
│   │   │   │   ├── Aggregate.cs
│   │   │   │   ├── Delete.cs
│   │   │   │   ├── Find.cs
│   │   │   │   ├── Include.cs
│   │   │   │   ├── Index.cs
│   │   │   │   ├── Insert.cs
│   │   │   │   ├── Update.cs
│   │   │   │   └── Upsert.cs
│   │   │   ├── ILiteCollection.cs
│   │   │   ├── ILiteDatabase.cs
│   │   │   ├── ILiteQueryable.cs
│   │   │   ├── ILiteRepository.cs
│   │   │   ├── LiteCollection.cs
│   │   │   ├── LiteDatabase.cs
│   │   │   ├── LiteQueryable.cs
│   │   │   └── LiteRepository.cs
│   │   ├── Mapper/
│   │   │   ├── Attributes/
│   │   │   │   ├── BsonCtorAttribute.cs
│   │   │   │   ├── BsonFieldAttribute.cs
│   │   │   │   ├── BsonIdAttribute.cs
│   │   │   │   ├── BsonIgnoreAttribute.cs
│   │   │   │   └── BsonRefAttribute.cs
│   │   │   ├── BsonMapper.Deserialize.cs
│   │   │   ├── BsonMapper.GetEntityMapper.cs
│   │   │   ├── BsonMapper.Serialize.cs
│   │   │   ├── BsonMapper.cs
│   │   │   ├── EntityBuilder.cs
│   │   │   ├── EntityMapper.cs
│   │   │   ├── Linq/
│   │   │   │   ├── LinqExpressionVisitor.cs
│   │   │   │   ├── ParameterExpressionVisitor.cs
│   │   │   │   └── TypeResolver/
│   │   │   │       ├── BsonValueResolver.cs
│   │   │   │       ├── ConvertResolver.cs
│   │   │   │       ├── DateTimeResolver.cs
│   │   │   │       ├── EnumerableResolver.cs
│   │   │   │       ├── GuidResolver.cs
│   │   │   │       ├── ICollectionResolver.cs
│   │   │   │       ├── ITypeResolver.cs
│   │   │   │       ├── MathResolver.cs
│   │   │   │       ├── NullableResolver.cs
│   │   │   │       ├── NumberResolver.cs
│   │   │   │       ├── ObjectIdResolver.cs
│   │   │   │       ├── RegexResolver.cs
│   │   │   │       └── StringResolver.cs
│   │   │   ├── MemberMapper.cs
│   │   │   ├── Reflection/
│   │   │   │   ├── Reflection.Expression.cs
│   │   │   │   └── Reflection.cs
│   │   │   └── TypeNameBinder/
│   │   │       ├── DefaultTypeNameBinder.cs
│   │   │       └── ITypeNameBinder.cs
│   │   ├── Shared/
│   │   │   ├── SharedDataReader.cs
│   │   │   └── SharedEngine.cs
│   │   ├── SqlParser/
│   │   │   ├── Commands/
│   │   │   │   ├── Begin.cs
│   │   │   │   ├── Checkpoint.cs
│   │   │   │   ├── Commit.cs
│   │   │   │   ├── Create.cs
│   │   │   │   ├── Delete.cs
│   │   │   │   ├── Drop.cs
│   │   │   │   ├── Insert.cs
│   │   │   │   ├── ParseLists.cs
│   │   │   │   ├── Pragma.cs
│   │   │   │   ├── Rebuild.cs
│   │   │   │   ├── Rename.cs
│   │   │   │   ├── Rollback.cs
│   │   │   │   ├── Select.cs
│   │   │   │   └── Update.cs
│   │   │   └── SqlParser.cs
│   │   ├── Storage/
│   │   │   ├── ILiteStorage.cs
│   │   │   ├── LiteFileInfo.cs
│   │   │   ├── LiteFileStream.Read.cs
│   │   │   ├── LiteFileStream.Write.cs
│   │   │   ├── LiteFileStream.cs
│   │   │   └── LiteStorage.cs
│   │   └── Structures/
│   │       ├── ConnectionString.cs
│   │       ├── ConnectionType.cs
│   │       ├── Query.cs
│   │       └── QueryAny.cs
│   ├── Document/
│   │   ├── Bson/
│   │   │   └── BsonSerializer.cs
│   │   ├── BsonArray.cs
│   │   ├── BsonAutoId.cs
│   │   ├── BsonDocument.cs
│   │   ├── BsonType.cs
│   │   ├── BsonValue.cs
│   │   ├── DataReader/
│   │   │   ├── BsonDataReader.cs
│   │   │   ├── BsonDataReaderExtensions.cs
│   │   │   └── IBsonDataReader.cs
│   │   ├── Expression/
│   │   │   ├── BsonExpression.cs
│   │   │   ├── Methods/
│   │   │   │   ├── Aggregate.cs
│   │   │   │   ├── DataTypes.cs
│   │   │   │   ├── Date.cs
│   │   │   │   ├── Math.cs
│   │   │   │   ├── Misc.cs
│   │   │   │   └── String.cs
│   │   │   └── Parser/
│   │   │       ├── BsonExpressionAttributes.cs
│   │   │       ├── BsonExpressionFunctions.cs
│   │   │       ├── BsonExpressionOperators.cs
│   │   │       ├── BsonExpressionParser.cs
│   │   │       ├── BsonExpressionType.cs
│   │   │       ├── DocumentScope.cs
│   │   │       └── ExpressionContext.cs
│   │   ├── Json/
│   │   │   ├── JsonReader.cs
│   │   │   ├── JsonSerializer.cs
│   │   │   └── JsonWriter.cs
│   │   └── ObjectId.cs
│   ├── Engine/
│   │   ├── Disk/
│   │   │   ├── DiskReader.cs
│   │   │   ├── DiskService.cs
│   │   │   ├── MemoryCache.cs
│   │   │   ├── Serializer/
│   │   │   │   ├── BufferReader.cs
│   │   │   │   └── BufferWriter.cs
│   │   │   ├── StreamFactory/
│   │   │   │   ├── FileStreamFactory.cs
│   │   │   │   ├── IStreamFactory.cs
│   │   │   │   ├── StreamFactory.cs
│   │   │   │   └── StreamPool.cs
│   │   │   └── Streams/
│   │   │       ├── AesStream.cs
│   │   │       ├── ConcurrentStream.cs
│   │   │       └── TempStream.cs
│   │   ├── Engine/
│   │   │   ├── Collection.cs
│   │   │   ├── Delete.cs
│   │   │   ├── Index.cs
│   │   │   ├── Insert.cs
│   │   │   ├── Pragma.cs
│   │   │   ├── Query.cs
│   │   │   ├── Rebuild.cs
│   │   │   ├── Recovery.cs
│   │   │   ├── Sequence.cs
│   │   │   ├── SystemCollections.cs
│   │   │   ├── Transaction.cs
│   │   │   ├── Update.cs
│   │   │   ├── Upgrade.cs
│   │   │   └── Upsert.cs
│   │   ├── EnginePragmas.cs
│   │   ├── EngineSettings.cs
│   │   ├── EngineState.cs
│   │   ├── FileReader/
│   │   │   ├── FileReaderError.cs
│   │   │   ├── FileReaderV7.cs
│   │   │   ├── FileReaderV8.cs
│   │   │   ├── IFileReader.cs
│   │   │   ├── IndexInfo.cs
│   │   │   └── Legacy/
│   │   │       ├── AesEncryption.cs
│   │   │       ├── BsonReader.cs
│   │   │       └── ByteReader.cs
│   │   ├── ILiteEngine.cs
│   │   ├── LiteEngine.cs
│   │   ├── Pages/
│   │   │   ├── BasePage.cs
│   │   │   ├── CollectionPage.cs
│   │   │   ├── DataPage.cs
│   │   │   ├── HeaderPage.cs
│   │   │   └── IndexPage.cs
│   │   ├── Pragmas.cs
│   │   ├── Query/
│   │   │   ├── IndexQuery/
│   │   │   │   ├── Index.cs
│   │   │   │   ├── IndexAll.cs
│   │   │   │   ├── IndexEquals.cs
│   │   │   │   ├── IndexIn.cs
│   │   │   │   ├── IndexLike.cs
│   │   │   │   ├── IndexRange.cs
│   │   │   │   ├── IndexScan.cs
│   │   │   │   └── IndexVirtual.cs
│   │   │   ├── Lookup/
│   │   │   │   ├── DatafileLookup.cs
│   │   │   │   ├── IDocumentLookup.cs
│   │   │   │   └── IndexKeyLoader.cs
│   │   │   ├── Pipeline/
│   │   │   │   ├── BasePipe.cs
│   │   │   │   ├── DocumentCacheEnumerable.cs
│   │   │   │   ├── GroupByPipe.cs
│   │   │   │   └── QueryPipe.cs
│   │   │   ├── Query.cs
│   │   │   ├── QueryExecutor.cs
│   │   │   ├── QueryOptimization.cs
│   │   │   └── Structures/
│   │   │       ├── GroupBy.cs
│   │   │       ├── IndexCost.cs
│   │   │       ├── OrderBy.cs
│   │   │       ├── QueryPlan.cs
│   │   │       └── Select.cs
│   │   ├── Services/
│   │   │   ├── CollectionService.cs
│   │   │   ├── DataService.cs
│   │   │   ├── IndexService.cs
│   │   │   ├── LockService.cs
│   │   │   ├── RebuildService.cs
│   │   │   ├── SnapShot.cs
│   │   │   ├── TransactionMonitor.cs
│   │   │   ├── TransactionService.cs
│   │   │   └── WalIndexService.cs
│   │   ├── Sort/
│   │   │   ├── SortContainer.cs
│   │   │   ├── SortDisk.cs
│   │   │   └── SortService.cs
│   │   ├── Structures/
│   │   │   ├── CollectionIndex.cs
│   │   │   ├── CursorInfo.cs
│   │   │   ├── DataBlock.cs
│   │   │   ├── Done.cs
│   │   │   ├── FileOrigin.cs
│   │   │   ├── IndexNode.cs
│   │   │   ├── LockMode.cs
│   │   │   ├── PageAddress.cs
│   │   │   ├── PageBuffer.cs
│   │   │   ├── PagePosition.cs
│   │   │   ├── Pragma.cs
│   │   │   ├── RebuildOptions.cs
│   │   │   ├── TransactionPages.cs
│   │   │   └── TransactionState.cs
│   │   └── SystemCollections/
│   │       ├── Register.cs
│   │       ├── SysCols.cs
│   │       ├── SysDatabase.cs
│   │       ├── SysDump.cs
│   │       ├── SysFile.cs
│   │       ├── SysFileCsv.cs
│   │       ├── SysFileJson.cs
│   │       ├── SysIndexes.cs
│   │       ├── SysOpenCursors.cs
│   │       ├── SysPageList.cs
│   │       ├── SysQuery.cs
│   │       ├── SysSequences.cs
│   │       ├── SysSnapshots.cs
│   │       ├── SysTransactions.cs
│   │       └── SystemCollection.cs
│   ├── LiteDB.csproj
│   ├── LiteDB.snk
│   └── Utils/
│       ├── AsyncManualResetEvent.cs
│       ├── BufferSlice.cs
│       ├── Collation.cs
│       ├── Constants.cs
│       ├── Encoding.cs
│       ├── ExtendedLengthHelper.cs
│       ├── Extensions/
│       │   ├── BufferExtensions.cs
│       │   ├── BufferSliceExtensions.cs
│       │   ├── DateExtensions.cs
│       │   ├── DictionaryExtensions.cs
│       │   ├── EnumerableExtensions.cs
│       │   ├── ExpressionExtensions.cs
│       │   ├── HashSetExtensions.cs
│       │   ├── IOExceptionExtensions.cs
│       │   ├── LinqExtensions.cs
│       │   ├── StopWatchExtensions.cs
│       │   ├── StreamExtensions.cs
│       │   ├── StringExtensions.cs
│       │   └── TypeInfoExtensions.cs
│       ├── FileHelper.cs
│       ├── LCID.cs
│       ├── LiteException.cs
│       ├── MimeTypeConverter.cs
│       ├── Pool/
│       │   └── BucketHelper.cs
│       ├── Randomizer.cs
│       ├── Result.cs
│       ├── Tokenizer.cs
│       └── TryCatch.cs
├── LiteDB.Benchmarks/
│   ├── Benchmarks/
│   │   ├── BenchmarkBase.cs
│   │   ├── Constants.cs
│   │   ├── Deletion/
│   │   │   └── DeletionBenchmark.cs
│   │   ├── Generator/
│   │   │   └── FileMetaDataGenerationDatabaseBenchmark.cs
│   │   ├── Insertion/
│   │   │   ├── InsertionBasicBenchmark.cs
│   │   │   ├── InsertionIgnoreExpressionPropertyBenchmark.cs
│   │   │   └── InsertionInMemoryBenchmark.cs
│   │   └── Queries/
│   │       ├── QueryAllBenchmark.cs
│   │       ├── QueryCompoundIndexBenchmark.cs
│   │       ├── QueryCountBenchmark.cs
│   │       ├── QueryIgnoreExpressionPropertiesBenchmark.cs
│   │       ├── QueryMultipleParametersBenchmark.cs
│   │       ├── QuerySimpleIndexBenchmarks.cs
│   │       └── QueryWithDateTimeOffsetBenchmark.cs
│   ├── LiteDB.Benchmarks.csproj
│   ├── Models/
│   │   ├── FileMetaBase.cs
│   │   ├── FileMetaWithExclusion.cs
│   │   └── Generators/
│   │       └── FileMetaGenerator.cs
│   └── Program.cs
├── LiteDB.Shell/
│   ├── Commands/
│   │   ├── Close.cs
│   │   ├── Ed.cs
│   │   ├── Help.cs
│   │   ├── IShellCommand.cs
│   │   ├── Open.cs
│   │   ├── Pretty.cs
│   │   ├── Quit.cs
│   │   ├── Run.cs
│   │   ├── ShowCollections.cs
│   │   └── Version.cs
│   ├── LiteDB.Shell.csproj
│   ├── Program.cs
│   ├── Properties/
│   │   └── launchSettings.json
│   ├── Shell/
│   │   ├── Display.cs
│   │   ├── Env.cs
│   │   ├── InputCommand.cs
│   │   └── ShellProgram.cs
│   └── Utils/
│       ├── OptionSet.cs
│       ├── StringExtensions.cs
│       └── StringScanner.cs
├── LiteDB.Stress/
│   ├── Examples/
│   │   ├── test-01.xml
│   │   └── test-02.xml
│   ├── LiteDB.Stress.csproj
│   ├── Program.cs
│   ├── Properties/
│   │   └── launchSettings.json
│   └── Test/
│       ├── ITaskItem.cs
│       ├── InsertField.cs
│       ├── InsertTaskItem.cs
│       ├── SqlTaskItem.cs
│       ├── TestExecution.cs
│       ├── TestFile.cs
│       ├── ThreadInfo.cs
│       └── TimeSpanEx.cs
├── LiteDB.Tests/
│   ├── Database/
│   │   ├── AutoId_Tests.cs
│   │   ├── ConnectionString_Tests.cs
│   │   ├── Contains_Tests.cs
│   │   ├── Create_Database_Tests.cs
│   │   ├── Crud_Tests.cs
│   │   ├── Database_Pragmas_Tests.cs
│   │   ├── DbRef_Include_Tests.cs
│   │   ├── DbRef_Index_Tests.cs
│   │   ├── DbRef_Interface_Tests.cs
│   │   ├── DeleteMany_Tests.cs
│   │   ├── Delete_By_Name_Tests.cs
│   │   ├── DocumentUpgrade_Tests.cs
│   │   ├── Document_Size_Tests.cs
│   │   ├── FindAll_Tests.cs
│   │   ├── IndexMultiKeyLinq_Tests.cs
│   │   ├── IndexSortAndFilter_Tests.cs
│   │   ├── MultiKey_Mapper_Tests.cs
│   │   ├── NonIdPoco_Tests.cs
│   │   ├── PredicateBuilder_Tests.cs
│   │   ├── Query_Min_Max_Tests.cs
│   │   ├── Site_Tests.cs
│   │   ├── Snapshot_Upgrade_Tests.cs
│   │   ├── Storage_Tests.cs
│   │   ├── Upgrade_Tests.cs
│   │   └── Writing_While_Reading_Test.cs
│   ├── Document/
│   │   ├── Bson_Tests.cs
│   │   ├── Case_Insensitive_Tests.cs
│   │   ├── Decimal_Tests.cs
│   │   ├── Implicit_Tests.cs
│   │   ├── Json_Tests.cs
│   │   └── ObjectId_Tests.cs
│   ├── Engine/
│   │   ├── Collation_Tests.cs
│   │   ├── Create_Database_Tests.cs
│   │   ├── Crypto_Tests.cs
│   │   ├── DropCollection_Tests.cs
│   │   ├── Index_Tests.cs
│   │   ├── ParallelQuery_Tests.cs
│   │   ├── Rebuild_Crash_Tests.cs
│   │   ├── Rebuild_Tests.cs
│   │   ├── Recursion_Tests.cs
│   │   ├── Transactions_Tests.cs
│   │   ├── Update_Tests.cs
│   │   └── UserVersion_Tests.cs
│   ├── Expressions/
│   │   ├── Expressions_Exec_Tests.cs
│   │   └── Expressions_Tests.cs
│   ├── Internals/
│   │   ├── Aes_Tests.cs
│   │   ├── BasePage_Tests.cs
│   │   ├── BufferWriter_Tests.cs
│   │   ├── CacheAsync_Tests.cs
│   │   ├── Cache_Tests.cs
│   │   ├── Disk_Tests.cs
│   │   ├── Document_Tests.cs
│   │   ├── ExtendedLength_Tests.cs
│   │   ├── Extensions_Test.cs
│   │   ├── FreePage_Tests.cs
│   │   ├── FreeSlot_Tests.cs
│   │   ├── HeaderPage_Tests.cs
│   │   ├── Pragma_Tests.cs
│   │   └── Sort_Tests.cs
│   ├── Issues/
│   │   ├── Issue1585_Tests.cs
│   │   ├── Issue1651_Tests.cs
│   │   ├── Issue1695_Tests.cs
│   │   ├── Issue1701_Tests.cs
│   │   ├── Issue1838_Tests.cs
│   │   ├── Issue1860_Tests.cs
│   │   ├── Issue1865_Tests.cs
│   │   ├── Issue2112_Tests.cs
│   │   ├── Issue2127_Tests.cs
│   │   ├── Issue2129_Tests.cs
│   │   ├── Issue2265_Tests.cs
│   │   ├── Issue2298_Tests.cs
│   │   ├── Issue2417_Tests.cs
│   │   ├── Issue2458_Tests.cs
│   │   ├── Issue2471_Test.cs
│   │   ├── Issue2487_Tests.cs
│   │   ├── Issue2494_Tests.cs
│   │   ├── Issue2506_Tests.cs
│   │   ├── Issue2534_Tests.cs
│   │   ├── Issue2570_Tests.cs
│   │   └── Pull2468_Tests.cs
│   ├── LiteDB.Tests.csproj
│   ├── Mapper/
│   │   ├── CustomInterface_Tests.cs
│   │   ├── CustomMappingCtor_Tests.cs
│   │   ├── CustomMapping_Tests.cs
│   │   ├── DbRefAbstract_Tests.cs
│   │   ├── Dictionary_Tests.cs
│   │   ├── Enum_Tests.cs
│   │   ├── GenericMap_Tests.cs
│   │   ├── LinqBsonExpression_Tests.cs
│   │   ├── LinqEval_Tests.cs
│   │   ├── Mapper_Tests.cs
│   │   ├── Records_Tests.cs
│   │   └── StructField_Tests.cs
│   ├── Query/
│   │   ├── Aggregate_Tests.cs
│   │   ├── Data/
│   │   │   ├── PersonGroupByData.cs
│   │   │   └── PersonQueryData.cs
│   │   ├── GroupBy_Tests.cs
│   │   ├── Include_Tests.cs
│   │   ├── OrderBy_Tests.cs
│   │   ├── QueryApi_Tests.cs
│   │   ├── Select_Tests.cs
│   │   └── Where_Tests.cs
│   ├── Resources/
│   │   ├── person.json
│   │   └── zip.json
│   ├── Utils/
│   │   ├── AssertEx.cs
│   │   ├── DataGen.cs
│   │   ├── Faker.Names.cs
│   │   ├── Faker.cs
│   │   ├── LiteEngineExtensions.cs
│   │   ├── Models/
│   │   │   ├── Person.cs
│   │   │   └── Zip.cs
│   │   └── TempFile.cs
│   └── xunit.runner.json
├── LiteDB.sln
├── README.md
└── appveyor.yml
Download .txt
Showing preview only (229K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (2642 symbols across 390 files)

FILE: ConsoleApp1/Tools/Faker.Names.cs
  class Faker (line 1) | internal static partial class Faker

FILE: ConsoleApp1/Tools/Faker.cs
  class Faker (line 3) | internal static partial class Faker
    method Fullname (line 7) | public static string Fullname()
    method Age (line 14) | public static int Age()
    method Birthday (line 19) | public static DateTime Birthday()
    method Lorem (line 30) | public static string Lorem(int size, int end = -1)
    method Next (line 36) | public static int Next(int start, int end)
    method NextDouble (line 41) | public static double NextDouble(double start, double end)
    method NextLong (line 47) | public static long NextLong(this Random random, long min, long max)
    method NextBool (line 70) | public static bool NextBool(this Random random)
    method Departments (line 75) | public static string Departments() => _departments[_random.Next(0, _de...
    method Created (line 77) | internal static BsonValue Created()
    method Language (line 88) | public static string Language() => _departments[_random.Next(0, _depar...
    method Department (line 90) | public static string Department() => _departments[_random.Next(0, _dep...
    method Country (line 92) | public static string Country() => _countries[_random.Next(0, _countrie...
    method Job (line 94) | public static string Job() => _jobTitles[_random.Next(0, _jobTitles.Le...
    method SkuNumber (line 96) | internal static string SkuNumber() =>

FILE: LiteDB.Benchmarks/Benchmarks/BenchmarkBase.cs
  class BenchmarkBase (line 5) | public abstract class BenchmarkBase
    method ConnectionString (line 23) | public ConnectionString ConnectionString() => new ConnectionString(Dat...

FILE: LiteDB.Benchmarks/Benchmarks/Constants.cs
  class Constants (line 3) | internal static class Constants
    class Categories (line 7) | internal static class Categories

FILE: LiteDB.Benchmarks/Benchmarks/Deletion/DeletionBenchmark.cs
  class DeletionBenchmark (line 10) | [BenchmarkCategory(Constants.Categories.DELETION)]
    method GlobalSetup (line 16) | [GlobalSetup]
    method IterationSetup (line 29) | [IterationSetup]
    method DeleteAllExpression (line 36) | [Benchmark(Baseline = true)]
    method DeleteAllBsonExpression (line 44) | [Benchmark]
    method DropCollectionAndRecreate (line 52) | [Benchmark]
    method GlobalCleanup (line 71) | [GlobalCleanup]

FILE: LiteDB.Benchmarks/Benchmarks/Generator/FileMetaDataGenerationDatabaseBenchmark.cs
  class FileMetaDataGenerationDatabaseBenchmark (line 12) | [BenchmarkCategory(Constants.Categories.DATA_GEN)]
    method DataGeneration (line 19) | [Benchmark]
    method DataWithExclusionsGeneration (line 25) | [Benchmark]

FILE: LiteDB.Benchmarks/Benchmarks/Insertion/InsertionBasicBenchmark.cs
  class InsertionBasicBenchmark (line 9) | [BenchmarkCategory(Constants.Categories.INSERTION)]
    method GlobalSetup (line 15) | [GlobalSetup]
    method Insertion (line 26) | [Benchmark(Baseline = true)]
    method InsertionWithLoop (line 34) | [Benchmark]
    method Upsertion (line 46) | [Benchmark]
    method UpsertionWithLoop (line 54) | [Benchmark]
    method IterationCleanup (line 66) | [IterationCleanup]
    method GlobalCleanup (line 77) | [GlobalCleanup]

FILE: LiteDB.Benchmarks/Benchmarks/Insertion/InsertionIgnoreExpressionPropertyBenchmark.cs
  class InsertionIgnoreExpressionPropertyBenchmark (line 10) | [BenchmarkCategory(Constants.Categories.INSERTION)]
    method GlobalBsonIgnoreSetup (line 19) | [GlobalSetup(Target = nameof(Insertion))]
    method GlobalIgnorePropertySetup (line 31) | [GlobalSetup(Target = nameof(InsertionWithBsonIgnore))]
    method Insertion (line 43) | [Benchmark(Baseline = true)]
    method InsertionWithBsonIgnore (line 51) | [Benchmark]
    method IterationCleanup (line 59) | [IterationCleanup]
    method GlobalCleanup (line 81) | [GlobalCleanup]

FILE: LiteDB.Benchmarks/Benchmarks/Insertion/InsertionInMemoryBenchmark.cs
  class InsertionInMemoryBenchmark (line 10) | [BenchmarkCategory(Constants.Categories.INSERTION)]
    method GlobalSetupNormal (line 20) | [GlobalSetup(Target = nameof(InsertionNormal))]
    method GlobalSetupInMemory (line 31) | [GlobalSetup(Target = nameof(InsertionInMemory))]
    method InsertionNormal (line 40) | [Benchmark(Baseline = true)]
    method InsertionInMemory (line 48) | [Benchmark]
    method CleanUpNormal (line 56) | [IterationCleanup(Target = nameof(InsertionNormal))]
    method CleanUpInMemory (line 76) | [IterationCleanup(Target = nameof(InsertionInMemory))]
    method GlobalCleanupNormal (line 96) | [GlobalCleanup(Target = nameof(InsertionNormal))]
    method GlobalCleanupInMemory (line 108) | [GlobalCleanup(Target = nameof(InsertionInMemory))]

FILE: LiteDB.Benchmarks/Benchmarks/Queries/QueryAllBenchmark.cs
  class QueryAllBenchmark (line 10) | [BenchmarkCategory(Constants.Categories.QUERIES)]
    method GlobalSetup (line 15) | [GlobalSetup]
    method FindAll (line 27) | [Benchmark(Baseline = true)]
    method FindAllWithExpression (line 33) | [Benchmark]
    method FindAllWithQuery (line 39) | [Benchmark]
    method GlobalCleanup (line 45) | [GlobalCleanup]

FILE: LiteDB.Benchmarks/Benchmarks/Queries/QueryCompoundIndexBenchmark.cs
  class QueryCompoundIndexBenchmark (line 10) | [BenchmarkCategory(Constants.Categories.QUERIES)]
    method GlobalSetupSimpleIndexBaseline (line 17) | [GlobalSetup(Target = nameof(Query_SimpleIndex_Baseline))]
    method GlobalSetupCompoundIndexVariant (line 32) | [GlobalSetup(Target = nameof(Query_CompoundIndexVariant))]
    method Query_SimpleIndex_Baseline (line 44) | [Benchmark(Baseline = true)]
    method Query_CompoundIndexVariant (line 53) | [Benchmark]
    method GlobalCleanup (line 59) | [GlobalCleanup]

FILE: LiteDB.Benchmarks/Benchmarks/Queries/QueryCountBenchmark.cs
  class QueryCountBenchmark (line 9) | [BenchmarkCategory(Constants.Categories.QUERIES)]
    method GlobalSetup (line 14) | [GlobalSetup]
    method CountWithLinq (line 28) | [Benchmark(Baseline = true)]
    method CountWithExpression (line 34) | [Benchmark]
    method CountWithQuery (line 40) | [Benchmark]
    method GlobalCleanup (line 46) | [GlobalCleanup]

FILE: LiteDB.Benchmarks/Benchmarks/Queries/QueryIgnoreExpressionPropertiesBenchmark.cs
  class QueryIgnoreExpressionPropertiesBenchmark (line 10) | [BenchmarkCategory(Constants.Categories.QUERIES)]
    method GlobalSetup (line 16) | [GlobalSetup(Target = nameof(DeserializeBaseline))]
    method GlobalIndexSetup (line 30) | [GlobalSetup(Target = nameof(DeserializeWithIgnore))]
    method DeserializeBaseline (line 44) | [Benchmark(Baseline = true)]
    method DeserializeWithIgnore (line 50) | [Benchmark]
    method GlobalCleanup (line 56) | [GlobalCleanup]

FILE: LiteDB.Benchmarks/Benchmarks/Queries/QueryMultipleParametersBenchmark.cs
  class QueryMultipleParametersBenchmark (line 10) | [BenchmarkCategory(Constants.Categories.QUERIES)]
    method GlobalSetup (line 15) | [GlobalSetup]
    method Expression_Normal_Baseline (line 30) | [Benchmark(Baseline = true)]
    method Query_Normal (line 36) | [Benchmark]
    method Expression_ParametersSwitched (line 45) | [Benchmark]
    method Query_ParametersSwitched (line 51) | [Benchmark]
    method GlobalCleanup (line 60) | [GlobalCleanup]

FILE: LiteDB.Benchmarks/Benchmarks/Queries/QuerySimpleIndexBenchmarks.cs
  class QuerySimpleIndexBenchmarks (line 10) | [BenchmarkCategory(Constants.Categories.QUERIES)]
    method GlobalSetup (line 15) | [GlobalSetup(Targets = new[] {nameof(FindWithExpression), nameof(FindW...
    method GlobalIndexSetup (line 26) | [GlobalSetup(Targets = new[] {nameof(FindWithIndexExpression), nameof(...
    method FindWithExpression (line 40) | [Benchmark(Baseline = true)]
    method FindWithQuery (line 46) | [Benchmark]
    method FindWithIndexExpression (line 52) | [Benchmark]
    method FindWithIndexQuery (line 58) | [Benchmark]
    method GlobalCleanup (line 64) | [GlobalCleanup]

FILE: LiteDB.Benchmarks/Benchmarks/Queries/QueryWithDateTimeOffsetBenchmark.cs
  class QueryWithDateTimeOffsetBenchmark (line 11) | [BenchmarkCategory(Constants.Categories.QUERIES)]
    method GlobalSetup (line 19) | [GlobalSetup]
    method Expression_Normal_Baseline (line 38) | [Benchmark(Baseline = true)]
    method Query_Normal (line 45) | [Benchmark]
    method Expression_ParametersSwitched (line 56) | [Benchmark]
    method Query_ParametersSwitched (line 63) | [Benchmark]
    method GlobalCleanup (line 74) | [GlobalCleanup]

FILE: LiteDB.Benchmarks/Models/FileMetaBase.cs
  class FileMetaBase (line 5) | public class FileMetaBase

FILE: LiteDB.Benchmarks/Models/FileMetaWithExclusion.cs
  class FileMetaWithExclusion (line 3) | public class FileMetaWithExclusion : FileMetaBase
    method FileMetaWithExclusion (line 5) | public FileMetaWithExclusion()
    method FileMetaWithExclusion (line 9) | public FileMetaWithExclusion(FileMetaBase fileMetaBase)

FILE: LiteDB.Benchmarks/Models/Generators/FileMetaGenerator.cs
  class FileMetaGenerator (line 6) | public static class FileMetaGenerator<T> where T : FileMetaBase, new()
    method Generate (line 10) | private static T Generate()
    method GenerateList (line 33) | public static List<T> GenerateList(int amountToGenerate)

FILE: LiteDB.Benchmarks/Program.cs
  class Program (line 11) | class Program
    method Main (line 13) | static void Main(string[] args)

FILE: LiteDB.Shell/Commands/Close.cs
  class Close (line 8) | [Help(
    method IsCommand (line 15) | public bool IsCommand(StringScanner s)
    method Execute (line 20) | public void Execute(StringScanner s, Env env)

FILE: LiteDB.Shell/Commands/Ed.cs
  class Ed (line 7) | [Help(
    method IsCommand (line 14) | public bool IsCommand(StringScanner s)
    method Execute (line 19) | public void Execute(StringScanner s, Env env)

FILE: LiteDB.Shell/Commands/Help.cs
  class HelpAttribute (line 8) | internal class HelpAttribute : Attribute
  class Help (line 16) | internal class Help : IShellCommand
    method IsCommand (line 18) | public bool IsCommand(StringScanner s)
    method Execute (line 23) | public void Execute(StringScanner s, Env env)

FILE: LiteDB.Shell/Commands/IShellCommand.cs
  type IShellCommand (line 7) | internal interface IShellCommand
    method IsCommand (line 9) | bool IsCommand(StringScanner s);
    method Execute (line 11) | void Execute(StringScanner s, Env env);

FILE: LiteDB.Shell/Commands/Open.cs
  class Open (line 8) | [Help(
    method IsCommand (line 19) | public bool IsCommand(StringScanner s)
    method Execute (line 24) | public void Execute(StringScanner s, Env env)

FILE: LiteDB.Shell/Commands/Pretty.cs
  class Pretty (line 5) | [Help(
    method IsCommand (line 15) | public bool IsCommand(StringScanner s)
    method Execute (line 20) | public void Execute(StringScanner s, Env env)

FILE: LiteDB.Shell/Commands/Quit.cs
  class Quit (line 5) | [Help(
    method IsCommand (line 12) | public bool IsCommand(StringScanner s)
    method Execute (line 17) | public void Execute(StringScanner s, Env env)

FILE: LiteDB.Shell/Commands/Run.cs
  class Run (line 6) | [Help(
    method IsCommand (line 16) | public bool IsCommand(StringScanner s)
    method Execute (line 21) | public void Execute(StringScanner s, Env env)

FILE: LiteDB.Shell/Commands/ShowCollections.cs
  class ShowCollections (line 6) | [Help(
    method IsCommand (line 13) | public bool IsCommand(StringScanner s)
    method Execute (line 18) | public void Execute(StringScanner s, Env env)

FILE: LiteDB.Shell/Commands/Version.cs
  class Version (line 5) | [Help(
    method IsCommand (line 12) | public bool IsCommand(StringScanner s)
    method Execute (line 17) | public void Execute(StringScanner s, Env env)

FILE: LiteDB.Shell/Program.cs
  class Program (line 3) | internal class Program
    method Main (line 14) | private static void Main(string[] args)

FILE: LiteDB.Shell/Shell/Display.cs
  class Display (line 8) | internal class Display
    method Display (line 12) | public Display()
    method WriteWelcome (line 17) | public void WriteWelcome()
    method WritePrompt (line 25) | public void WritePrompt(string text)
    method WriteInfo (line 30) | public void WriteInfo(string text)
    method WriteError (line 35) | public void WriteError(Exception ex)
    method WriteResult (line 47) | public void WriteResult(IBsonDataReader result, Env env)
    method Write (line 74) | public void Write(string text)
    method WriteLine (line 79) | public void WriteLine(string text)
    method WriteLine (line 84) | public void WriteLine(ConsoleColor color, string text)
    method Write (line 89) | public void Write(ConsoleColor color, string text)

FILE: LiteDB.Shell/Shell/Env.cs
  class Env (line 8) | internal class Env

FILE: LiteDB.Shell/Shell/InputCommand.cs
  class InputCommand (line 6) | public class InputCommand
    method InputCommand (line 13) | public InputCommand()
    method ReadCommand (line 21) | public string ReadCommand()
    method ReadLine (line 60) | private string ReadLine()

FILE: LiteDB.Shell/Shell/ShellProgram.cs
  class ShellProgram (line 10) | internal class ShellProgram
    method Start (line 12) | public static void Start(InputCommand input, Display display)
    method ShellProgram (line 57) | static ShellProgram()
    method GetCommand (line 70) | public static Action<Env> GetCommand(string cmd)

FILE: LiteDB.Shell/Utils/OptionSet.cs
  class OptionSet (line 10) | internal class OptionSet
    method Register (line 17) | public void Register(Action<string> action)
    method Register (line 26) | public void Register<T>(string key, Action<T> action)
    method Register (line 35) | public void Register(string key, Action action)
    method Parse (line 44) | public void Parse(string[] args)
  class OptionsParam (line 106) | internal class OptionsParam

FILE: LiteDB.Shell/Utils/StringExtensions.cs
  class StringExtensions (line 5) | internal static class StringExtensions
    method ThrowIfEmpty (line 7) | public static string ThrowIfEmpty(this string str, string message)
    method TrimToNull (line 17) | public static string TrimToNull(this string str)
    method MaxLength (line 24) | public static string MaxLength(this string str, int len)

FILE: LiteDB.Shell/Utils/StringScanner.cs
  class StringScanner (line 10) | public class StringScanner
    method StringScanner (line 18) | public StringScanner(string source)
    method ToString (line 24) | public override string ToString()
    method Reset (line 32) | public void Reset()
    method Seek (line 40) | public void Seek(int length)
    method Scan (line 56) | public string Scan(string pattern)
    method Scan (line 64) | public string Scan(Regex regex)
    method Scan (line 82) | public string Scan(string pattern, int group)
    method Scan (line 87) | public string Scan(Regex regex, int group)
    method Match (line 105) | public bool Match(string pattern)
    method Match (line 113) | public bool Match(Regex regex)
    method ThrowIfNotFinish (line 122) | public void ThrowIfNotFinish()

FILE: LiteDB.Stress/Program.cs
  class Program (line 13) | public class Program
    method Main (line 15) | static void Main(string[] args)

FILE: LiteDB.Stress/Test/ITaskItem.cs
  type ITestItem (line 8) | public interface ITestItem
    method Execute (line 13) | BsonValue Execute(LiteDatabase db);

FILE: LiteDB.Stress/Test/InsertField.cs
  type InsertFieldType (line 9) | public enum InsertFieldType { Name, Int, Guid, Bool, Now, Binary, Date, ...
  class InsertField (line 11) | public class InsertField
    method InsertField (line 184) | public InsertField(XmlElement el)
    method GetValue (line 218) | public BsonValue GetValue()

FILE: LiteDB.Stress/Test/InsertTaskItem.cs
  class InsertTaskItem (line 9) | public class InsertTaskItem : ITestItem
    method InsertTaskItem (line 24) | public InsertTaskItem(XmlElement el)
    method Execute (line 42) | public BsonValue Execute(LiteDatabase db)

FILE: LiteDB.Stress/Test/SqlTaskItem.cs
  class SqlTaskItem (line 9) | public class SqlTaskItem : ITestItem
    method SqlTaskItem (line 16) | public SqlTaskItem(XmlElement el)
    method Execute (line 24) | public BsonValue Execute(LiteDatabase db)

FILE: LiteDB.Stress/Test/TestExecution.cs
  class TestExecution (line 13) | public class TestExecution
    method TestExecution (line 24) | public TestExecution(string filename, TimeSpan duration)
    method Execute (line 31) | public void Execute()
    method DeleteFiles (line 55) | private void DeleteFiles()
    method CreateThreads (line 68) | private void CreateThreads()
    method ReportThread (line 117) | private void ReportThread()
    method ReportPrint (line 148) | private void ReportPrint(StringBuilder output)
    method ReportSummary (line 185) | private void ReportSummary(StringBuilder output)
    method StopRunning (line 206) | private void StopRunning()

FILE: LiteDB.Stress/Test/TestFile.cs
  class TestFile (line 9) | public class TestFile
    method TestFile (line 18) | public TestFile(string filename)

FILE: LiteDB.Stress/Test/ThreadInfo.cs
  class ThreadInfo (line 10) | public class ThreadInfo

FILE: LiteDB.Stress/Test/TimeSpanEx.cs
  class TimeSpanEx (line 10) | public class TimeSpanEx
    method Parse (line 12) | public static TimeSpan Parse(string duration)

FILE: LiteDB.Tests/Database/AutoId_Tests.cs
  class AutoId_Tests (line 10) | public class AutoId_Tests
    class EntityInt (line 14) | public class EntityInt
    class EntityLong (line 20) | public class EntityLong
    class EntityGuid (line 26) | public class EntityGuid
    class EntityOid (line 32) | public class EntityOid
    class EntityString (line 38) | public class EntityString
    method AutoId_Strong_Typed (line 46) | [Fact]
    method AutoId_BsonDocument (line 188) | [Fact]
    method AutoId_No_Duplicate_After_Delete (line 209) | [Fact]
    method AutoId_Zero_Int (line 268) | [Fact]
    method AutoId_property (line 279) | [Fact]

FILE: LiteDB.Tests/Database/ConnectionString_Tests.cs
  class ConnectionString_Tests (line 10) | public class ConnectionString_Tests
    method ConnectionString_Parser (line 12) | [Fact]
    method ConnectionString_Very_Long (line 41) | [Fact]

FILE: LiteDB.Tests/Database/Contains_Tests.cs
  class Contains_Tests (line 11) | public class Contains_Tests
    method ArrayContains_ShouldHaveCount1 (line 13) | [Fact]
    method EnumerableAssignedArrayContains_ShouldHaveCount1 (line 32) | [Fact]
    method EnumerableAssignedListContains_ShouldHaveCount1 (line 51) | [Fact]
    method ListContains_ShouldHaveCount1 (line 70) | [Fact]
    class ItemWithEnumerable (line 89) | public class ItemWithEnumerable

FILE: LiteDB.Tests/Database/Create_Database_Tests.cs
  class Create_Database_Tests (line 10) | public class Create_Database_Tests
    method Create_Database_With_Initial_Size (line 12) | [Fact]

FILE: LiteDB.Tests/Database/Crud_Tests.cs
  class Crud_Tests (line 9) | public class Crud_Tests
    class User (line 13) | public class User
    method Insert_With_AutoId (line 21) | [Fact]
    method Delete_Many (line 56) | [Fact]

FILE: LiteDB.Tests/Database/Database_Pragmas_Tests.cs
  class Database_Pragmas_Tests (line 11) | public class Database_Pragmas_Tests
    method Database_Pragmas_Get_Set (line 13) | [Fact]

FILE: LiteDB.Tests/Database/DbRef_Include_Tests.cs
  class DbRef_Include_Tests (line 10) | public class DbRef_Include_Tests
    class Order (line 14) | public class Order
    class Customer (line 27) | public class Customer
    class Address (line 34) | public class Address
    class Product (line 40) | public class Product
    method DbRef_Include (line 62) | [Fact]

FILE: LiteDB.Tests/Database/DbRef_Index_Tests.cs
  class DbRef_Index_Tests (line 7) | public class DbRef_Index_Tests
    class Customer (line 11) | public class Customer
    class Order (line 17) | public class Order
    method DbRef_Index (line 25) | [Fact]

FILE: LiteDB.Tests/Database/DeleteMany_Tests.cs
  class DeleteMany_Tests (line 10) | public class DeleteMany_Tests
    method DeleteMany_With_Arguments (line 12) | [Fact]

FILE: LiteDB.Tests/Database/Delete_By_Name_Tests.cs
  class Delete_By_Name_Tests (line 9) | public class Delete_By_Name_Tests
    class Person (line 13) | public class Person
    method Delete_By_Name (line 21) | [Fact]

FILE: LiteDB.Tests/Database/DocumentUpgrade_Tests.cs
  class DocumentUpgrade_Tests (line 11) | public class DocumentUpgrade_Tests
    method DocumentUpgrade_Test (line 13) | [Fact]
    method DocumentUpgrade_BsonMapper_Test (line 75) | [Fact]

FILE: LiteDB.Tests/Database/Document_Size_Tests.cs
  class Document_Size_Tests (line 11) | public class Document_Size_Tests
    method Very_Large_Single_Document_Support_With_Partial_Load_Memory_Usage (line 15) | [Fact]

FILE: LiteDB.Tests/Database/FindAll_Tests.cs
  class FindAll_Tests (line 9) | public class FindAll_Tests
    class Person (line 13) | public class Person
    method FindAll (line 21) | [Fact]

FILE: LiteDB.Tests/Database/IndexMultiKeyLinq_Tests.cs
  class IndexMultiKeyIndex (line 10) | public class IndexMultiKeyIndex
    class User (line 14) | public class User
    class Address (line 22) | public class Address
    method Index_Multikey_Using_Linq (line 29) | [Fact]

FILE: LiteDB.Tests/Database/IndexSortAndFilter_Tests.cs
  class IndexSortAndFilterTest (line 9) | public class IndexSortAndFilterTest : IDisposable
    class Item (line 13) | public class Item
    method IndexSortAndFilterTest (line 25) | public IndexSortAndFilterTest()
    method Dispose (line 38) | public void Dispose()
    method FilterAndSortAscending (line 44) | [Fact]
    method FilterAndSortDescending (line 56) | [Fact]
    method FilterAndSortAscendingWithoutIndex (line 68) | [Fact]

FILE: LiteDB.Tests/Database/MultiKey_Mapper_Tests.cs
  class MultiKey_Mapper_Tests (line 9) | public class MultiKey_Mapper_Tests
    class MultiKeyDoc (line 13) | public class MultiKeyDoc
    class Customer (line 20) | public class Customer
    method MultiKey_Mapper (line 28) | [Fact]

FILE: LiteDB.Tests/Database/NonIdPoco_Tests.cs
  class MissingIdDocTest (line 9) | public class MissingIdDocTest
    class MissingIdDoc (line 13) | public class MissingIdDoc
    method MissingIdDoc_Test (line 21) | [Fact]

FILE: LiteDB.Tests/Database/PredicateBuilder_Tests.cs
  class PredicateBuilder_Tests (line 11) | public class PredicateBuilder_Tests
    class User (line 15) | public class User
    method Usage_PredicateBuilder (line 25) | [Fact(Skip = "Need review")]
  class PredicateBuilder (line 51) | public static class PredicateBuilder
    method True (line 53) | public static Expression<Func<T, bool>> True<T>() { return f => true; }
    method False (line 54) | public static Expression<Func<T, bool>> False<T>() { return f => false; }
    method Or (line 56) | public static Expression<Func<T, bool>> Or<T>(this Expression<Func<T, ...
    method And (line 64) | public static Expression<Func<T, bool>> And<T>(this Expression<Func<T,...

FILE: LiteDB.Tests/Database/Query_Min_Max_Tests.cs
  class Query_Min_Max_Tests (line 9) | public class Query_Min_Max_Tests
    class EntityMinMax (line 13) | public class EntityMinMax
    method Query_Min_Max (line 24) | [Fact]

FILE: LiteDB.Tests/Database/Site_Tests.cs
  class Site_Tests (line 10) | public class Site_Tests
    method Home_Example (line 12) | [Fact]
    class Customer (line 67) | public class Customer

FILE: LiteDB.Tests/Database/Snapshot_Upgrade_Tests.cs
  class Snapshot_Upgrade_Tests (line 9) | public class Snapshot_Upgrade_Tests
    method Transaction_Update_Upsert (line 11) | [Fact]

FILE: LiteDB.Tests/Database/Storage_Tests.cs
  class Storage_Tests (line 10) | public class Storage_Tests
    method Storage_Tests (line 18) | public Storage_Tests()
    method Storage_Upload_Download (line 30) | [Fact]
    method HashFile (line 70) | private string HashFile(Stream stream)
    method HashFile (line 77) | private string HashFile(byte[] input)

FILE: LiteDB.Tests/Database/Upgrade_Tests.cs
  class Upgrade_Tests (line 11) | public class Upgrade_Tests
    method Migrage_From_V4 (line 13) | [Fact]
    method Migrage_From_V4_No_FileExtension (line 37) | [Fact]

FILE: LiteDB.Tests/Database/Writing_While_Reading_Test.cs
  class Writing_While_Reading_Test (line 6) | public class Writing_While_Reading_Test
    method Test (line 8) | [Fact]
    class MyClass (line 44) | class MyClass

FILE: LiteDB.Tests/Document/Bson_Tests.cs
  class Bson_Tests (line 8) | public class Bson_Tests
    method CreateDoc (line 10) | private BsonDocument CreateDoc()
    method Convert_To_Json_Bson (line 44) | [Fact]
    method Bson_Using_UTC_Local_Dates (line 70) | [Fact]
    method Bson_Partial_Deserialize (line 90) | [Fact]
    method BsonMapper_AnonymousType (line 119) | [Fact]

FILE: LiteDB.Tests/Document/Case_Insensitive_Tests.cs
  class Case_Insensitive_Tests (line 7) | public class Case_Insensitive_Tests
    method Get_Document_Fields_Case_Insensitive (line 9) | [Fact]

FILE: LiteDB.Tests/Document/Decimal_Tests.cs
  class Decimal_Tests (line 6) | public class Decimal_Tests
    method BsonValue_New_Decimal_Type (line 8) | [Fact]

FILE: LiteDB.Tests/Document/Implicit_Tests.cs
  class Implicit_Tests (line 7) | public class Implicit_Tests
    method BsonValue_Implicit_Convert (line 9) | [Fact]
    method BsonDocument_Inner (line 29) | [Fact]

FILE: LiteDB.Tests/Document/Json_Tests.cs
  class Json_Tests (line 8) | public class Json_Tests
    method CreateDoc (line 10) | private BsonDocument CreateDoc()
    method Json_To_Document (line 37) | [Fact]
    method JsonWriterTest (line 54) | [Fact]
    method Json_Number_Deserialize_Test (line 61) | [Fact]
    method Json_DoubleNaN_Tests (line 79) | [Fact]

FILE: LiteDB.Tests/Document/ObjectId_Tests.cs
  class ObjectId_Tests (line 6) | public class ObjectId_Tests
    method ObjectId_BsonValue (line 8) | [Fact]
    method ObjectId_Equals_Null_Does_Not_Throw (line 35) | [Fact]

FILE: LiteDB.Tests/Engine/Collation_Tests.cs
  class Collation_Tests (line 11) | public class Collation_Tests
    method Culture_Ordinal_Sort (line 13) | [Fact]
    method Create_Database_Using_Current_Culture (line 73) | [Fact(Skip = "Must fix in CI - works only in Windows local machine")]
    method Change_Thread_Culture (line 90) | [Fact]
    method Collaction_New_Database (line 122) | [Fact]

FILE: LiteDB.Tests/Engine/Crypto_Tests.cs
  class Crypto_Tests (line 10) | public class Crypto_Tests
    method Plain_Datafile (line 12) | [Fact]
    method Crypto_Datafile (line 36) | [Fact]
    method CreateDatabase (line 65) | private void CreateDatabase(LiteEngine engine)

FILE: LiteDB.Tests/Engine/DropCollection_Tests.cs
  class DropCollection_Tests (line 7) | public class DropCollection_Tests
    method DropCollection (line 9) | [Fact]
    method InsertDropCollection (line 29) | [Fact]

FILE: LiteDB.Tests/Engine/Index_Tests.cs
  class Index_Tests (line 8) | public class Index_Tests
    method Index_With_No_Name (line 10) | [Fact]
    method Index_Order (line 31) | [Fact]
    method Index_With_Like (line 68) | [Fact]
    method EnsureIndex_Invalid_Arguments (line 118) | [Fact]
    method MultiKey_Index_Test (line 143) | [Fact]

FILE: LiteDB.Tests/Engine/ParallelQuery_Tests.cs
  class ParallelQuery_Tests (line 11) | public class ParallelQuery_Tests
    method Query_Parallel (line 13) | [Fact(Skip = "Must fix parallel query fetch")]

FILE: LiteDB.Tests/Engine/Rebuild_Crash_Tests.cs
  class Rebuild_Crash_Tests (line 12) | public class Rebuild_Crash_Tests
    method Rebuild_Crash_IO_Write_Error (line 15) | [Fact]

FILE: LiteDB.Tests/Engine/Rebuild_Tests.cs
  class Rebuild_Tests (line 11) | public class Rebuild_Tests
    method Rebuild_After_DropCollection (line 13) | [Fact]
    method Rebuild_Large_Files (line 37) | [Fact]
    method Rebuild_Change_Culture_Error (line 94) | [Fact (Skip = "Not supported yet")]

FILE: LiteDB.Tests/Engine/Recursion_Tests.cs
  class Recursion_Tests (line 6) | public class Recursion_Tests
    method UpdateInFindAll (line 8) | [Fact]
    method InsertDeleteInFindAll (line 19) | [Fact]
    method QueryInFindAll (line 31) | [Fact]
    method Test (line 43) | private void Test(Action<ILiteCollection<BsonDocument>> action)

FILE: LiteDB.Tests/Engine/Transactions_Tests.cs
  class Transactions_Tests (line 13) | public class Transactions_Tests
    method Transaction_Write_Lock_Timeout (line 15) | [Fact]
    method Transaction_Avoid_Dirty_Read (line 72) | [Fact]
    method Transaction_Read_Version (line 132) | [Fact]
    method Test_Transaction_States (line 189) | [Fact]
    class BlockingStream (line 228) | private class BlockingStream : MemoryStream
      method Write (line 234) | public override void Write(byte[] buffer, int offset, int count)
    method Test_Transaction_ReleaseWhenFailToStart (line 246) | [Fact]

FILE: LiteDB.Tests/Engine/Update_Tests.cs
  class Update_Tests (line 7) | public class Update_Tests
    method Update_IndexNodes (line 9) | [Fact]
    method Update_ExtendBlocks (line 32) | [Fact]
    method Update_Empty_Collection (line 87) | [Fact]

FILE: LiteDB.Tests/Engine/UserVersion_Tests.cs
  class UserVersion_Tests (line 6) | public class UserVersion_Tests
    method UserVersion_Get_Set (line 8) | [Fact]

FILE: LiteDB.Tests/Expressions/Expressions_Exec_Tests.cs
  class ExpressionsExec_Tests (line 8) | public class ExpressionsExec_Tests
    method J (line 10) | public BsonDocument J(string j) => JsonSerializer.Deserialize(j).AsDoc...
    method Expressions_Scalar_Path (line 12) | [Fact]
    method Expressions_Scalar_Operator (line 97) | [Fact]
    method Expressions_Scalar_Methods (line 178) | [Fact]
    method Expressions_Scalar_Parameters (line 255) | [Fact]
    method Expressions_Enumerable_Expr (line 296) | [Fact]
    method Expression_Multiple_And_Tests (line 347) | [Fact]
    method Expression_Multiple_Or_Tests (line 361) | [Fact]
    method Expression_AndAlso_OrElse (line 375) | [Fact]
    method Expression_Conditional_IIF (line 390) | [Fact]

FILE: LiteDB.Tests/Expressions/Expressions_Tests.cs
  class Expressions_Tests (line 7) | public class Expressions_Tests
    method Expressions_Constants (line 9) | [Fact]
    method Expression_Fields (line 30) | [Fact]
    method Expression_Immutable (line 84) | [Fact]
    method Expression_Type (line 104) | [Fact]
    method Expression_Format (line 161) | [Fact]
    method Invalid_Expressions (line 219) | [Fact]

FILE: LiteDB.Tests/Internals/Aes_Tests.cs
  class Aes_Tests (line 12) | public class Aes_Tests
    method Encrypt_Decrypt_Stream (line 14) | [Fact]
    method AesStream_Invalid_Page_Size (line 71) | [Fact]
    method AesStream_Invalid_Password (line 101) | [Fact]

FILE: LiteDB.Tests/Internals/BasePage_Tests.cs
  class BasePage_Tests (line 8) | public class BasePage_Tests
    method BasePage_Insert (line 10) | [Fact]
    method BasePage_Insert_Full_Bytes_Page (line 56) | [Fact]
    method BasePage_Insert_Full_Items_Page (line 82) | [Fact]
    method BasePage_Delete (line 109) | [Fact]
    method BasePage_Delete_Full (line 167) | [Fact]
    method BasePage_Defrag (line 233) | [Fact]
    method BasePage_Update (line 276) | [Fact]
    method BasePage_Test_Output (line 339) | [Fact]

FILE: LiteDB.Tests/Internals/BufferWriter_Tests.cs
  class BufferWriter_Tests (line 11) | public class BufferWriter_Tests
    method Buffer_Write_CString (line 13) | [Fact]
    method Buffer_Write_CString_Basic (line 36) | [Fact]
    method Buffer_Write_String (line 61) | [Fact]
    method Buffer_Write_Numbers (line 90) | [Fact]
    method Buffer_Write_Types (line 174) | [Fact]
    method Buffer_Write_Overflow (line 224) | [Fact]
    method Buffer_Bson (line 245) | [Fact]

FILE: LiteDB.Tests/Internals/CacheAsync_Tests.cs
  class CacheAsync_Tests (line 11) | public class CacheAsync_Tests
    method CacheAsync_Thread_ShareCounter (line 13) | [Fact]

FILE: LiteDB.Tests/Internals/Cache_Tests.cs
  class Cache_Tests (line 10) | public class Cache_Tests
    method Cache_Read_Write (line 12) | [Fact]
    method Cache_Extends (line 65) | [Fact]
    method Cache_UniqueIDNumbering (line 140) | [Fact]
    method ConsumeNewPages (line 161) | private void ConsumeNewPages(int[] segmentSizes)

FILE: LiteDB.Tests/Internals/Disk_Tests.cs
  class Disk_Tests (line 12) | public class Disk_Tests
    method Disk_Read_Write (line 14) | [Fact]
    method Disk_ExclusiveScheduler_Write (line 62) | [Fact (Skip = "Verificar loop")]

FILE: LiteDB.Tests/Internals/Document_Tests.cs
  class Document_Test (line 9) | public class Document_Test
    method Document_Copies_Properties_To_KeyValue_Array (line 11) | [Fact]
    method Value_Index_From_BsonValue (line 37) | [Fact]

FILE: LiteDB.Tests/Internals/ExtendedLength_Tests.cs
  class ExtendedLength_Tests (line 8) | public class ExtendedLength_Tests
    method ExtendedLengthHelper_Tests (line 10) | [Fact]
    method IndexExtendedLength_Tests (line 22) | [Fact]

FILE: LiteDB.Tests/Internals/Extensions_Test.cs
  class Extensions_Test (line 13) | public class Extensions_Test
    method EnumerableExtensions_OnDispose (line 16) | [Fact]
    method StopWatchExtensions_StartDisposable (line 33) | [Fact]

FILE: LiteDB.Tests/Internals/FreePage_Tests.cs
  class FreePage_Tests (line 8) | public class FreePage_Tests
    method FreeSlot_Insert (line 17) | [Fact]
    method FreeSlot_Delete (line 91) | [Fact]

FILE: LiteDB.Tests/Internals/FreeSlot_Tests.cs
  class FreeSlots_Tests (line 8) | public class FreeSlots_Tests
    method FreeIndexSlot_Ranges (line 18) | [Fact]
    method MinimumIndexSlot_Ranges (line 38) | [Fact]

FILE: LiteDB.Tests/Internals/HeaderPage_Tests.cs
  class HeaderPage_Tests (line 8) | public class HeaderPage_Tests
    method HeaderPage_Collections (line 10) | [Fact]
    method HeaderPage_Savepoint (line 43) | [Fact]

FILE: LiteDB.Tests/Internals/Pragma_Tests.cs
  class Pragma_Tests (line 11) | public class Pragma_Tests
    method Pragma_RunTests (line 13) | [Fact]

FILE: LiteDB.Tests/Internals/Sort_Tests.cs
  class Sort_Tests (line 11) | public class Sort_Tests
    method Sort_String_Asc (line 15) | [Fact]
    method Sort_Int_Desc (line 43) | [Fact]

FILE: LiteDB.Tests/Issues/Issue1585_Tests.cs
  class PlayerDto (line 10) | public class PlayerDto
    method PlayerDto (line 16) | public PlayerDto(Guid id, string name)
  class Issue1585a_Tests (line 23) | public class Issue1585a_Tests
    method Dto_Read (line 25) | [Fact]
    method Dto_Read1 (line 38) | [Fact]
    method Dto_Read2 (line 51) | [Fact]
  class Issue1585b_Tests (line 65) | public class Issue1585b_Tests
    method Dto_Read3 (line 67) | [Fact]
    method Dto_Read4 (line 80) | [Fact]
    method Dto_Read5 (line 93) | [Fact]

FILE: LiteDB.Tests/Issues/Issue1651_Tests.cs
  class Issue1651_Tests (line 9) | public class Issue1651_Tests
    class Order (line 11) | public class Order : BaseEntity
    class Customer (line 16) | public class Customer : BaseEntity
    class BaseEntity (line 21) | public class BaseEntity
    method Find_ByRelationId_Success (line 26) | [Fact]

FILE: LiteDB.Tests/Issues/Issue1695_Tests.cs
  class Issue1695_Tests (line 11) | public class Issue1695_Tests
    class StateModel (line 13) | public class StateModel
    method ICollection_Parameter_Test (line 19) | [Fact]

FILE: LiteDB.Tests/Issues/Issue1701_Tests.cs
  class Issue1701_Tests (line 8) | public class Issue1701_Tests
    method Deleted_Index_Slot_Test (line 10) | [Fact]

FILE: LiteDB.Tests/Issues/Issue1838_Tests.cs
  class Issue1838_Tests (line 8) | public class Issue1838_Tests
    method Find_ByDatetime_Offset (line 10) | [Fact]
    class TestType (line 39) | public class TestType

FILE: LiteDB.Tests/Issues/Issue1860_Tests.cs
  class Issue1860_Tests (line 8) | public class Issue1860_Tests
    method Constructor_has_enum_bsonctor (line 10) | [Fact]
    method Constructor_has_enum (line 44) | [Fact]
    method Constructor_has_enum_asint (line 78) | [Fact]
    type EnumAB (line 112) | public enum EnumAB
    class C1 (line 119) | public class C1
    class C2 (line 126) | public class C2
      method C2 (line 132) | public C2(int id, EnumAB enumAB)
    class C3 (line 139) | public class C3
      method C3 (line 145) | [BsonCtor]

FILE: LiteDB.Tests/Issues/Issue1865_Tests.cs
  class Issue1865_Tests (line 10) | public class Issue1865_Tests
    class Project (line 12) | public class Project : BaseEntity
    class Point (line 17) | public class Point : BaseEntity
    class BaseEntity (line 25) | public class BaseEntity
    method Incluced_document_types_should_be_reald (line 31) | [Fact]

FILE: LiteDB.Tests/Issues/Issue2112_Tests.cs
  class Issue2112_Tests (line 8) | public class Issue2112_Tests
    method Serialize_covariant_collection_has_type (line 12) | [Fact]
    method Deserialize_covariant_collection_succeed (line 24) | [Fact]
    type IA (line 35) | interface IA
    class A (line 41) | class A : IA
    type IB (line 46) | interface IB
    class B (line 51) | class B : IB

FILE: LiteDB.Tests/Issues/Issue2127_Tests.cs
  class Issue2127_Tests (line 9) | public class Issue2127_Tests
    class ReproTests (line 11) | public class ReproTests
      method InsertItemBackToBack_Test (line 13) | [Fact(Skip = "To slow for a unit test in a build process")]
    class ExampleItem (line 62) | public class ExampleItem
    class ExampleItemRepository (line 70) | public sealed class ExampleItemRepository : IDisposable
      method ExampleItemRepository (line 76) | public ExampleItemRepository(string databasePath)
      method Insert (line 87) | public void Insert(ExampleItem item)
      method Dispose (line 93) | public void Dispose()

FILE: LiteDB.Tests/Issues/Issue2129_Tests.cs
  class Issue2129_Tests (line 8) | public class Issue2129_Tests
    method TestInsertAfterDeleteAll (line 10) | [Fact]
    method GenerateItems (line 23) | private IEnumerable<SwapChance> GenerateItems()
  class SwapChance (line 39) | public class SwapChance

FILE: LiteDB.Tests/Issues/Issue2265_Tests.cs
  class Issue2265_Tests (line 8) | public class Issue2265_Tests
    class Weights (line 10) | public class Weights
      method Weights (line 18) | public Weights(int id, Weights[] parents)
      method Weights (line 24) | public Weights()
    method Test (line 31) | [Fact]

FILE: LiteDB.Tests/Issues/Issue2298_Tests.cs
  class Issue2298_Tests (line 12) | public class Issue2298_Tests
    type Mass (line 14) | public struct Mass
      type Units (line 16) | public enum Units
      method Mass (line 19) | public Mass(double value, Units unit)
    class QuantityRange (line 26) | public class QuantityRange<T>
      method QuantityRange (line 28) | public QuantityRange(double min, double max, Enum unit)
    method MassRangeBuilder (line 36) | public static QuantityRange<Mass> MassRangeBuilder(BsonDocument document)
    method We_Dont_Need_Ctor (line 47) | [Fact]

FILE: LiteDB.Tests/Issues/Issue2417_Tests.cs
  class Issue2417_Tests (line 11) | public class Issue2417_Tests
    method Rebuild_Detected_Infinite_Loop (line 13) | [Fact]
    method Rebuild_Detected_Infinite_Loop_With_Password (line 53) | [Fact]

FILE: LiteDB.Tests/Issues/Issue2458_Tests.cs
  class Issue2458_Tests (line 7) | public class Issue2458_Tests
    method NegativeSeekFails (line 9) | [Fact]
    method SeekPastFileSucceds (line 21) | [Fact]
    method SeekShortChunks (line 31) | [Fact]
    method AddTestFile (line 49) | private void AddTestFile(string id, long length, ILiteStorage<string> fs)

FILE: LiteDB.Tests/Issues/Issue2471_Test.cs
  class Issue2471_Test (line 15) | public class Issue2471_Test
    method TestFragmentDB_FindByIDException (line 17) | [Fact]
    method MultipleReadCleansUpTransaction (line 36) | [Fact]
    class User (line 52) | public class User
    class Address (line 60) | public class Address
    method Ensure_Query_GetPlan_Releases_Lock (line 68) | [Fact]

FILE: LiteDB.Tests/Issues/Issue2487_Tests.cs
  class Issue2487_tests (line 9) | public class Issue2487_tests
    class DataClass (line 11) | private class DataClass
    method Test_Contains_EmptyStrings (line 21) | [Fact]

FILE: LiteDB.Tests/Issues/Issue2494_Tests.cs
  class Issue2494_Tests (line 12) | public class Issue2494_Tests
    method Test (line 14) | [Fact]
    class PlayerDto (line 33) | public class PlayerDto
      method PlayerDto (line 40) | public PlayerDto(Guid id, string name)
      method PlayerDto (line 46) | public PlayerDto()

FILE: LiteDB.Tests/Issues/Issue2506_Tests.cs
  class Issue2506_Tests (line 7) | public class Issue2506_Tests
    method Test (line 9) | [Fact]

FILE: LiteDB.Tests/Issues/Issue2534_Tests.cs
  class Issue2534_Tests (line 5) | public class Issue2534_Tests
    method Test (line 7) | [Fact]

FILE: LiteDB.Tests/Issues/Issue2570_Tests.cs
  class Issue2570_Tests (line 6) | public class Issue2570_Tests
    class Person (line 8) | public class Person
    method Issue2570_Tuples (line 15) | [Fact]
    type PersonData (line 33) | public struct PersonData
    class PersonWithStruct (line 39) | public class PersonWithStruct
    method Issue2570_Structs (line 46) | [Fact]

FILE: LiteDB.Tests/Issues/Pull2468_Tests.cs
  class Pull2468_Tests (line 15) | public class Pull2468_Tests
    method Supports_LowerInvariant (line 18) | [Fact]
    method Supports_UpperInvariant (line 45) | [Fact]

FILE: LiteDB.Tests/Mapper/CustomInterface_Tests.cs
  class CustomInterface_Tests (line 8) | public class CustomInterface_Tests
    class User (line 10) | public class User
    method Custom_Interface_Implements_IEnumerable (line 21) | [Fact]

FILE: LiteDB.Tests/Mapper/CustomMappingCtor_Tests.cs
  class CustomMapping_Tests (line 8) | public class CustomMapping_Tests
    class User (line 10) | public class User
      method User (line 15) | public User(int id, string name)
    class Domain (line 22) | public class Domain
    class MultiCtor (line 28) | public class MultiCtor
      method MultiCtor (line 34) | public MultiCtor()
      method MultiCtor (line 38) | [BsonCtor]
      method MultiCtor (line 45) | public MultiCtor(int id, string name)
    class MultiCtorWithArray (line 52) | public class MultiCtorWithArray
      method MultiCtorWithArray (line 59) | public MultiCtorWithArray()
      method MultiCtorWithArray (line 63) | [BsonCtor]
      method MultiCtorWithArray (line 71) | public MultiCtorWithArray(int id, string[] strarr, string name)
    class MyClass (line 79) | public class MyClass
      method MyClass (line 85) | public MyClass(int id, string name, DateTimeOffset dateTimeOffset)
    class ClassByte (line 93) | public class ClassByte
      method ClassByte (line 97) | [BsonCtor]
    method Custom_Ctor (line 106) | [Fact]
    method ParameterLess_Ctor (line 117) | [Fact]
    method BsonCtor_Attribute (line 128) | [Fact]
    method BsonCtorWithArray_Attribute (line 140) | [Fact]
    method Custom_Ctor_Non_Simple_Types (line 153) | [Fact]
    method Custom_Ctor_Byte_Property (line 164) | [Fact]

FILE: LiteDB.Tests/Mapper/CustomMapping_Tests.cs
  class CustomMappingCtor_Tests (line 8) | public class CustomMappingCtor_Tests
    class UserWithCustomId (line 10) | public class UserWithCustomId
      method UserWithCustomId (line 15) | public UserWithCustomId(int key, string name)
    method Custom_Ctor_With_Custom_Id (line 22) | [Fact]
    class BaseClass (line 38) | public abstract class BaseClass
    class ConcreteClass (line 47) | public class ConcreteClass : BaseClass
    method Custom_Id_In_Interface (line 52) | [Fact]

FILE: LiteDB.Tests/Mapper/DbRefAbstract_Tests.cs
  class DbRefAbstract_Tests (line 10) | public class DbRefAbstract_Tests
    class ProjectList (line 12) | public class ProjectList
    class ProjectItem (line 22) | public class ProjectItem
    class ItemBase (line 31) | public abstract class ItemBase
    class ItemA (line 38) | public class ItemA : ItemBase
    class ItemB (line 43) | public class ItemB : ItemBase
    method DbRef_List_Using_Abstract_Class (line 48) | [Fact]
    method DbRef_Item_Using_Abstract_Class (line 77) | [Fact]

FILE: LiteDB.Tests/Mapper/Dictionary_Tests.cs
  class Dictionary_Tests (line 10) | public class Dictionary_Tests
    class Dict (line 12) | public class Dict
    method Dictionary_Map (line 19) | [Fact]
    method Deserialize_Object (line 33) | [Fact]
    method Deserialize_Hashtable (line 47) | [Fact]
    method Serialize_Hashtable (line 61) | [Fact]
    method Deserialize_Uri (line 73) | [Fact]

FILE: LiteDB.Tests/Mapper/Enum_Tests.cs
  class Enum_Tests (line 8) | public class Enum_Tests
    type CustomerType (line 10) | public enum CustomerType
    class Customer (line 16) | public class Customer
    method Enum_Convert_Into_Document (line 23) | [Fact]
    method Enum_Convert_Into_Linq_Query (line 41) | [Fact]
    method Enum_Array_Test (line 66) | [Fact]

FILE: LiteDB.Tests/Mapper/GenericMap_Tests.cs
  class GenericMap_Tests (line 8) | public class GenericMap_Tests
    class User (line 10) | public class User<T, K>
    method Generic_Map (line 18) | [Fact]

FILE: LiteDB.Tests/Mapper/LinqBsonExpression_Tests.cs
  class LinqBsonExpression_Tests (line 13) | public class LinqBsonExpression_Tests
    class User (line 17) | public class User
    class Address (line 42) | public class Address
      method InvalidMethod (line 48) | public string InvalidMethod() => "will thow error in eval";
    class City (line 51) | public class City
    class Phone (line 57) | public class Phone
    type PhoneType (line 64) | public enum PhoneType
    class Customer (line 70) | public class Customer
    class Order (line 76) | public class Order
    class Account (line 88) | public class Account
    class Product (line 97) | public class Product
    method MyMethod (line 107) | private string MyMethod() => "ok";
    method MyIndex (line 108) | private int MyIndex() => 5;
    method Linq_Document_Navigation (line 114) | [Fact]
    method Linq_Constants (line 124) | [Fact]
    method Linq_Enumerables (line 164) | [Fact]
    method Linq_Predicate (line 233) | [Fact]
    method Linq_Nullables (line 274) | [Fact]
    method Linq_Cast_Convert_Types (line 287) | [Fact]
    method Linq_Methods (line 300) | [Fact]
    method Linq_Dictionary_Index_Access (line 376) | [Fact]
    method Linq_New_Instance (line 386) | [Fact]
    method Linq_Composite_Key (line 408) | [Fact]
    method Linq_Coalesce (line 419) | [Fact]
    method Linq_DbRef (line 428) | [Fact]
    method Linq_Complex_Expressions (line 438) | [Fact]
    method Linq_Enum_Expressions (line 457) | [Fact]
    method Linq_BsonDocument_Navigation (line 467) | [Fact]
    method Linq_BsonDocument_Predicate (line 476) | [Fact]
    method Linq_Custom_Field_Name (line 482) | [Fact]
    method Linq_Array_Contains (line 492) | [Fact]
    method Linq_Array_Any (line 504) | [Fact]
    method Linq_InvocationExpression (line 510) | [Fact]
    method Test (line 532) | [DebuggerHidden]
    method TestExpr (line 553) | [DebuggerHidden]
    method TestExpr (line 559) | [DebuggerHidden]
    method TestPredicate (line 565) | [DebuggerHidden]
    method TestException (line 574) | [DebuggerHidden]

FILE: LiteDB.Tests/Mapper/LinqEval_Tests.cs
  class LinqEval_Tests (line 11) | public class LinqEval_Tests
    class User (line 15) | public class User
    class Address (line 27) | public class Address
    class Phone (line 33) | public class Phone
    type PhoneType (line 40) | public enum PhoneType
    method Linq_Date_Eval (line 50) | [Fact]
    method Linq_Predicate_Eval (line 81) | [Fact]
    method Linq_Document_Navigation_Eval (line 106) | [Fact]
    method Linq_Math_Eval (line 122) | [Fact]
    method Linq_Array_Navigation_Eval (line 134) | [Fact]
    method Eval (line 159) | [DebuggerHidden]

FILE: LiteDB.Tests/Mapper/Mapper_Tests.cs
  class Mapper_Tests (line 8) | public class Mapper_Tests
    method ToDocument_ReturnsNull_WhenFail (line 12) | [Fact]
    method Class_Not_Assignable (line 23) | [Fact]
    class MyClass (line 40) | public class MyClass
    class OtherClass (line 46) | public class OtherClass

FILE: LiteDB.Tests/Mapper/Records_Tests.cs
  class Records_Tests (line 8) | public class Records_Tests
    type User (line 10) | public record User(int Id, string Name);
    method Record_Simple_Mapper (line 13) | [Fact]

FILE: LiteDB.Tests/Mapper/StructField_Tests.cs
  class StructFields_Tests (line 10) | public class StructFields_Tests
    type Point2D (line 12) | public struct Point2D
    method Serialize_Struct_Fields (line 18) | [Fact]

FILE: LiteDB.Tests/Query/Data/PersonGroupByData.cs
  class PersonGroupByData (line 9) | public class PersonGroupByData : IDisposable
    method PersonGroupByData (line 15) | public PersonGroupByData()
    method GetData (line 25) | public (ILiteCollection<Person>, Person[]) GetData() => (_collection, ...
    method Dispose (line 27) | public void Dispose()

FILE: LiteDB.Tests/Query/Data/PersonQueryData.cs
  class PersonQueryData (line 6) | public class PersonQueryData : IDisposable
    method PersonQueryData (line 12) | public PersonQueryData()
    method GetData (line 21) | public (ILiteCollection<Person>, Person[]) GetData() => (_collection, ...
    method Dispose (line 23) | public void Dispose()

FILE: LiteDB.Tests/Query/GroupBy_Tests.cs
  class GroupBy_Tests (line 9) | public class GroupBy_Tests
    method Query_GroupBy_Age_With_Count (line 11) | [Fact(Skip = "Missing implement LINQ for GroupBy")]
    method Query_GroupBy_Year_With_Sum_Age (line 35) | [Fact(Skip = "Missing implement LINQ for GroupBy")]
    method Query_GroupBy_Func (line 56) | [Fact(Skip = "Missing implement LINQ for GroupBy")]
    method Query_GroupBy_With_Array_Aggregation (line 77) | [Fact(Skip = "Missing implement LINQ for GroupBy")]

FILE: LiteDB.Tests/Query/OrderBy_Tests.cs
  class OrderBy_Tests (line 7) | public class OrderBy_Tests
    method Query_OrderBy_Using_Index (line 9) | [Fact]
    method Query_OrderBy_Using_Index_Desc (line 30) | [Fact]
    method Query_OrderBy_With_Func (line 51) | [Fact]
    method Query_OrderBy_With_Offset_Limit (line 72) | [Fact]
    method Query_Asc_Desc (line 97) | [Fact]

FILE: LiteDB.Tests/Query/QueryApi_Tests.cs
  class QueryApi_Tests (line 8) | public class QueryApi_Tests : PersonQueryData
    method Query_And (line 10) | [Fact]
    method Query_And_Same_Field (line 23) | [Fact]

FILE: LiteDB.Tests/Query/Select_Tests.cs
  class Select_Tests (line 8) | public class Select_Tests : PersonQueryData
    method Query_Select_Key_Only (line 10) | [Fact]
    method Query_Select_New_Document (line 33) | [Fact]
    method Query_Or_With_Null (line 55) | [Fact]
    method Query_Find_All_Predicate (line 67) | [Fact]
    method Query_With_No_Collection (line 78) | [Fact]

FILE: LiteDB.Tests/Query/Where_Tests.cs
  class Where_Tests (line 7) | public class Where_Tests : PersonQueryData
    class Entity (line 9) | class Entity
    method Query_Where_With_Parameter (line 15) | [Fact]
    method Query_Multi_Where_With_Like (line 32) | [Fact]
    method Query_Single_Where_With_And (line 51) | [Fact]
    method Query_Single_Where_With_Or_And_In (line 68) | [Fact]
    method Query_With_Array_Ids (line 90) | [Fact]

FILE: LiteDB.Tests/Utils/AssertEx.cs
  class AssertEx (line 11) | public static class AssertEx
    method ArrayEqual (line 13) | [DebuggerHidden]
    method ExpectValue (line 38) | public static void ExpectValue(this BsonValue value, BsonValue expect)
    method ExpectValue (line 44) | public static void ExpectValue<T>(this T value, T expect)
    method ExpectArray (line 50) | public static void ExpectArray(this BsonValue value, params BsonValue[...
    method ExpectJson (line 56) | public static void ExpectJson(this BsonValue value, string expectJson)
    method ExpectValues (line 62) | public static void ExpectValues(this IEnumerable<BsonValue> values, pa...
    method ExpectValues (line 67) | [DebuggerHidden]
    method ExpectCount (line 73) | [DebuggerHidden]

FILE: LiteDB.Tests/Utils/DataGen.cs
  class DataGen (line 7) | public class DataGen
    method Person (line 12) | public static IEnumerable<Person> Person()
    method Person (line 46) | public static IEnumerable<Person> Person(int start, int end)
    method Zip (line 57) | public static IEnumerable<Zip> Zip()

FILE: LiteDB.Tests/Utils/Faker.Names.cs
  class Faker (line 1) | internal static partial class Faker

FILE: LiteDB.Tests/Utils/Faker.cs
  class Faker (line 5) | internal static partial class Faker
    method Fullname (line 9) | public static string Fullname()
    method Age (line 16) | public static int Age()
    method Birthday (line 21) | public static DateTime Birthday()
    method Lorem (line 32) | public static string Lorem(int size, int end = -1)
    method Next (line 38) | public static int Next(int start, int end)
    method NextDouble (line 43) | public static double NextDouble(double start, double end)
    method NextLong (line 49) | public static long NextLong(this Random random, long min, long max)
    method NextBool (line 72) | public static bool NextBool(this Random random)
    method Departments (line 77) | public static string Departments() => _departments[_random.Next(0, _de...
    method Created (line 79) | internal static BsonValue Created()
    method Language (line 90) | public static string Language() => _departments[_random.Next(0, _depar...
    method Department (line 92) | public static string Department() => _departments[_random.Next(0, _dep...
    method Country (line 94) | public static string Country() => _countries[_random.Next(0, _countrie...
    method Job (line 96) | public static string Job() => _jobTitles[_random.Next(0, _jobTitles.Le...
    method SkuNumber (line 98) | internal static string SkuNumber() =>

FILE: LiteDB.Tests/Utils/LiteEngineExtensions.cs
  class LiteEngineExtensions (line 7) | public static class LiteEngineExtensions
    method Insert (line 9) | public static int Insert(this LiteEngine engine, string collection, Bs...
    method Update (line 14) | public static int Update(this LiteEngine engine, string collection, Bs...
    method Find (line 19) | public static List<BsonDocument> Find(this LiteEngine engine, string c...
    method GetPageLog (line 41) | public static BsonDocument GetPageLog(this LiteEngine engine, int pageID)

FILE: LiteDB.Tests/Utils/Models/Person.cs
  class Person (line 6) | public class Person : IEqualityComparer<Person>, IComparable<Person>
    method CompareTo (line 17) | public int CompareTo(Person other)
    method Equals (line 22) | public bool Equals(Person x, Person y)
    method GetHashCode (line 27) | public int GetHashCode(Person obj)
    method ToString (line 32) | public override string ToString()
  class Address (line 38) | public class Address

FILE: LiteDB.Tests/Utils/Models/Zip.cs
  class Zip (line 13) | public class Zip : IEqualityComparer<Zip>, IComparable<Zip>
    method CompareTo (line 20) | public int CompareTo(Zip other)
    method Equals (line 25) | public bool Equals(Zip x, Zip y)
    method GetHashCode (line 33) | public int GetHashCode(Zip obj)
    method ToString (line 38) | public override string ToString()

FILE: LiteDB.Tests/Utils/TempFile.cs
  class TempFile (line 6) | public class TempFile : IDisposable
    method TempFile (line 10) | public TempFile()
    method TempFile (line 18) | public TempFile(string original)
    method Dispose (line 39) | public void Dispose()
    method Dispose (line 50) | protected virtual void Dispose(bool disposing)
    method ReadAsText (line 72) | public string ReadAsText() => File.ReadAllText(this.Filename);
    method ToString (line 74) | public override string ToString() => this.Filename;

FILE: LiteDB/Client/Database/Collections/Aggregate.cs
  class LiteCollection (line 8) | public partial class LiteCollection<T>
    method Count (line 15) | public int Count()
    method Count (line 24) | public int Count(BsonExpression predicate)
    method Count (line 34) | public int Count(string predicate, BsonDocument parameters) => this.Co...
    method Count (line 39) | public int Count(string predicate, params BsonValue[] args) => this.Co...
    method Count (line 44) | public int Count(Expression<Func<T, bool>> predicate) => this.Count(_m...
    method Count (line 49) | public int Count(Query query) => new LiteQueryable<T>(_engine, _mapper...
    method LongCount (line 58) | public long LongCount()
    method LongCount (line 66) | public long LongCount(BsonExpression predicate)
    method LongCount (line 76) | public long LongCount(string predicate, BsonDocument parameters) => th...
    method LongCount (line 81) | public long LongCount(string predicate, params BsonValue[] args) => th...
    method LongCount (line 86) | public long LongCount(Expression<Func<T, bool>> predicate) => this.Lon...
    method LongCount (line 91) | public long LongCount(Query query) => new LiteQueryable<T>(_engine, _m...
    method Exists (line 100) | public bool Exists(BsonExpression predicate)
    method Exists (line 110) | public bool Exists(string predicate, BsonDocument parameters) => this....
    method Exists (line 115) | public bool Exists(string predicate, params BsonValue[] args) => this....
    method Exists (line 120) | public bool Exists(Expression<Func<T, bool>> predicate) => this.Exists...
    method Exists (line 125) | public bool Exists(Query query) => new LiteQueryable<T>(_engine, _mapp...
    method Min (line 134) | public BsonValue Min(BsonExpression keySelector)
    method Min (line 151) | public BsonValue Min() => this.Min("_id");
    method Min (line 156) | public K Min<K>(Expression<Func<T, K>> keySelector)
    method Max (line 170) | public BsonValue Max(BsonExpression keySelector)
    method Max (line 187) | public BsonValue Max() => this.Max("_id");
    method Max (line 192) | public K Max<K>(Expression<Func<T, K>> keySelector)

FILE: LiteDB/Client/Database/Collections/Delete.cs
  class LiteCollection (line 7) | public partial class LiteCollection<T>
    method Delete (line 12) | public bool Delete(BsonValue id)
    method DeleteAll (line 22) | public int DeleteAll()
    method DeleteMany (line 30) | public int DeleteMany(BsonExpression predicate)
    method DeleteMany (line 40) | public int DeleteMany(string predicate, BsonDocument parameters) => th...
    method DeleteMany (line 45) | public int DeleteMany(string predicate, params BsonValue[] args) => th...
    method DeleteMany (line 50) | public int DeleteMany(Expression<Func<T, bool>> predicate) => this.Del...

FILE: LiteDB/Client/Database/Collections/Find.cs
  class LiteCollection (line 10) | public partial class LiteCollection<T>
    method Query (line 15) | public ILiteQueryable<T> Query()
    method Find (line 25) | public IEnumerable<T> Find(BsonExpression predicate, int skip = 0, int...
    method Find (line 40) | public IEnumerable<T> Find(Query query, int skip = 0, int limit = int....
    method Find (line 54) | public IEnumerable<T> Find(Expression<Func<T, bool>> predicate, int sk...
    method FindById (line 63) | public T FindById(BsonValue id)
    method FindOne (line 73) | public T FindOne(BsonExpression predicate) => this.Find(predicate).Fir...
    method FindOne (line 78) | public T FindOne(string predicate, BsonDocument parameters) => this.Fi...
    method FindOne (line 83) | public T FindOne(BsonExpression predicate, params BsonValue[] args) =>...
    method FindOne (line 88) | public T FindOne(Expression<Func<T, bool>> predicate) => this.FindOne(...
    method FindOne (line 93) | public T FindOne(Query query) => this.Find(query).FirstOrDefault();
    method FindAll (line 98) | public IEnumerable<T> FindAll() => this.Query().Include(_includes).ToE...

FILE: LiteDB/Client/Database/Collections/Include.cs
  class LiteCollection (line 8) | public partial class LiteCollection<T>
    method Include (line 14) | public ILiteCollection<T> Include<K>(Expression<Func<T, K>> keySelector)
    method Include (line 27) | public ILiteCollection<T> Include(BsonExpression keySelector)

FILE: LiteDB/Client/Database/Collections/Index.cs
  class LiteCollection (line 10) | public partial class LiteCollection<T>
    method EnsureIndex (line 18) | public bool EnsureIndex(string name, BsonExpression expression, bool u...
    method EnsureIndex (line 31) | public bool EnsureIndex(BsonExpression expression, bool unique = false)
    method EnsureIndex (line 45) | public bool EnsureIndex<K>(Expression<Func<T, K>> keySelector, bool un...
    method EnsureIndex (line 58) | public bool EnsureIndex<K>(string name, Expression<Func<T, K>> keySele...
    method GetIndexExpression (line 68) | private BsonExpression GetIndexExpression<K>(Expression<Func<T, K>> ke...
    method DropIndex (line 93) | public bool DropIndex(string name)

FILE: LiteDB/Client/Database/Collections/Insert.cs
  class LiteCollection (line 8) | public partial class LiteCollection<T>
    method Insert (line 13) | public BsonValue Insert(T entity)
    method Insert (line 36) | public void Insert(BsonValue id, T entity)
    method Insert (line 51) | public int Insert(IEnumerable<T> entities)
    method InsertBulk (line 61) | [Obsolete("Use normal Insert()")]
    method GetBsonDocs (line 72) | private IEnumerable<BsonDocument> GetBsonDocs(IEnumerable<T> documents)
    method RemoveDocId (line 91) | private bool RemoveDocId(BsonDocument doc)

FILE: LiteDB/Client/Database/Collections/Update.cs
  class LiteCollection (line 9) | public partial class LiteCollection<T>
    method Update (line 14) | public bool Update(T entity)
    method Update (line 27) | public bool Update(BsonValue id, T entity)
    method Update (line 44) | public int Update(IEnumerable<T> entities)
    method UpdateMany (line 55) | public int UpdateMany(BsonExpression transform, BsonExpression predicate)
    method UpdateMany (line 72) | public int UpdateMany(Expression<Func<T, T>> extend, Expression<Func<T...

FILE: LiteDB/Client/Database/Collections/Upsert.cs
  class LiteCollection (line 8) | public partial class LiteCollection<T>
    method Upsert (line 13) | public bool Upsert(T entity)
    method Upsert (line 23) | public int Upsert(IEnumerable<T> entities)
    method Upsert (line 33) | public bool Upsert(BsonValue id, T entity)

FILE: LiteDB/Client/Database/ILiteCollection.cs
  type ILiteCollection (line 7) | public interface ILiteCollection<T>
    method Include (line 28) | ILiteCollection<T> Include<K>(Expression<Func<T, K>> keySelector);
    method Include (line 34) | ILiteCollection<T> Include(BsonExpression keySelector);
    method Upsert (line 39) | bool Upsert(T entity);
    method Upsert (line 44) | int Upsert(IEnumerable<T> entities);
    method Upsert (line 49) | bool Upsert(BsonValue id, T entity);
    method Update (line 54) | bool Update(T entity);
    method Update (line 59) | bool Update(BsonValue id, T entity);
    method Update (line 64) | int Update(IEnumerable<T> entities);
    method UpdateMany (line 70) | int UpdateMany(BsonExpression transform, BsonExpression predicate);
    method UpdateMany (line 76) | int UpdateMany(Expression<Func<T, T>> extend, Expression<Func<T, bool>...
    method Insert (line 81) | BsonValue Insert(T entity);
    method Insert (line 86) | void Insert(BsonValue id, T entity);
    method Insert (line 91) | int Insert(IEnumerable<T> entities);
    method InsertBulk (line 96) | int InsertBulk(IEnumerable<T> entities, int batchSize = 5000);
    method EnsureIndex (line 104) | bool EnsureIndex(string name, BsonExpression expression, bool unique =...
    method EnsureIndex (line 111) | bool EnsureIndex(BsonExpression expression, bool unique = false);
    method EnsureIndex (line 118) | bool EnsureIndex<K>(Expression<Func<T, K>> keySelector, bool unique = ...
    method EnsureIndex (line 126) | bool EnsureIndex<K>(string name, Expression<Func<T, K>> keySelector, b...
    method DropIndex (line 131) | bool DropIndex(string name);
    method Query (line 136) | ILiteQueryable<T> Query();
    method Find (line 141) | IEnumerable<T> Find(BsonExpression predicate, int skip = 0, int limit ...
    method Find (line 146) | IEnumerable<T> Find(Query query, int skip = 0, int limit = int.MaxValue);
    method Find (line 151) | IEnumerable<T> Find(Expression<Func<T, bool>> predicate, int skip = 0,...
    method FindById (line 156) | T FindById(BsonValue id);
    method FindOne (line 161) | T FindOne(BsonExpression predicate);
    method FindOne (line 166) | T FindOne(string predicate, BsonDocument parameters);
    method FindOne (line 171) | T FindOne(BsonExpression predicate, params BsonValue[] args);
    method FindOne (line 176) | T FindOne(Expression<Func<T, bool>> predicate);
    method FindOne (line 181) | T FindOne(Query query);
    method FindAll (line 186) | IEnumerable<T> FindAll();
    method Delete (line 191) | bool Delete(BsonValue id);
    method DeleteAll (line 196) | int DeleteAll();
    method DeleteMany (line 201) | int DeleteMany(BsonExpression predicate);
    method DeleteMany (line 206) | int DeleteMany(string predicate, BsonDocument parameters);
    method DeleteMany (line 211) | int DeleteMany(string predicate, params BsonValue[] args);
    method DeleteMany (line 216) | int DeleteMany(Expression<Func<T, bool>> predicate);
    method Count (line 221) | int Count();
    method Count (line 226) | int Count(BsonExpression predicate);
    method Count (line 231) | int Count(string predicate, BsonDocument parameters);
    method Count (line 236) | int Count(string predicate, params BsonValue[] args);
    method Count (line 241) | int Count(Expression<Func<T, bool>> predicate);
    method Count (line 246) | int Count(Query query);
    method LongCount (line 251) | long LongCount();
    method LongCount (line 256) | long LongCount(BsonExpression predicate);
    method LongCount (line 261) | long LongCount(string predicate, BsonDocument parameters);
    method LongCount (line 266) | long LongCount(string predicate, params BsonValue[] args);
    method LongCount (line 271) | long LongCount(Expression<Func<T, bool>> predicate);
    method LongCount (line 276) | long LongCount(Query query);
    method Exists (line 281) | bool Exists(BsonExpression predicate);
    method Exists (line 286) | bool Exists(string predicate, BsonDocument parameters);
    method Exists (line 291) | bool Exists(string predicate, params BsonValue[] args);
    method Exists (line 296) | bool Exists(Expression<Func<T, bool>> predicate);
    method Exists (line 301) | bool Exists(Query query);
    method Min (line 306) | BsonValue Min(BsonExpression keySelector);
    method Min (line 311) | BsonValue Min();
    method Min (line 316) | K Min<K>(Expression<Func<T, K>> keySelector);
    method Max (line 321) | BsonValue Max(BsonExpression keySelector);
    method Max (line 326) | BsonValue Max();
    method Max (line 331) | K Max<K>(Expression<Func<T, K>> keySelector);

FILE: LiteDB/Client/Database/ILiteDatabase.cs
  type ILiteDatabase (line 8) | public interface ILiteDatabase : IDisposable
    method GetCollection (line 25) | ILiteCollection<T> GetCollection<T>(string name, BsonAutoId autoId = B...
    method GetCollection (line 30) | ILiteCollection<T> GetCollection<T>();
    method GetCollection (line 35) | ILiteCollection<T> GetCollection<T>(BsonAutoId autoId);
    method GetCollection (line 42) | ILiteCollection<BsonDocument> GetCollection(string name, BsonAutoId au...
    method BeginTrans (line 48) | bool BeginTrans();
    method Commit (line 53) | bool Commit();
    method Rollback (line 58) | bool Rollback();
    method GetStorage (line 63) | ILiteStorage<TFileId> GetStorage<TFileId>(string filesCollection = "_f...
    method GetCollectionNames (line 68) | IEnumerable<string> GetCollectionNames();
    method CollectionExists (line 73) | bool CollectionExists(string name);
    method DropCollection (line 78) | bool DropCollection(string name);
    method RenameCollection (line 83) | bool RenameCollection(string oldName, string newName);
    method Execute (line 88) | IBsonDataReader Execute(TextReader commandReader, BsonDocument paramet...
    method Execute (line 93) | IBsonDataReader Execute(string command, BsonDocument parameters = null);
    method Execute (line 98) | IBsonDataReader Execute(string command, params BsonValue[] args);
    method Checkpoint (line 103) | void Checkpoint();
    method Rebuild (line 108) | long Rebuild(RebuildOptions options = null);
    method Pragma (line 113) | BsonValue Pragma(string name);
    method Pragma (line 118) | BsonValue Pragma(string name, BsonValue value);

FILE: LiteDB/Client/Database/ILiteQueryable.cs
  type ILiteQueryable (line 8) | public interface ILiteQueryable<T> : ILiteQueryableResult<T>
    method Include (line 10) | ILiteQueryable<T> Include(BsonExpression path);
    method Include (line 11) | ILiteQueryable<T> Include(List<BsonExpression> paths);
    method Include (line 12) | ILiteQueryable<T> Include<K>(Expression<Func<T, K>> path);
    method Where (line 14) | ILiteQueryable<T> Where(BsonExpression predicate);
    method Where (line 15) | ILiteQueryable<T> Where(string predicate, BsonDocument parameters);
    method Where (line 16) | ILiteQueryable<T> Where(string predicate, params BsonValue[] args);
    method Where (line 17) | ILiteQueryable<T> Where(Expression<Func<T, bool>> predicate);
    method OrderBy (line 19) | ILiteQueryable<T> OrderBy(BsonExpression keySelector, int order = 1);
    method OrderBy (line 20) | ILiteQueryable<T> OrderBy<K>(Expression<Func<T, K>> keySelector, int o...
    method OrderByDescending (line 21) | ILiteQueryable<T> OrderByDescending(BsonExpression keySelector);
    method OrderByDescending (line 22) | ILiteQueryable<T> OrderByDescending<K>(Expression<Func<T, K>> keySelec...
    method GroupBy (line 24) | ILiteQueryable<T> GroupBy(BsonExpression keySelector);
    method Having (line 25) | ILiteQueryable<T> Having(BsonExpression predicate);
    method Select (line 27) | ILiteQueryableResult<BsonDocument> Select(BsonExpression selector);
    method Select (line 28) | ILiteQueryableResult<K> Select<K>(Expression<Func<T, K>> selector);
  type ILiteQueryableResult (line 31) | public interface ILiteQueryableResult<T>
    method Limit (line 33) | ILiteQueryableResult<T> Limit(int limit);
    method Skip (line 34) | ILiteQueryableResult<T> Skip(int offset);
    method Offset (line 35) | ILiteQueryableResult<T> Offset(int offset);
    method ForUpdate (line 36) | ILiteQueryableResult<T> ForUpdate();
    method GetPlan (line 38) | BsonDocument GetPlan();
    method ExecuteReader (line 39) | IBsonDataReader ExecuteReader();
    method ToDocuments (line 40) | IEnumerable<BsonDocument> ToDocuments();
    method ToEnumerable (line 41) | IEnumerable<T> ToEnumerable();
    method ToList (line 42) | List<T> ToList();
    method ToArray (line 43) | T[] ToArray();
    method Into (line 45) | int Into(string newCollection, BsonAutoId autoId = BsonAutoId.ObjectId);
    method First (line 47) | T First();
    method FirstOrDefault (line 48) | T FirstOrDefault();
    method Single (line 49) | T Single();
    method SingleOrDefault (line 50) | T SingleOrDefault();
    method Count (line 52) | int Count();
    method LongCount (line 53) | long LongCount();
    method Exists (line 54) | bool Exists();

FILE: LiteDB/Client/Database/ILiteRepository.cs
  type ILiteRepository (line 7) | public interface ILiteRepository : IDisposable
    method Insert (line 17) | BsonValue Insert<T>(T entity, string collectionName = null);
    method Insert (line 22) | int Insert<T>(IEnumerable<T> entities, string collectionName = null);
    method Update (line 27) | bool Update<T>(T entity, string collectionName = null);
    method Update (line 32) | int Update<T>(IEnumerable<T> entities, string collectionName = null);
    method Upsert (line 37) | bool Upsert<T>(T entity, string collectionName = null);
    method Upsert (line 42) | int Upsert<T>(IEnumerable<T> entities, string collectionName = null);
    method Delete (line 47) | bool Delete<T>(BsonValue id, string collectionName = null);
    method DeleteMany (line 52) | int DeleteMany<T>(BsonExpression predicate, string collectionName = nu...
    method DeleteMany (line 57) | int DeleteMany<T>(Expression<Func<T, bool>> predicate, string collecti...
    method Query (line 62) | ILiteQueryable<T> Query<T>(string collectionName = null);
    method EnsureIndex (line 71) | bool EnsureIndex<T>(string name, BsonExpression expression, bool uniqu...
    method EnsureIndex (line 79) | bool EnsureIndex<T>(BsonExpression expression, bool unique = false, st...
    method EnsureIndex (line 87) | bool EnsureIndex<T, K>(Expression<Func<T, K>> keySelector, bool unique...
    method EnsureIndex (line 96) | bool EnsureIndex<T, K>(string name, Expression<Func<T, K>> keySelector...
    method SingleById (line 101) | T SingleById<T>(BsonValue id, string collectionName = null);
    method Fetch (line 106) | List<T> Fetch<T>(BsonExpression predicate, string collectionName = null);
    method Fetch (line 111) | List<T> Fetch<T>(Expression<Func<T, bool>> predicate, string collectio...
    method First (line 116) | T First<T>(BsonExpression predicate, string collectionName = null);
    method First (line 121) | T First<T>(Expression<Func<T, bool>> predicate, string collectionName ...
    method FirstOrDefault (line 126) | T FirstOrDefault<T>(BsonExpression predicate, string collectionName = ...
    method FirstOrDefault (line 131) | T FirstOrDefault<T>(Expression<Func<T, bool>> predicate, string collec...
    method Single (line 136) | T Single<T>(BsonExpression predicate, string collectionName = null);
    method Single (line 141) | T Single<T>(Expression<Func<T, bool>> predicate, string collectionName...
    method SingleOrDefault (line 146) | T SingleOrDefault<T>(BsonExpression predicate, string collectionName =...
    method SingleOrDefault (line 151) | T SingleOrDefault<T>(Expression<Func<T, bool>> predicate, string colle...

FILE: LiteDB/Client/Database/LiteCollection.cs
  class LiteCollection (line 8) | public sealed partial class LiteCollection<T> : ILiteCollection<T>
    method LiteCollection (line 33) | internal LiteCollection(string name, BsonAutoId autoId, ILiteEngine en...

FILE: LiteDB/Client/Database/LiteDatabase.cs
  class LiteDatabase (line 15) | public partial class LiteDatabase : ILiteDatabase
    method LiteDatabase (line 35) | public LiteDatabase(string connectionString, BsonMapper mapper = null)
    method LiteDatabase (line 43) | public LiteDatabase(ConnectionString connectionString, BsonMapper mapp...
    method LiteDatabase (line 58) | public LiteDatabase(Stream stream, BsonMapper mapper = null, Stream lo...
    method LiteDatabase (line 74) | public LiteDatabase(ILiteEngine engine, BsonMapper mapper = null, bool...
    method GetCollection (line 90) | public ILiteCollection<T> GetCollection<T>(string name, BsonAutoId aut...
    method GetCollection (line 98) | public ILiteCollection<T> GetCollection<T>()
    method GetCollection (line 106) | public ILiteCollection<T> GetCollection<T>(BsonAutoId autoId)
    method GetCollection (line 116) | public ILiteCollection<BsonDocument> GetCollection(string name, BsonAu...
    method BeginTrans (line 131) | public bool BeginTrans() => _engine.BeginTrans();
    method Commit (line 136) | public bool Commit() => _engine.Commit();
    method Rollback (line 141) | public bool Rollback() => _engine.Rollback();
    method GetStorage (line 160) | public ILiteStorage<TFileId> GetStorage<TFileId>(string filesCollectio...
    method GetCollectionNames (line 172) | public IEnumerable<string> GetCollectionNames()
    method CollectionExists (line 188) | public bool CollectionExists(string name)
    method DropCollection (line 198) | public bool DropCollection(string name)
    method RenameCollection (line 208) | public bool RenameCollection(string oldName, string newName)
    method Execute (line 223) | public IBsonDataReader Execute(TextReader commandReader, BsonDocument ...
    method Execute (line 237) | public IBsonDataReader Execute(string command, BsonDocument parameters...
    method Execute (line 251) | public IBsonDataReader Execute(string command, params BsonValue[] args)
    method Checkpoint (line 272) | public void Checkpoint()
    method Rebuild (line 280) | public long Rebuild(RebuildOptions options = null)
    method Pragma (line 292) | public BsonValue Pragma(string name)
    method Pragma (line 300) | public BsonValue Pragma(string name, BsonValue value)
    method Dispose (line 361) | public void Dispose()
    method Dispose (line 372) | protected virtual void Dispose(bool disposing)

FILE: LiteDB/Client/Database/LiteQueryable.cs
  class LiteQueryable (line 15) | public class LiteQueryable<T> : ILiteQueryable<T>
    method LiteQueryable (line 25) | internal LiteQueryable(ILiteEngine engine, BsonMapper mapper, string c...
    method Include (line 38) | public ILiteQueryable<T> Include<K>(Expression<Func<T, K>> path)
    method Include (line 47) | public ILiteQueryable<T> Include(BsonExpression path)
    method Include (line 56) | public ILiteQueryable<T> Include(List<BsonExpression> paths)
    method Where (line 69) | public ILiteQueryable<T> Where(BsonExpression predicate)
    method Where (line 78) | public ILiteQueryable<T> Where(string predicate, BsonDocument parameters)
    method Where (line 87) | public ILiteQueryable<T> Where(string predicate, params BsonValue[] args)
    method Where (line 96) | public ILiteQueryable<T> Where(Expression<Func<T, bool>> predicate)
    method OrderBy (line 108) | public ILiteQueryable<T> OrderBy(BsonExpression keySelector, int order...
    method OrderBy (line 120) | public ILiteQueryable<T> OrderBy<K>(Expression<Func<T, K>> keySelector...
    method OrderByDescending (line 128) | public ILiteQueryable<T> OrderByDescending(BsonExpression keySelector)...
    method OrderByDescending (line 133) | public ILiteQueryable<T> OrderByDescending<K>(Expression<Func<T, K>> k...
    method GroupBy (line 142) | public ILiteQueryable<T> GroupBy(BsonExpression keySelector)
    method Having (line 157) | public ILiteQueryable<T> Having(BsonExpression predicate)
    method Select (line 172) | public ILiteQueryableResult<BsonDocument> Select(BsonExpression selector)
    method Select (line 182) | public ILiteQueryableResult<K> Select<K>(Expression<Func<T, K>> selector)
    method ForUpdate (line 198) | public ILiteQueryableResult<T> ForUpdate()
    method Offset (line 207) | public ILiteQueryableResult<T> Offset(int offset)
    method Skip (line 216) | public ILiteQueryableResult<T> Skip(int offset) => this.Offset(offset);
    method Limit (line 221) | public ILiteQueryableResult<T> Limit(int limit)
    method ExecuteReader (line 234) | public IBsonDataReader ExecuteReader()
    method ToDocuments (line 244) | public IEnumerable<BsonDocument> ToDocuments()
    method ToEnumerable (line 258) | public IEnumerable<T> ToEnumerable()
    method ToList (line 276) | public List<T> ToList()
    method ToArray (line 284) | public T[] ToArray()
    method GetPlan (line 292) | public BsonDocument GetPlan()
    method Single (line 308) | public T Single()
    method SingleOrDefault (line 316) | public T SingleOrDefault()
    method First (line 324) | public T First()
    method FirstOrDefault (line 332) | public T FirstOrDefault()
    method Count (line 344) | public int Count()
    method LongCount (line 364) | public long LongCount()
    method Exists (line 384) | public bool Exists()
    method Into (line 405) | public int Into(string newCollection, BsonAutoId autoId = BsonAutoId.O...

FILE: LiteDB/Client/Database/LiteRepository.cs
  class LiteRepository (line 13) | public class LiteRepository : ILiteRepository
    method LiteRepository (line 31) | public LiteRepository(ILiteDatabase database)
    method LiteRepository (line 39) | public LiteRepository(string connectionString, BsonMapper mapper = null)
    method LiteRepository (line 47) | public LiteRepository(ConnectionString connectionString, BsonMapper ma...
    method LiteRepository (line 55) | public LiteRepository(Stream stream, BsonMapper mapper = null, Stream ...
    method Insert (line 67) | public BsonValue Insert<T>(T entity, string collectionName = null)
    method Insert (line 75) | public int Insert<T>(IEnumerable<T> entities, string collectionName = ...
    method Update (line 87) | public bool Update<T>(T entity, string collectionName = null)
    method Update (line 95) | public int Update<T>(IEnumerable<T> entities, string collectionName = ...
    method Upsert (line 107) | public bool Upsert<T>(T entity, string collectionName = null)
    method Upsert (line 115) | public int Upsert<T>(IEnumerable<T> entities, string collectionName = ...
    method Delete (line 127) | public bool Delete<T>(BsonValue id, string collectionName = null)
    method DeleteMany (line 135) | public int DeleteMany<T>(BsonExpression predicate, string collectionNa...
    method DeleteMany (line 143) | public int DeleteMany<T>(Expression<Func<T, bool>> predicate, string c...
    method Query (line 155) | public ILiteQueryable<T> Query<T>(string collectionName = null)
    method EnsureIndex (line 171) | public bool EnsureIndex<T>(string name, BsonExpression expression, boo...
    method EnsureIndex (line 182) | public bool EnsureIndex<T>(BsonExpression expression, bool unique = fa...
    method EnsureIndex (line 193) | public bool EnsureIndex<T, K>(Expression<Func<T, K>> keySelector, bool...
    method EnsureIndex (line 205) | public bool EnsureIndex<T, K>(string name, Expression<Func<T, K>> keyS...
    method SingleById (line 217) | public T SingleById<T>(BsonValue id, string collectionName = null)
    method Fetch (line 227) | public List<T> Fetch<T>(BsonExpression predicate, string collectionNam...
    method Fetch (line 237) | public List<T> Fetch<T>(Expression<Func<T, bool>> predicate, string co...
    method First (line 247) | public T First<T>(BsonExpression predicate, string collectionName = null)
    method First (line 257) | public T First<T>(Expression<Func<T, bool>> predicate, string collecti...
    method FirstOrDefault (line 267) | public T FirstOrDefault<T>(BsonExpression predicate, string collection...
    method FirstOrDefault (line 277) | public T FirstOrDefault<T>(Expression<Func<T, bool>> predicate, string...
    method Single (line 287) | public T Single<T>(BsonExpression predicate, string collectionName = n...
    method Single (line 297) | public T Single<T>(Expression<Func<T, bool>> predicate, string collect...
    method SingleOrDefault (line 307) | public T SingleOrDefault<T>(BsonExpression predicate, string collectio...
    method SingleOrDefault (line 317) | public T SingleOrDefault<T>(Expression<Func<T, bool>> predicate, strin...
    method Dispose (line 326) | public void Dispose()
    method Dispose (line 337) | protected virtual void Dispose(bool disposing)

FILE: LiteDB/Client/Mapper/Attributes/BsonCtorAttribute.cs
  class BsonCtorAttribute (line 9) | public class BsonCtorAttribute : Attribute

FILE: LiteDB/Client/Mapper/Attributes/BsonFieldAttribute.cs
  class BsonFieldAttribute (line 9) | public class BsonFieldAttribute : Attribute
    method BsonFieldAttribute (line 13) | public BsonFieldAttribute(string name)
    method BsonFieldAttribute (line 18) | public BsonFieldAttribute()

FILE: LiteDB/Client/Mapper/Attributes/BsonIdAttribute.cs
  class BsonIdAttribute (line 9) | public class BsonIdAttribute : Attribute
    method BsonIdAttribute (line 13) | public BsonIdAttribute()
    method BsonIdAttribute (line 18) | public BsonIdAttribute(bool autoId)

FILE: LiteDB/Client/Mapper/Attributes/BsonIgnoreAttribute.cs
  class BsonIgnoreAttribute (line 9) | public class BsonIgnoreAttribute : Attribute

FILE: LiteDB/Client/Mapper/Attributes/BsonRefAttribute.cs
  class BsonRefAttribute (line 9) | public class BsonRefAttribute : Attribute
    method BsonRefAttribute (line 13) | public BsonRefAttribute(string collection)
    method BsonRefAttribute (line 18) | public BsonRefAttribute()

FILE: LiteDB/Client/Mapper/BsonMapper.Deserialize.cs
  class BsonMapper (line 10) | public partial class BsonMapper
    method ToObject (line 64) | public virtual object ToObject(Type type, BsonDocument doc)
    method ToObject (line 77) | public virtual T ToObject<T>(BsonDocument doc)
    method Deserialize (line 85) | public T Deserialize<T>(BsonValue value)
    method Deserialize (line 97) | public object Deserialize(Type type, BsonValue value)
    method DeserializeArray (line 255) | private object DeserializeArray(Type type, BsonArray array)
    method DeserializeList (line 268) | private object DeserializeList(Type type, BsonArray value)
    method DeserializeDictionary (line 293) | private void DeserializeDictionary(Type K, Type T, IDictionary dict, B...
    method DeserializeObject (line 305) | private void DeserializeObject(EntityMapper entity, object obj, BsonDo...
    method DeserializeAnonymousType (line 324) | private object DeserializeAnonymousType(Type type, BsonDocument value)

FILE: LiteDB/Client/Mapper/BsonMapper.GetEntityMapper.cs
  class BsonMapper (line 10) | public partial class BsonMapper
    method GetEntityMapper (line 20) | internal EntityMapper GetEntityMapper(Type type)
    method BuildEntityMapper (line 59) | protected void BuildEntityMapper(EntityMapper mapper)
    method GetIdMember (line 149) | protected virtual MemberInfo GetIdMember(IEnumerable<MemberInfo> members)
    method GetTypeMembers (line 160) | protected virtual IEnumerable<MemberInfo> GetTypeMembers(Type type)
    method GetTypeCtor (line 190) | protected virtual CreateObject GetTypeCtor(EntityMapper mapper)

FILE: LiteDB/Client/Mapper/BsonMapper.Serialize.cs
  class BsonMapper (line 10) | public partial class BsonMapper
    method ToDocument (line 15) | public virtual BsonDocument ToDocument(Type type, object entity)
    method ToDocument (line 28) | public virtual BsonDocument ToDocument<T>(T entity)
    method Serialize (line 36) | public BsonValue Serialize<T>(T obj)
    method Serialize (line 44) | public BsonValue Serialize(Type type, object obj)
    method Serialize (line 49) | internal BsonValue Serialize(Type type, object obj, int depth)
    method SerializeArray (line 147) | private BsonArray SerializeArray(Type type, IEnumerable array, int depth)
    method SerializeDictionary (line 159) | private BsonDocument SerializeDictionary(Type type, IDictionary dict, ...
    method SerializeObject (line 179) | private BsonDocument SerializeObject(Type type, object obj, int depth)

FILE: LiteDB/Client/Mapper/BsonMapper.cs
  class BsonMapper (line 25) | public partial class BsonMapper
    method BsonMapper (line 105) | public BsonMapper(Func<Type, object> customTypeInstantiator = null, IT...
    method RegisterType (line 140) | public void RegisterType<T>(Func<T, BsonValue> serialize, Func<BsonVal...
    method RegisterType (line 149) | public void RegisterType(Type type, Func<object, BsonValue> serialize,...
    method Entity (line 160) | public EntityBuilder<T> Entity<T>()
    method GetExpression (line 170) | public BsonExpression GetExpression<T, K>(Expression<Func<T, K>> predi...
    method GetIndexExpression (line 184) | public BsonExpression GetIndexExpression<T, K>(Expression<Func<T, K>> ...
    method UseCamelCase (line 202) | public BsonMapper UseCamelCase()
    method UseLowerCaseDelimiter (line 214) | public BsonMapper UseLowerCaseDelimiter(char delimiter = '_')
    method RegisterDbRef (line 228) | internal static void RegisterDbRef(BsonMapper mapper, MemberMapper mem...
    method RegisterDbRefItem (line 245) | private static void RegisterDbRefItem(BsonMapper mapper, MemberMapper ...
    method RegisterDbRefList (line 314) | private static void RegisterDbRefList(BsonMapper mapper, MemberMapper ...

FILE: LiteDB/Client/Mapper/EntityBuilder.cs
  class EntityBuilder (line 13) | public class EntityBuilder<T>
    method EntityBuilder (line 19) | internal EntityBuilder(BsonMapper mapper, ITypeNameBinder typeNameBinder)
    method Ignore (line 29) | public EntityBuilder<T> Ignore<K>(Expression<Func<T, K>> member)
    method Field (line 41) | public EntityBuilder<T> Field<K>(Expression<Func<T, K>> member, string...
    method Id (line 54) | public EntityBuilder<T> Id<K>(Expression<Func<T, K>> member, bool auto...
    method Ctor (line 77) | public EntityBuilder<T> Ctor(Func<BsonDocument, T> createInstance)
    method DbRef (line 88) | public EntityBuilder<T> DbRef<K>(Expression<Func<T, K>> member, string...
    method GetMember (line 99) | private EntityBuilder<T> GetMember<TK, K>(Expression<Func<TK, K>> memb...

FILE: LiteDB/Client/Mapper/EntityMapper.cs
  class EntityMapper (line 15) | public class EntityMapper
    method EntityMapper (line 39) | public EntityMapper(Type forType, CancellationToken initializationToke...
    method GetMember (line 48) | public MemberMapper GetMember(Expression expr)
    method WaitForInitialization (line 53) | public void WaitForInitialization()

FILE: LiteDB/Client/Mapper/Linq/LinqExpressionVisitor.cs
  class LinqExpressionVisitor (line 13) | internal class LinqExpressionVisitor : ExpressionVisitor
    method LinqExpressionVisitor (line 47) | public LinqExpressionVisitor(BsonMapper mapper, Expression expr)
    method Resolve (line 62) | public BsonExpression Resolve(bool predicate)
    method VisitLambda (line 93) | protected override Expression VisitLambda<T>(Expression<T> node)
    method VisitInvocation (line 106) | protected override Expression VisitInvocation(InvocationExpression node)
    method VisitParameter (line 119) | protected override Expression VisitParameter(ParameterExpression node)
    method VisitMember (line 129) | protected override Expression VisitMember(MemberExpression node)
    method VisitMethodCall (line 182) | protected override Expression VisitMethodCall(MethodCallExpression node)
    method VisitConstant (line 234) | protected override Expression VisitConstant(ConstantExpression node)
    method VisitUnary (line 275) | protected override Expression VisitUnary(UnaryExpression node)
    method VisitNew (line 339) | protected override Expression VisitNew(NewExpression node)
    method VisitMemberInit (line 377) | protected override Expression VisitMemberInit(MemberInitExpression node)
    method VisitNewArray (line 407) | protected override Expression VisitNewArray(NewArrayExpression node)
    method VisitBinary (line 425) | protected override Expression VisitBinary(BinaryExpression node)
    method VisitConditional (line 462) | protected override Expression VisitConditional(ConditionalExpression n...
    method VisitCoalesce (line 478) | private Expression VisitCoalesce(BinaryExpression node)
    method VisitArrayIndex (line 492) | private Expression VisitArrayIndex(BinaryExpression node)
    method ResolvePattern (line 507) | private void ResolvePattern(string pattern, Expression obj, IList<Expr...
    method VisitEnumerablePredicate (line 541) | private void VisitEnumerablePredicate(LambdaExpression lambda)
    method GetOperator (line 587) | private string GetOperator(ExpressionType nodeType)
    method ResolveMember (line 613) | private string ResolveMember(MemberInfo member)
    method IsMethodIndexEval (line 639) | private bool IsMethodIndexEval(MethodCallExpression node, out Expressi...
    method VisitAsPredicate (line 672) | private void VisitAsPredicate(Expression expr, bool ensurePredicate)
    method Evaluate (line 695) | private object Evaluate(Expression expr, params Type[] validTypes)
    method TryGetResolver (line 729) | private bool TryGetResolver(Type declaringType, out ITypeResolver type...

FILE: LiteDB/Client/Mapper/Linq/ParameterExpressionVisitor.cs
  class ParameterExpressionVisitor (line 15) | internal class ParameterExpressionVisitor : ExpressionVisitor
    method VisitParameter (line 19) | protected override Expression VisitParameter(ParameterExpression node)
    method Test (line 26) | public static bool Test(Expression node)

FILE: LiteDB/Client/Mapper/Linq/TypeResolver/BsonValueResolver.cs
  class BsonValueResolver (line 12) | internal class BsonValueResolver : ITypeResolver
    method ResolveMethod (line 14) | public string ResolveMethod(MethodInfo method) => null;
    method ResolveMember (line 16) | public string ResolveMember(MemberInfo member)
    method ResolveCtor (line 54) | public string ResolveCtor(ConstructorInfo ctor) => null;

FILE: LiteDB/Client/Mapper/Linq/TypeResolver/ConvertResolver.cs
  class ConvertResolver (line 12) | internal class ConvertResolver : ITypeResolver
    method ResolveMethod (line 14) | public string ResolveMethod(MethodInfo method)
    method ResolveMember (line 32) | public string ResolveMember(MemberInfo member) => null;
    method ResolveCtor (line 33) | public string ResolveCtor(ConstructorInfo ctor) => null;

FILE: LiteDB/Client/Mapper/Linq/TypeResolver/DateTimeResolver.cs
  class DateTimeResolver (line 12) | internal class DateTimeResolver : ITypeResolver
    method ResolveMethod (line 14) | public string ResolveMethod(MethodInfo method)
    method ResolveMember (line 40) | public string ResolveMember(MemberInfo member)
    method ResolveCtor (line 64) | public string ResolveCtor(ConstructorInfo ctor)

FILE: LiteDB/Client/Mapper/Linq/TypeResolver/EnumerableResolver.cs
  class EnumerableResolver (line 12) | internal class EnumerableResolver : ITypeResolver
    method ResolveMethod (line 14) | public virtual string ResolveMethod(MethodInfo method)
    method ResolveMember (line 81) | public virtual string ResolveMember(MemberInfo member)
    method ResolveCtor (line 94) | public string ResolveCtor(ConstructorInfo ctor) => null;

FILE: LiteDB/Client/Mapper/Linq/TypeResolver/GuidResolver.cs
  class GuidResolver (line 12) | internal class GuidResolver : ITypeResolver
    method ResolveMethod (line 14) | public string ResolveMethod(MethodInfo method)
    method ResolveMember (line 31) | public string ResolveMember(MemberInfo member)
    method ResolveCtor (line 42) | public string ResolveCtor(ConstructorInfo ctor)

FILE: LiteDB/Client/Mapper/Linq/TypeResolver/ICollectionResolver.cs
  class ICollectionResolver (line 12) | internal class ICollectionResolver : EnumerableResolver
    method ResolveMethod (line 14) | public override string ResolveMethod(MethodInfo method)

FILE: LiteDB/Client/Mapper/Linq/TypeResolver/ITypeResolver.cs
  type ITypeResolver (line 13) | internal interface ITypeResolver
    method ResolveMethod (line 15) | string ResolveMethod(MethodInfo method);
    method ResolveMember (line 17) | string ResolveMember(MemberInfo member);
    method ResolveCtor (line 19) | string ResolveCtor(ConstructorInfo ctor);

FILE: LiteDB/Client/Mapper/Linq/TypeResolver/MathResolver.cs
  class MathResolver (line 12) | internal class MathResolver : ITypeResolver
    method ResolveMethod (line 14) | public string ResolveMethod(MethodInfo method)
    method ResolveMember (line 30) | public string ResolveMember(MemberInfo member) => null;
    method ResolveCtor (line 31) | public string ResolveCtor(ConstructorInfo ctor) => null;

FILE: LiteDB/Client/Mapper/Linq/TypeResolver/NullableResolver.cs
  class NullableResolver (line 12) | internal class NullableResolver : ITypeResolver
    method ResolveMethod (line 14) | public string ResolveMethod(MethodInfo method)
    method ResolveMember (line 19) | public string ResolveMember(MemberInfo member)
    method ResolveCtor (line 30) | public string ResolveCtor(ConstructorInfo ctor) => null;

FILE: LiteDB/Client/Mapper/Linq/TypeResolver/NumberResolver.cs
  class NumberResolver (line 12) | internal class NumberResolver : ITypeResolver
    method NumberResolver (line 16) | public NumberResolver(string parseMethod)
    method ResolveMethod (line 21) | public string ResolveMethod(MethodInfo method)
    method ResolveMember (line 40) | public string ResolveMember(MemberInfo member) => null;
    method ResolveCtor (line 41) | public string ResolveCtor(ConstructorInfo ctor) => null;

FILE: LiteDB/Client/Mapper/Linq/TypeResolver/ObjectIdResolver.cs
  class ObjectIdResolver (line 12) | internal class ObjectIdResolver : ITypeResolver
    method ResolveMethod (line 14) | public string ResolveMethod(MethodInfo method)
    method ResolveMember (line 26) | public string ResolveMember(MemberInfo member)
    method ResolveCtor (line 40) | public string ResolveCtor(ConstructorInfo ctor)

FILE: LiteDB/Client/Mapper/Linq/TypeResolver/RegexResolver.cs
  class RegexResolver (line 13) | internal class RegexResolver : ITypeResolver
    method ResolveMethod (line 15) | public string ResolveMethod(MethodInfo method)
    method ResolveMember (line 27) | public string ResolveMember(MemberInfo member) => null;
    method ResolveCtor (line 28) | public string ResolveCtor(ConstructorInfo ctor) => null;

FILE: LiteDB/Client/Mapper/Linq/TypeResolver/StringResolver.cs
  class StringResolver (line 13) | internal class StringResolver : ITypeResolver
    method ResolveMethod (line 15) | public string ResolveMethod(MethodInfo method)
    method ResolveMember (line 50) | public string ResolveMember(MemberInfo member)
    method ResolveCtor (line 61) | public string ResolveCtor(ConstructorInfo ctor) => null;

FILE: LiteDB/Client/Mapper/MemberMapper.cs
  class MemberMapper (line 10) | public class MemberMapper

FILE: LiteDB/Client/Mapper/Reflection/Reflection.Expression.cs
  class Reflection (line 14) | internal partial class Reflection
    method CreateClass (line 16) | public static CreateObject CreateClass(Type type)
    method CreateStruct (line 23) | public static CreateObject CreateStruct(Type type)
    method CreateGenericGetter (line 32) | public static GenericGetter CreateGenericGetter(Type type, MemberInfo ...
    method CreateGenericSetter (line 45) | public static GenericSetter CreateGenericSetter(Type type, MemberInfo ...

FILE: LiteDB/Client/Mapper/Reflection/Reflection.cs
  class Reflection (line 26) | internal partial class Reflection
    method CreateInstance (line 35) | public static object CreateInstance(Type type)
    method IsNullable (line 135) | public static bool IsNullable(Type type)
    method UnderlyingTypeOf (line 145) | public static Type UnderlyingTypeOf(Type type)
    method GetGenericListOfType (line 152) | public static Type GetGenericListOfType(Type type)
    method GetGenericSetOfType (line 158) | public static Type GetGenericSetOfType(Type type)
    method GetGenericDictionaryOfType (line 164) | public static Type GetGenericDictionaryOfType(Type k, Type v)
    method GetListItemType (line 173) | public static Type GetListItemType(Type listType)
    method IsEnumerable (line 197) | public static bool IsEnumerable(Type type)
    method IsSimpleType (line 220) | public static bool IsSimpleType(Type type)
    method IsCollection (line 244) | public static bool IsCollection(Type type)
    method IsDictionary (line 254) | public static bool IsDictionary(Type type)
    method SelectMember (line 264) | public static MemberInfo SelectMember(IEnumerable<MemberInfo> members,...
    method MethodName (line 288) | public static string MethodName(MethodInfo method, int skipParameters ...
    method MethodNameInternal (line 306) | private static string MethodNameInternal(MethodInfo method, int skipPa...
    method FriendlyTypeName (line 338) | private static string FriendlyTypeName(Type type)

FILE: LiteDB/Client/Mapper/TypeNameBinder/DefaultTypeNameBinder.cs
  class DefaultTypeNameBinder (line 7) | public class DefaultTypeNameBinder : ITypeNameBinder
    method DefaultTypeNameBinder (line 53) | private DefaultTypeNameBinder()
    method GetName (line 57) | public string GetName(Type type) => type.FullName + ", " + type.GetTyp...
    method GetType (line 59) | public Type GetType(string name)

FILE: LiteDB/Client/Mapper/TypeNameBinder/ITypeNameBinder.cs
  type ITypeNameBinder (line 5) | public interface ITypeNameBinder
    method GetName (line 7) | string GetName(Type type);
    method GetType (line 8) | Type GetType(string name);

FILE: LiteDB/Client/Shared/SharedDataReader.cs
  class SharedDataReader (line 9) | public class SharedDataReader : IBsonDataReader
    method SharedDataReader (line 16) | public SharedDataReader(IBsonDataReader reader, Action dispose)
    method Read (line 30) | public bool Read() => _reader.Read();
    method Dispose (line 32) | public void Dispose()
    method Dispose (line 43) | protected virtual void Dispose(bool disposing)

FILE: LiteDB/Client/Shared/SharedEngine.cs
  class SharedEngine (line 13) | public class SharedEngine : ILiteEngine
    method SharedEngine (line 20) | public SharedEngine(EngineSettings settings)
    method OpenDatabase (line 50) | private bool OpenDatabase()
    method CloseDatabase (line 82) | private void CloseDatabase()
    method BeginTrans (line 98) | public bool BeginTrans()
    method Commit (line 115) | public bool Commit()
    method Rollback (line 130) | public bool Rollback()
    method Query (line 149) | public IBsonDataReader Query(string collection, Query query)
    method Pragma (line 164) | public BsonValue Pragma(string name)
    method Pragma (line 169) | public bool Pragma(string name, BsonValue value)
    method Checkpoint (line 178) | public int Checkpoint()
    method Rebuild (line 183) | public long Rebuild(RebuildOptions options)
    method Insert (line 188) | public int Insert(string collection, IEnumerable<BsonDocument> docs, B...
    method Update (line 193) | public int Update(string collection, IEnumerable<BsonDocument> docs)
    method UpdateMany (line 198) | public int UpdateMany(string collection, BsonExpression extend, BsonEx...
    method Upsert (line 203) | public int Upsert(string collection, IEnumerable<BsonDocument> docs, B...
    method Delete (line 208) | public int Delete(string collection, IEnumerable<BsonValue> ids)
    method DeleteMany (line 213) | public int DeleteMany(string collection, BsonExpression predicate)
    method DropCollection (line 218) | public bool DropCollection(string name)
    method RenameCollection (line 223) | public bool RenameCollection(string name, string newName)
    method DropIndex (line 228) | public bool DropIndex(string collection, string name)
    method EnsureIndex (line 233) | public bool EnsureIndex(string collection, string name, BsonExpression...
    method Dispose (line 240) | public void Dispose()
    method Dispose (line 251) | protected virtual void Dispose(bool disposing)
    method QueryDatabase (line 264) | private T QueryDatabase<T>(Func<T> Query)

FILE: LiteDB/Client/SqlParser/Commands/Begin.cs
  class SqlParser (line 9) | internal partial class SqlParser
    method ParseBegin (line 14) | private BsonDataReader ParseBegin()

FILE: LiteDB/Client/SqlParser/Commands/Checkpoint.cs
  class SqlParser (line 9) | internal partial class SqlParser
    method ParseCheckpoint (line 14) | private BsonDataReader ParseCheckpoint()

FILE: LiteDB/Client/SqlParser/Commands/Commit.cs
  class SqlParser (line 9) | internal partial class SqlParser
    method ParseCommit (line 14) | private BsonDataReader ParseCommit()

FILE: LiteDB/Client/SqlParser/Commands/Create.cs
  class SqlParser (line 9) | internal partial class SqlParser
    method ParseCreate (line 14) | private BsonDataReader ParseCreate()

FILE: LiteDB/Client/SqlParser/Commands/Delete.cs
  class SqlParser (line 9) | internal partial class SqlParser
    method ParseDelete (line 14) | private BsonDataReader ParseDelete()

FILE: LiteDB/Client/SqlParser/Commands/Drop.cs
  class SqlParser (line 9) | internal partial class SqlParser
    method ParseDrop (line 15) | private BsonDataReader ParseDrop()

FILE: LiteDB/Client/SqlParser/Commands/Insert.cs
  class SqlParser (line 9) | internal partial class SqlParser
    method ParseInsert (line 14) | private BsonDataReader ParseInsert()
    method ParseWithAutoId (line 37) | private BsonAutoId ParseWithAutoId()

FILE: LiteDB/Client/SqlParser/Commands/ParseLists.cs
  class SqlParser (line 10) | internal partial class SqlParser
    method ParseListOfExpressions (line 15) | private IEnumerable<BsonExpression> ParseListOfExpressions()
    method ParseListOfDocuments (line 39) | private IEnumerable<BsonDocument> ParseListOfDocuments()

FILE: LiteDB/Client/SqlParser/Commands/Pragma.cs
  class SqlParser (line 10) | internal partial class SqlParser
    method ParsePragma (line 16) | private IBsonDataReader ParsePragma()

FILE: LiteDB/Client/SqlParser/Commands/Rebuild.cs
  class SqlParser (line 9) | internal partial class SqlParser
    method ParseRebuild (line 14) | private BsonDataReader ParseRebuild()

FILE: LiteDB/Client/SqlParser/Commands/Rename.cs
  class SqlParser (line 9) | internal partial class SqlParser
    method ParseRename (line 14) | private BsonDataReader ParseRename()

FILE: LiteDB/Client/SqlParser/Commands/Rollback.cs
  class SqlParser (line 9) | internal partial class SqlParser
    method ParseRollback (line 14) | private BsonDataReader ParseRollback()

FILE: LiteDB/Client/SqlParser/Commands/Select.cs
  class SqlParser (line 10) | internal partial class SqlParser
    method ParseSelect (line 26) | private IBsonDataReader ParseSelect()
    method ParseCollection (line 185) | public static string ParseCollection(Tokenizer tokenizer)
    method ParseCollection (line 193) | public static string ParseCollection(Tokenizer tokenizer, out string n...

FILE: LiteDB/Client/SqlParser/Commands/Update.cs
  class SqlParser (line 9) | internal partial class SqlParser
    method ParseUpdate (line 18) | private BsonDataReader ParseUpdate()

FILE: LiteDB/Client/SqlParser/SqlParser.cs
  class SqlParser (line 13) | internal partial class SqlParser
    method SqlParser (line 20) | public SqlParser(ILiteEngine engine, Tokenizer tokenizer, BsonDocument...
    method Execute (line 28) | public IBsonDataReader Execute()

FILE: LiteDB/Client/Storage/ILiteStorage.cs
  type ILiteStorage (line 8) | public interface ILiteStorage<TFileId>
    method FindById (line 13) | LiteFileInfo<TFileId> FindById(TFileId id);
    method Find (line 18) | IEnumerable<LiteFileInfo<TFileId>> Find(BsonExpression predicate);
    method Find (line 23) | IEnumerable<LiteFileInfo<TFileId>> Find(string predicate, BsonDocument...
    method Find (line 28) | IEnumerable<LiteFileInfo<TFileId>> Find(string predicate, params BsonV...
    method Find (line 33) | IEnumerable<LiteFileInfo<TFileId>> Find(Expression<Func<LiteFileInfo<T...
    method FindAll (line 38) | IEnumerable<LiteFileInfo<TFileId>> FindAll();
    method Exists (line 43) | bool Exists(TFileId id);
    method OpenWrite (line 48) | LiteFileStream<TFileId> OpenWrite(TFileId id, string filename, BsonDoc...
    method Upload (line 53) | LiteFileInfo<TFileId> Upload(TFileId id, string filename, Stream strea...
    method Upload (line 58) | LiteFileInfo<TFileId> Upload(TFileId id, string filename);
    method SetMetadata (line 63) | bool SetMetadata(TFileId id, BsonDocument metadata);
    method OpenRead (line 68) | LiteFileStream<TFileId> OpenRead(TFileId id);
    method Download (line 73) | LiteFileInfo<TFileId> Download(TFileId id, Stream stream);
    method Download (line 78) | LiteFileInfo<TFileId> Download(TFileId id, string filename, bool overw...
    method Delete (line 83) | bool Delete(TFileId id);

FILE: LiteDB/Client/Storage/LiteFileInfo.cs
  class LiteFileInfo (line 12) | public class LiteFileInfo<TFileId>
    method SetReference (line 39) | internal void SetReference(BsonValue fileId, ILiteCollection<LiteFileI...
    method OpenRead (line 49) | public LiteFileStream<TFileId> OpenRead()
    method OpenWrite (line 57) | public LiteFileStream<TFileId> OpenWrite()
    method CopyTo (line 65) | public void CopyTo(Stream stream)
    method SaveAs (line 78) | public void SaveAs(string filename, bool overwritten = true)

FILE: LiteDB/Client/Storage/LiteFileStream.Read.cs
  class LiteFileStream (line 9) | public partial class LiteFileStream<TFileId> : Stream
    method Read (line 12) | public override int Read(byte[] buffer, int offset, int count)
    method GetChunkData (line 44) | private byte[] GetChunkData(int index)
    method SetReadStreamPosition (line 59) | private void SetReadStreamPosition(long newPosition)

FILE: LiteDB/Client/Storage/LiteFileStream.Write.cs
  class LiteFileStream (line 8) | public partial class LiteFileStream<TFileId> : Stream
    method Write (line 10) | public override void Write(byte[] buffer, int offset, int count)
    method Flush (line 22) | public override void Flush()
    method WriteChunks (line 31) | private void WriteChunks(bool flush)

FILE: LiteDB/Client/Storage/LiteFileStream.cs
  class LiteFileStream (line 8) | public partial class LiteFileStream<TFileId> : Stream
    method LiteFileStream (line 27) | internal LiteFileStream(ILiteCollection<LiteFileInfo<TFileId>> files, ...
    method Seek (line 77) | public override long Seek(long offset, SeekOrigin origin)
    method Dispose (line 103) | protected override void Dispose(bool disposing)
    method SetLength (line 122) | public override void SetLength(long value)

FILE: LiteDB/Client/Storage/LiteStorage.cs
  class LiteStorage (line 13) | public class LiteStorage<TFileId> : ILiteStorage<TFileId>
    method LiteStorage (line 19) | public LiteStorage(ILiteDatabase db, string filesCollection, string ch...
    method FindById (line 31) | public LiteFileInfo<TFileId> FindById(TFileId id)
    method Find (line 49) | public IEnumerable<LiteFileInfo<TFileId>> Find(BsonExpression predicate)
    method Find (line 71) | public IEnumerable<LiteFileInfo<TFileId>> Find(string predicate, BsonD...
    method Find (line 76) | public IEnumerable<LiteFileInfo<TFileId>> Find(string predicate, param...
    method Find (line 81) | public IEnumerable<LiteFileInfo<TFileId>> Find(Expression<Func<LiteFil...
    method FindAll (line 86) | public IEnumerable<LiteFileInfo<TFileId>> FindAll() => this.Find((Bson...
    method Exists (line 91) | public bool Exists(TFileId id)
    method OpenWrite (line 107) | public LiteFileStream<TFileId> OpenWrite(TFileId id, string filename, ...
    method Upload (line 142) | public LiteFileInfo<TFileId> Upload(TFileId id, string filename, Strea...
    method Upload (line 155) | public LiteFileInfo<TFileId> Upload(TFileId id, string filename)
    method SetMetadata (line 168) | public bool SetMetadata(TFileId id, BsonDocument metadata)
    method OpenRead (line 188) | public LiteFileStream<TFileId> OpenRead(TFileId id)
    method Download (line 200) | public LiteFileInfo<TFileId> Download(TFileId id, Stream stream)
    method Download (line 212) | public LiteFileInfo<TFileId> Download(TFileId id, string filename, boo...
    method Delete (line 228) | public bool Delete(TFileId id)

FILE: LiteDB/Client/Structures/ConnectionString.cs
  class ConnectionString (line 12) | public class ConnectionString
    method ConnectionString (line 59) | public ConnectionString()
    method ConnectionString (line 67) | public ConnectionString(string connectionString)
    method CreateEngine (line 110) | internal ILiteEngine CreateEngine(Action<EngineSettings> engineSetting...

FILE: LiteDB/Client/Structures/ConnectionType.cs
  type ConnectionType (line 9) | public enum ConnectionType

FILE: LiteDB/Client/Structures/Query.cs
  class Query (line 14) | public partial class Query
    method All (line 29) | public static Query All()
    method All (line 37) | public static Query All(int order = Ascending)
    method All (line 45) | public static Query All(string field, int order = Ascending)
    method EQ (line 53) | public static BsonExpression EQ(string field, BsonValue value)
    method LT (line 63) | public static BsonExpression LT(string field, BsonValue value)
    method LTE (line 73) | public static BsonExpression LTE(string field, BsonValue value)
    method GT (line 83) | public static BsonExpression GT(string field, BsonValue value)
    method GTE (line 93) | public static BsonExpression GTE(string field, BsonValue value)
    method Between (line 103) | public static BsonExpression Between(string field, BsonValue start, Bs...
    method StartsWith (line 113) | public static BsonExpression StartsWith(string field, string value)
    method Contains (line 124) | public static BsonExpression Contains(string field, string value)
    method Not (line 135) | public static BsonExpression Not(string field, BsonValue value)
    method In (line 145) | public static BsonExpression In(string field, BsonArray value)
    method In (line 156) | public static BsonExpression In(string field, params BsonValue[] values)
    method In (line 164) | public static BsonExpression In(string field, IEnumerable<BsonValue> v...
    method Any (line 172) | public static QueryAny Any() => new QueryAny();
    method And (line 177) | public static BsonExpression And(BsonExpression left, BsonExpression r...
    method And (line 188) | public static BsonExpression And(params BsonExpression[] queries)
    method Or (line 205) | public static BsonExpression Or(BsonExpression left, BsonExpression ri...
    method Or (line 216) | public static BsonExpression Or(params BsonExpression[] queries)

FILE: LiteDB/Client/Structures/QueryAny.cs
  class QueryAny (line 9) | public class QueryAny
    method EQ (line 14) | public BsonExpression EQ(string arrayField, BsonValue value)
    method LT (line 24) | public BsonExpression LT(string arrayField, BsonValue value)
    method LTE (line 34) | public BsonExpression LTE(string arrayField, BsonValue value)
    method GT (line 44) | public BsonExpression GT(string arrayField, BsonValue value)
    method GTE (line 55) | public BsonExpression GTE(string arrayField, BsonValue value)
    method Between (line 65) | public BsonExpression Between(string arrayField, BsonValue start, Bson...
    method StartsWith (line 75) | public BsonExpression StartsWith(string arrayField, string value)
    method Not (line 86) | public BsonExpression Not(string arrayField, BsonValue value)

FILE: LiteDB/Document/Bson/BsonSerializer.cs
  class BsonSerializer (line 13) | public class BsonSerializer
    method Serialize (line 18) | public static byte[] Serialize(BsonDocument doc)
    method Deserialize (line 35) | public static BsonDocument Deserialize(byte[] buffer, bool utcDate = f...

FILE: LiteDB/Document/BsonArray.cs
  class BsonArray (line 9) | public class BsonArray : BsonValue, IList<BsonValue>
    method BsonArray (line 11) | public BsonArray()
    method BsonArray (line 16) | public BsonArray(List<BsonValue> array)
    method BsonArray (line 24) | public BsonArray(params BsonValue[] array)
    method BsonArray (line 32) | public BsonArray(IEnumerable<BsonValue> items)
    method Add (line 58) | public void Add(BsonValue item) => this.RawValue.Add(item ?? BsonValue...
    method AddRange (line 60) | public void AddRange<TCollection>(TCollection collection)
    method AddRange (line 81) | public void AddRange(IEnumerable<BsonValue> items)
    method Clear (line 91) | public void Clear() => this.RawValue.Clear();
    method Contains (line 93) | public bool Contains(BsonValue item) => this.RawValue.Contains(item ??...
    method CopyTo (line 95) | public void CopyTo(BsonValue[] array, int arrayIndex) => this.RawValue...
    method GetEnumerator (line 97) | public IEnumerator<BsonValue> GetEnumerator() => this.RawValue.GetEnum...
    method IndexOf (line 99) | public int IndexOf(BsonValue item) => this.RawValue.IndexOf(item ?? Bs...
    method Insert (line 101) | public void Insert(int index, BsonValue item) => this.RawValue.Insert(...
    method Remove (line 103) | public bool Remove(BsonValue item) => this.RawValue.Remove(item);
    method RemoveAt (line 105) | public void RemoveAt(int index) => this.RawValue.RemoveAt(index);
    method GetEnumerator (line 107) | IEnumerator IEnumerable.GetEnumerator()
    method CompareTo (line 115) | public override int CompareTo(BsonValue other)
    method GetBytesCount (line 137) | internal override int GetBytesCount(bool recalc)

FILE: LiteDB/Document/BsonAutoId.cs
  type BsonAutoId (line 6) | public enum BsonAutoId

FILE: LiteDB/Document/BsonDocument.cs
  class BsonDocument (line 12) | public class BsonDocument : BsonValue, IDictionary<string, BsonValue>
    method BsonDocument (line 14) | public BsonDocument()
    method BsonDocument (line 19) | public BsonDocument(ConcurrentDictionary<string, BsonValue> dict)
    method BsonDocument (line 30) | public BsonDocument(IDictionary<string, BsonValue> dict)
    method CompareTo (line 65) | public override int CompareTo(BsonValue other)
    method ContainsKey (line 105) | public bool ContainsKey(string key) => this.RawValue.ContainsKey(key);
    method GetElements (line 110) | public IEnumerable<KeyValuePair<string, BsonValue>> GetElements()
    method Add (line 123) | public void Add(string key, BsonValue value) => this.RawValue.Add(key,...
    method Remove (line 125) | public bool Remove(string key) => this.RawValue.Remove(key);
    method Clear (line 127) | public void Clear() => this.RawValue.Clear();
    method TryGetValue (line 129) | public bool TryGetValue(string key, out BsonValue value) => this.RawVa...
    method Add (line 131) | public void Add(KeyValuePair<string, BsonValue> item) => this.Add(item...
    method Contains (line 133) | public bool Contains(KeyValuePair<string, BsonValue> item) => this.Raw...
    method Remove (line 135) | public bool Remove(KeyValuePair<string, BsonValue> item) => this.Remov...
    method GetEnumerator (line 137) | public IEnumerator<KeyValuePair<string, BsonValue>> GetEnumerator() =>...
    method GetEnumerator (line 139) | IEnumerator IEnumerable.GetEnumerator() => this.RawValue.GetEnumerator();
    method CopyTo (line 141) | public void CopyTo(KeyValuePair<string, BsonValue>[] array, int arrayI...
    method CopyTo (line 146) | public void CopyTo(BsonDocument other)
    method GetBytesCount (line 158) | internal override int GetBytesCount(bool recalc)

FILE: LiteDB/Document/BsonType.cs
  type BsonType (line 6) | public enum BsonType : byte

FILE: LiteDB/Document/BsonValue.cs
  class BsonValue (line 14) | public class BsonValue : IComparable<BsonValue>, IEquatable<BsonValue>
    method DbRef (line 36) | public static BsonDocument DbRef(BsonValue id, string collection) => n...
    method BsonValue (line 50) | public BsonValue()
    method BsonValue (line 56) | public BsonValue(Int32 value)
    method BsonValue (line 62) | public BsonValue(Int64 value)
    method BsonValue (line 68) | public BsonValue(Double value)
    method BsonValue (line 74) | public BsonValue(Decimal value)
    method BsonValue (line 80) | public BsonValue(String value)
    method BsonValue (line 86) | public BsonValue(Byte[] value)
    method BsonValue (line 92) | public BsonValue(ObjectId value)
    method BsonValue (line 98) | public BsonValue(Guid value)
    method BsonValue (line 104) | public BsonValue(Boolean value)
    method BsonValue (line 110) | public BsonValue(DateTime value)
    method BsonValue (line 116) | protected BsonValue(BsonType type, object rawValue)
    method BsonValue (line 122) | public BsonValue(object value)
    method ToString (line 514) | public override string ToString()
    method CompareTo (line 523) | public virtual int CompareTo(BsonValue other)
    method CompareTo (line 528) | public virtual int CompareTo(BsonValue other, Collation collation)
    method Equals (line 581) | public bool Equals(BsonValue other)
    method Equals (line 623) | public override bool Equals(object obj)
    method GetHashCode (line 633) | public override int GetHashCode()
    method GetBytesCount (line 649) | internal virtual int GetBytesCount(bool recalc)
    method GetBytesCountElement (line 681) | protected int GetBytesCountElement(string key, BsonValue value)

FILE: LiteDB/Document/DataReader/BsonDataReader.cs
  class BsonDataReader (line 13) | public class BsonDataReader : IBsonDataReader
    method BsonDataReader (line 28) | internal BsonDataReader()
    method BsonDataReader (line 36) | internal BsonDataReader(BsonValue value, string collection = null)
    method BsonDataReader (line 46) | internal BsonDataReader(IEnumerable<BsonValue> values, string collecti...
    method Read (line 87) | public bool Read()
    method Dispose (line 129) | public void Dispose()
    method Dispose (line 140) | protected virtual void Dispose(bool disposing)

FILE: LiteDB/Document/DataReader/BsonDataReaderExtensions.cs
  class BsonDataReaderExtensions (line 13) | public static class BsonDataReaderExtensions
    method ToEnumerable (line 15) | public static IEnumerable<BsonValue> ToEnumerable(this IBsonDataReader...
    method ToArray (line 30) | public static BsonValue[] ToArray(this IBsonDataReader reader) => ToEn...
    method ToList (line 32) | public static IList<BsonValue> ToList(this IBsonDataReader reader) => ...
    method First (line 34) | public static BsonValue First(this IBsonDataReader reader) => ToEnumer...
    method FirstOrDefault (line 36) | public static BsonValue FirstOrDefault(this IBsonDataReader reader) =>...
    method Single (line 38) | public static BsonValue Single(this IBsonDataReader reader) => ToEnume...
    method SingleOrDefault (line 40) | public static BsonValue SingleOrDefault(this IBsonDataReader reader) =...

FILE: LiteDB/Document/DataReader/IBsonDataReader.cs
  type IBsonDataReader (line 5) | public interface IBsonDataReader : IDisposable
    method Read (line 13) | bool Read();

FILE: LiteDB/Document/Expression/BsonExpression.cs
  class BsonExpression (line 28) | public sealed class BsonExpression
    method DefaultFieldName (line 130) | internal string DefaultFieldName()
    method BsonExpression (line 140) | internal BsonExpression()
    method Execute (line 165) | public IEnumerable<BsonValue> Execute(Collation collation = null)
    method Execute (line 176) | public IEnumerable<BsonValue> Execute(BsonDocument root, Collation col...
    method Execute (line 188) | public IEnumerable<BsonValue> Execute(IEnumerable<BsonDocument> source...
    method Execute (line 198) | internal IEnumerable<BsonValue> Execute(IEnumerable<BsonDocument> sour...
    method GetIndexKeys (line 221) | internal IEnumerable<BsonValue> GetIndexKeys(BsonDocument doc, Collati...
    method ExecuteScalar (line 233) | public BsonValue ExecuteScalar(Collation collation = null)
    method ExecuteScalar (line 244) | public BsonValue ExecuteScalar(BsonDocument root, Collation collation ...
    method ExecuteScalar (line 256) | public BsonValue ExecuteScalar(IEnumerable<BsonDocument> source, Colla...
    method ExecuteScalar (line 266) | internal BsonValue ExecuteScalar(IEnumerable<BsonDocument> source, Bso...
    method Create (line 288) | public static BsonExpression Create(string expression)
    method Create (line 296) | public static BsonExpression Create(string expression, params BsonValu...
    method Create (line 311) | public static BsonExpression Create(string expression, BsonDocument pa...
    method Create (line 327) | internal static BsonExpression Create(Tokenizer tokenizer, BsonExpress...
    method ParseAndCompile (line 337) | internal static BsonExpression ParseAndCompile(Tokenizer tokenizer, Bs...
    method Compile (line 355) | internal static void Compile(BsonExpression expr, ExpressionContext co...
    method SetParameters (line 390) | internal static void SetParameters(BsonExpression expr, BsonDocument p...
    method GetMethod (line 422) | internal static MethodInfo GetMethod(string name, int parameterCount)
    method GetFunction (line 449) | internal static MethodInfo GetFunction(string name, int parameterCount...
    method ToString (line 458) | public override string ToString()

FILE: LiteDB/Document/Expression/Methods/Aggregate.cs
  class BsonExpressionMethods (line 11) | internal partial class BsonExpressionMethods
    method COUNT (line 16) | public static BsonValue COUNT(IEnumerable<BsonValue> values)
    method MIN (line 24) | public static BsonValue MIN(IEnumerable<BsonValue> values)
    method MAX (line 42) | public static BsonValue MAX(IEnumerable<BsonValue> values)
    method FIRST (line 60) | public static BsonValue FIRST(IEnumerable<BsonValue> values)
    method LAST (line 68) | public static BsonValue LAST(IEnumerable<BsonValue> values)
    method AVG (line 76) | public static BsonValue AVG(IEnumerable<BsonValue> values)
    method SUM (line 100) | public static BsonValue SUM(IEnumerable<BsonValue> values)
    method ANY (line 116) | public static BsonValue ANY(IEnumerable<BsonValue> values)

FILE: LiteDB/Document/Expression/Methods/DataTypes.cs
  class BsonExpressionMethods (line 12) | internal partial class BsonExpressionMethods
    method MINVALUE (line 19) | public static BsonValue MINVALUE() =>  BsonValue.MinValue;
    method OBJECTID (line 24) | [Volatile]
    method GUID (line 30) | [Volatile]
    method NOW (line 36) | [Volatile]
    method NOW_UTC (line 42) | [Volatile]
    method TODAY (line 48) | [Volatile]
    method MAXVALUE (line 54) | public static BsonValue MAXVALUE() => BsonValue.MaxValue;
    method INT32 (line 66) | public static BsonValue INT32(BsonValue value)
    method INT64 (line 86) | public static BsonValue INT64(BsonValue value)
    method DOUBLE (line 106) | public static BsonValue DOUBLE(Collation collation, BsonValue value)
    method DOUBLE (line 126) | public static BsonValue DOUBLE(BsonValue value, BsonValue culture)
    method DECIMAL (line 148) | public static BsonValue DECIMAL(Collation collation, BsonValue value)
    method DECIMAL (line 168) | public static BsonValue DECIMAL(BsonValue value, BsonValue culture)
    method STRING (line 190) | public static BsonValue STRING(BsonValue value)
    method ARRAY (line 203) | public static BsonValue ARRAY(IEnumerable<BsonValue> values)
    method BINARY (line 211) | public static BsonValue BINARY(BsonValue value)
    method OBJECTID (line 240) | public static BsonValue OBJECTID(BsonValue value)
    method GUID (line 269) | public static BsonValue GUID(BsonValue value)
    method BOOLEAN (line 298) | public static BsonValue BOOLEAN(BsonValue value)
    method DATETIME (line 327) | public static BsonValue DATETIME(Collation collation, BsonValue value)
    method DATETIME (line 347) | public static BsonValue DATETIME(BsonValue value, BsonValue culture)
    method DATETIME_UTC (line 369) | public static BsonValue DATETIME_UTC(Collation collation, BsonValue va...
    method DATETIME_UTC (line 389) | public static BsonValue DATETIME_UTC(BsonValue value, BsonValue culture)
    method DATETIME (line 411) | public static BsonValue DATETIME(BsonValue year, BsonValue month, Bson...
    method DATETIME_UTC (line 424) | public static BsonValue DATETIME_UTC(BsonValue year, BsonValue month, ...
    method IS_MINVALUE (line 441) | public static BsonValue IS_MINVALUE(BsonValue value) => value.IsMinValue;
    method IS_NULL (line 446) | public static BsonValue IS_NULL(BsonValue value) => value.IsNull;
    method IS_INT32 (line 451) | public static BsonValue IS_INT32(BsonValue value) => value.IsInt32;
    method IS_INT64 (line 456) | public static BsonValue IS_INT64(BsonValue value) => value.IsInt64;
    method IS_DOUBLE (line 461) | public static BsonValue IS_DOUBLE(BsonValue value) => value.IsDouble;
    method IS_DECIMAL (line 466) | public static BsonValue IS_DECIMAL(BsonValue value) => value.IsDecimal;
    method IS_NUMBER (line 471) | public static BsonValue IS_NUMBER(BsonValue value) => value.IsNumber;
    method IS_STRING (line 476) | public static BsonValue IS_STRING(BsonValue value) => value.IsString;
    method IS_DOCUMENT (line 481) | public static BsonValue IS_DOCUMENT(BsonValue value) => value.IsDocument;
    method IS_ARRAY (line 486) | public static BsonValue IS_ARRAY(BsonValue value) => value.IsArray;
    method IS_BINARY (line 491) | public static BsonValue IS_BINARY(BsonValue value) => value.IsBinary;
    method IS_OBJECTID (line 496) | public static BsonValue IS_OBJECTID(BsonValue value) =>  value.IsObjec...
    method IS_GUID (line 501) | public static BsonValue IS_GUID(BsonValue value) => value.IsGuid;
    method IS_BOOLEAN (line 506) | public static BsonValue IS_BOOLEAN(BsonValue value) => value.IsBoolean;
    method IS_DATETIME (line 511) | public static BsonValue IS_DATETIME(BsonValue value) => value.IsDateTime;
    method IS_MAXVALUE (line 516) | public static BsonValue IS_MAXVALUE(BsonValue value) => value.IsMaxValue;
    method INT (line 525) | public static BsonValue INT(BsonValue value) => INT32(value);
    method LONG (line 530) | public static BsonValue LONG(BsonValue value) => INT64(value);
    method BOOL (line 535) | public static BsonValue BOOL(BsonValue value) => BOOLEAN(value);
    method DATE (line 540) | public static BsonValue DATE(Collation collation, BsonValue value) => ...
    method DATE (line 541) | public static BsonValue DATE(BsonValue values, BsonValue culture) => D...
    method DATE_UTC (line 542) | public static BsonValue DATE_UTC(Collation collation, BsonValue value)...
    method DATE_UTC (line 543) | public static BsonValue DATE_UTC(BsonValue values, BsonValue culture) ...
    method DATE (line 545) | public static BsonValue DATE(BsonValue year, BsonValue month, BsonValu...
    method DATE_UTC (line 546) | public static BsonValue DATE_UTC(BsonValue year, BsonValue month, Bson...
    method IS_INT (line 551) | public static BsonValue IS_INT(BsonValue value) => IS_INT32(value);
    method IS_LONG (line 556) | public static BsonValue IS_LONG(BsonValue value) => IS_INT64(value);
    method IS_BOOL (line 561) | public static BsonValue IS_BOOL(BsonValue value) => IS_BOOLEAN(value);
    method IS_DATE (line 566) | public static BsonValue IS_DATE(BsonValue value) => IS_DATETIME(value);

FILE: LiteDB/Document/Expression/Methods/Date.cs
  class BsonExpressionMethods (line 11) | internal partial class BsonExpressionMethods
    method YEAR (line 18) | public static BsonValue YEAR(BsonValue value)
    method MONTH (line 28) | public static BsonValue MONTH(BsonValue value)
    method DAY (line 38) | public static BsonValue DAY(BsonValue value)
    method HOUR (line 49) | public static BsonValue HOUR(BsonValue value)
    method MINUTE (line 59) | public static BsonValue MINUTE(BsonValue value)
    method SECOND (line 70) | public static BsonValue SECOND(BsonValue value)
    method DATEADD (line 84) | public static BsonValue DATEADD(BsonValue dateInterval, BsonValue numb...
    method DATEDIFF (line 108) | public static BsonValue DATEDIFF(BsonValue dateInterval, BsonValue sta...
    method TO_LOCAL (line 132) | public static BsonValue TO_LOCAL(BsonValue date)
    method TO_UTC (line 145) | public static BsonValue TO_UTC(BsonValue date)

FILE: LiteDB/Document/Expression/Methods/Math.cs
  class BsonExpressionMethods (line 11) | internal partial class BsonExpressionMethods
    method ABS (line 16) | public static BsonValue ABS(BsonValue value)
    method ROUND (line 32) | public static BsonValue ROUND(BsonValue value, BsonValue digits)
    method POW (line 52) | public static BsonValue POW(BsonValue x, BsonValue y)

FILE: LiteDB/Document/Expression/Methods/Misc.cs
  class BsonExpressionMethods (line 11) | internal partial class BsonExpressionMethods
    method JSON (line 17) | public static BsonValue JSON(BsonValue json)
    method EXTEND (line 44) | public static BsonValue EXTEND(BsonValue source, BsonValue extend)
    method ITEMS (line 69) | public static IEnumerable<BsonValue> ITEMS(BsonValue array)
    method CONCAT (line 94) | public static IEnumerable<BsonValue> CONCAT(IEnumerable<BsonValue> fir...
    method KEYS (line 102) | public static IEnumerable<BsonValue> KEYS(BsonValue document)
    method VALUES (line 116) | public static IEnumerable<BsonValue> VALUES(BsonValue document)
    method OID_CREATIONTIME (line 130) | public static BsonValue OID_CREATIONTIME(BsonValue objectId)
    method IIF (line 143) | public static BsonValue IIF(BsonValue test, BsonValue ifTrue, BsonValu...
    method COALESCE (line 153) | public static BsonValue COALESCE(BsonValue left, BsonValue right)
    method LENGTH (line 161) | public static BsonValue LENGTH(BsonValue value)
    method TOP (line 175) | public static IEnumerable<BsonValue> TOP(IEnumerable<BsonValue> values...
    method UNION (line 190) | public static IEnumerable<BsonValue> UNION(IEnumerable<BsonValue> left...
    method EXCEPT (line 198) | public static IEnumerable<BsonValue> EXCEPT(IEnumerable<BsonValue> lef...
    method DISTINCT (line 206) | public static IEnumerable<BsonValue> DISTINCT(IEnumerable<BsonValue> i...
    method RANDOM (line 216) | [Volatile]
    method RANDOM (line 225) | [Volatile]

FILE: LiteDB/Document/Expression/Methods/String.cs
  class BsonExpressionMethods (line 12) | internal partial class BsonExpressionMethods
    method LOWER (line 17) | public static BsonValue LOWER(BsonValue value)
    method UPPER (line 30) | public static BsonValue UPPER(BsonValue value)
    method LTRIM (line 43) | public static BsonValue LTRIM(BsonValue value)
    method RTRIM (line 56) | public static BsonValue RTRIM(BsonValue value)
    method TRIM (line 70) | public static BsonValue TRIM(BsonValue value)
    method INDEXOF (line 83) | public static BsonValue INDEXOF(BsonValue value, BsonValue search)
    method INDEXOF (line 96) | public static BsonValue INDEXOF(BsonValue value, BsonValue search, Bso...
    method SUBSTRING (line 109) | public static BsonValue SUBSTRING(BsonValue value, BsonValue startIndex)
    method SUBSTRING (line 122) | public static BsonValue SUBSTRING(BsonValue value, BsonValue startInde...
    method REPLACE (line 135) | public static BsonValue REPLACE(BsonValue value, BsonValue oldValue, B...
    method LPAD (line 148) | public static BsonValue LPAD(BsonValue value, BsonValue totalWidth, Bs...
    method RPAD (line 165) | public static BsonValue RPAD(BsonValue value, BsonValue totalWidth, Bs...
    method SPLIT (line 182) | public static IEnumerable<BsonValue> SPLIT(BsonValue value, BsonValue ...
    method SPLIT (line 198) | public static IEnumerable<BsonValue> SPLIT(BsonValue value, BsonValue ...
    method FORMAT (line 224) | public static BsonValue FORMAT(BsonValue value, BsonValue format)
    method JOIN (line 237) | public static BsonValue JOIN(IEnumerable<BsonValue> values)
    method JOIN (line 245) | public static BsonValue JOIN(IEnumerable<BsonValue> values, BsonValue ...
    method IS_MATCH (line 261) | public static BsonValue IS_MATCH(BsonValue value, BsonValue pattern)
    method MATCH (line 271) | public static BsonValue MATCH(BsonValue value, BsonValue pattern, Bson...

FILE: LiteDB/Document/Expression/Parser/BsonExpressionAttributes.cs
  class VolatileAttribute (line 14) | internal class VolatileAttribute: Attribute

FILE: LiteDB/Document/Expression/Parser/BsonExpressionFunctions.cs
  class BsonExpressionFunctions (line 11) | internal class BsonExpressionFunctions
    method MAP (line 13) | public static IEnumerable<BsonValue> MAP(BsonDocument root, Collation ...
    method FILTER (line 27) | public static IEnumerable<BsonValue> FILTER(BsonDocument root, Collati...
    method SORT (line 41) | public static IEnumerable<BsonValue> SORT(BsonDocument root, Collation...
    method SORT (line 58) | public static IEnumerable<BsonValue> SORT(BsonDocument root, Collation...

FILE: LiteDB/Document/Expression/Parser/BsonExpressionOperators.cs
  class BsonExpressionOperators (line 12) | internal class BsonExpressionOperators
    method ADD (line 19) | public static BsonValue ADD(BsonValue left, BsonValue right)
    method MINUS (line 52) | public static BsonValue MINUS(BsonValue left, BsonValue right)
    method MULTIPLY (line 72) | public static BsonValue MULTIPLY(BsonValue left, BsonValue right)
    method DIVIDE (line 85) | public static BsonValue DIVIDE(BsonValue left, BsonValue right)
    method MOD (line 98) | public static BsonValue MOD(BsonValue left, BsonValue right)
    method EQ (line 115) | public static BsonValue EQ(Collation collation, BsonValue left, BsonVa...
    method EQ_ALL (line 116) | public static BsonValue EQ_ALL(Collation collation, IEnumerable<BsonVa...
    method EQ_ANY (line 117) | public static BsonValue EQ_ANY(Collation collation, IEnumerable<BsonVa...
    method GT (line 122) | public static BsonValue GT(BsonValue left, BsonValue right) => left > ...
    method GT_ANY (line 123) | public static BsonValue GT_ANY(Collation collation, IEnumerable<BsonVa...
    method GT_ALL (line 124) | public static BsonValue GT_ALL(Collation collation, IEnumerable<BsonVa...
    method GTE (line 129) | public static BsonValue GTE(BsonValue left, BsonValue right) => left >...
    method GTE_ANY (line 130) | public static BsonValue GTE_ANY(Collation collation, IEnumerable<BsonV...
    method GTE_ALL (line 131) | public static BsonValue GTE_ALL(Collation collation, IEnumerable<BsonV...
    method LT (line 137) | public static BsonValue LT(BsonValue left, BsonValue right) => left < ...
    method LT_ANY (line 138) | public static BsonValue LT_ANY(Collation collation, IEnumerable<BsonVa...
    method LT_ALL (line 139) | public static BsonValue LT_ALL(Collation collation, IEnumerable<BsonVa...
    method LTE (line 144) | public static BsonValue LTE(Collation collation, BsonValue left, BsonV...
    method LTE_ANY (line 145) | public static BsonValue LTE_ANY(Collation collation, IEnumerable<BsonV...
    method LTE_ALL (line 146) | public static BsonValue LTE_ALL(Collation collation, IEnumerable<BsonV...
    method NEQ (line 151) | public static BsonValue NEQ(Collation collation, BsonValue left, BsonV...
    method NEQ_ANY (line 152) | public static BsonValue NEQ_ANY(Collation collation, IEnumerable<BsonV...
    method NEQ_ALL (line 153) | public static BsonValue NEQ_ALL(Collation collation, IEnumerable<BsonV...
    method LIKE (line 158) | public static BsonValue LIKE(Collation collation, BsonValue left, Bson...
    method LIKE_ANY (line 170) | public static BsonValue LIKE_ANY(Collation collation, IEnumerable<Bson...
    method LIKE_ALL (line 171) | public static BsonValue LIKE_ALL(Collation collation, IEnumerable<Bson...
    method BETWEEN (line 176) | public static BsonValue BETWEEN(Collation collation, BsonValue left, B...
    method BETWEEN_ANY (line 191) | public static BsonValue BETWEEN_ANY(Collation collation, IEnumerable<B...
    method BETWEEN_ALL (line 192) | public static BsonValue BETWEEN_ALL(Collation collation, IEnumerable<B...
    method IN (line 197) | public static BsonValue IN(Collation collation, BsonValue left, BsonVa...
    method IN_ANY (line 209) | public static BsonValue IN_ANY(Collation collation, IEnumerable<BsonVa...
    method IN_ALL (line 210) | public static BsonValue IN_ALL(Collation collation, IEnumerable<BsonVa...
    method PARAMETER_PATH (line 219) | public static BsonValue PARAMETER_PATH(BsonDocument doc, string name)
    method MEMBER_PATH (line 239) | public static BsonValue MEMBER_PATH(BsonValue value, string name)
    method ARRAY_INDEX (line 272) | public static BsonValue ARRAY_INDEX(BsonValue value, int index, BsonEx...
    method ARRAY_FILTER (line 302) | public static IEnumerable<BsonValue> ARRAY_FILTER(BsonValue value, int...
    method DOCUMENT_INIT (line 339) | public static BsonValue DOCUMENT_INIT(string[] keys, BsonValue[] values)
    method ARRAY_INIT (line 372) | public static BsonValue ARRAY_INIT(BsonValue[] values)

FILE: LiteDB/Document/Expression/Parser/BsonExpressionParser.cs
  type BsonExpressionParserMode (line 15) | internal enum BsonExpressionParserMode { Full, Single, SelectDocument, U...
  class BsonExpressionParser (line 20) | internal class BsonExpressionParser
    method M (line 24) | private static MethodInfo M(string s) => typeof(BsonExpressionOperator...
    method ParseFullExpression (line 96) | public static BsonExpression ParseFullExpression(Tokenizer tokenizer, ...
    method ParseSingleExpression (line 209) | public static BsonExpression ParseSingleExpression(Tokenizer tokenizer...
    method ParseSelectDocumentBuilder (line 234) | public static BsonExpression ParseSelectDocumentBuilder(Tokenizer toke...
    method ParseUpdateDocumentBuilder (line 335) | public static BsonExpression ParseUpdateDocumentBuilder(Tokenizer toke...
    method TryParseDouble (line 415) | private static BsonExpression TryParseDouble(Tokenizer tokenizer, Bson...
    method TryParseInt (line 457) | private static BsonExpression TryParseInt(Tokenizer tokenizer, BsonDoc...
    method TryParseBool (line 517) | private static BsonExpression TryParseBool(Tokenizer tokenizer, BsonDo...
    method TryParseNull (line 543) | private static BsonExpression TryParseNull(Tokenizer tokenizer, BsonDo...
    method TryParseString (line 568) | private static BsonExpression TryParseString(Tokenizer tokenizer, Bson...
    method TryParseDocument (line 596) | private static BsonExpression TryParseDocument(Tokenizer tokenizer, Ex...
    method TryParseSource (line 702) | private static BsonExpression TryParseSource(Tokenizer tokenizer, Expr...
    method TryParseArray (line 748) | private static BsonExpression TryParseArray(Tokenizer tokenizer, Expre...
    method TryParseParameter (line 814) | private static BsonExpression TryParseParameter(Tokenizer tokenizer, E...
    method TryParseInnerExpression (line 846) | private static BsonExpression TryParseInnerExpression(Tokenizer tokeni...
    method TryParseMethodCall (line 874) | private static BsonExpression TryParseMethodCall(Tokenizer tokenizer, ...
    method TryParsePath (line 983) | private static BsonExpression TryParsePath(Tokenizer tokenizer, Expres...
    method ParsePath (line 1081) | private static Expression ParsePath(Tokenizer tokenizer, Expression ex...
    method TryParseFunction (line 1168) | private static BsonExpression TryParseFunction(Tokenizer tokenizer, Ex...
    method ParseFunction (line 1189) | private static BsonExpression ParseFunction(string functionName, BsonE...
    method NewArray (line 1282) | private static BsonExpression NewArray(BsonExpression item0, BsonExpre...
    method ReadField (line 1308) | private static string ReadField(Tokenizer tokenizer, StringBuilder sou...
    method ReadKey (line 1346) | public static string ReadKey(Tokenizer tokenizer, StringBuilder source)
    method ReadOperant (line 1375) | private static string ReadOperant(Tokenizer tokenizer)
    method ConvertToEnumerable (line 1406) | private static BsonExpression ConvertToEnumerable(BsonExpression expr)
    method ConvertToArray (line 1432) | private static BsonExpression ConvertToArray(BsonExpression expr)
    method CreateLogicExpression (line 1450) | internal static BsonExpression CreateLogicExpression(BsonExpressionTyp...
    method CreateConditionalExpression (line 1486) | internal static BsonExpression CreateConditionalExpression(BsonExpress...

FILE: LiteDB/Document/Expression/Parser/BsonExpressionType.cs
  type BsonExpressionType (line 11) | public enum BsonExpressionType : byte

FILE: LiteDB/Document/Expression/Parser/DocumentScope.cs
  type DocumentScope (line 11) | internal enum DocumentScope

FILE: LiteDB/Document/Expression/Parser/ExpressionContext.cs
  class ExpressionContext (line 12) | internal class ExpressionContext
    method ExpressionContext (line 14) | public ExpressionContext()

FILE: LiteDB/Document/Json/JsonReader.cs
  class JsonReader (line 12) | public class JsonReader
    method JsonReader (line 20) | public JsonReader(TextReader reader)
    method JsonReader (line 27) | internal JsonReader(Tokenizer tokenizer)
    method Deserialize (line 32) | public BsonValue Deserialize()
    method DeserializeArray (line 43) | public IEnumerable<BsonValue> DeserializeArray()
    method ReadValue (line 70) | internal BsonValue ReadValue(Token token)
    method ReadObject (line 107) | private BsonValue ReadObject()
    method ReadArray (line 147) | private BsonArray ReadArray()
    method ReadExtendedDataType (line 170) | private BsonValue ReadExtendedDataType(string key, string value)

FILE: LiteDB/Document/Json/JsonSerializer.cs
  class JsonSerializer (line 12) | public class JsonSerializer
    method Serialize (line 19) | public static string Serialize(BsonValue value, bool indent = false)
    method Serialize (line 31) | public static void Serialize(BsonValue value, TextWriter writer, bool ...
    method Serialize (line 44) | public static void Serialize(BsonValue value, StringBuilder sb, bool i...
    method Deserialize (line 64) | public static BsonValue Deserialize(string json)
    method Deserialize (line 79) | public static BsonValue Deserialize(TextReader reader)
    method DeserializeArray (line 91) | public static IEnumerable<BsonValue> DeserializeArray(string json)
    method DeserializeArray (line 103) | public static IEnumerable<BsonValue> DeserializeArray(TextReader reader)

FILE: LiteDB/Document/Json/JsonWriter.cs
  class JsonWriter (line 10) | public class JsonWriter
    method JsonWriter (line 28) | public JsonWriter(TextWriter writer)
    method Serialize (line 36) | public void Serialize(BsonValue value)
    method WriteValue (line 44) | private void WriteValue(BsonValue value)
    method WriteObject (line 122) | private void WriteObject(BsonDocument obj)
    method WriteArray (line 139) | private void WriteArray(BsonArray arr)
    method WriteString (line 170) | private void WriteString(string s)
    method WriteExtendDataType (line 242) | private void WriteExtendDataType(string type, string value)
    method WriteKeyValue (line 255) | private void WriteKeyValue(string key, BsonValue value, bool comma)
    method WriteStartBlock (line 284) | private void WriteStartBlock(string str, bool hasData)
    method WriteEndBlock (line 299) | private void WriteEndBlock(string str, bool hasData)
    method WriteNewLine (line 313) | private void WriteNewLine()
    method WriteIndent (line 321) | private void WriteIndent()

FILE: LiteDB/Document/ObjectId.cs
  class ObjectId (line 13) | public class ObjectId : IComparable<ObjectId>, IEquatable<ObjectId>
    method ObjectId (line 57) | public ObjectId()
    method ObjectId (line 68) | public ObjectId(int timestamp, int machine, short pid, int increment)
    method ObjectId (line 79) | public ObjectId(ObjectId from)
    method ObjectId (line 90) | public ObjectId(string value)
    method ObjectId (line 98) | public ObjectId(byte[] bytes, int startIndex = 0)
    method FromHex (line 126) | private static byte[] FromHex(string value)
    method Equals (line 150) | public bool Equals(ObjectId other)
    method Equals (line 162) | public override bool Equals(object other)
    method GetHashCode (line 170) | public override int GetHashCode()
    method CompareTo (line 183) | public int CompareTo(ObjectId other)
    method ToByteArray (line 200) | public void ToByteArray(byte[] bytes, int startIndex)
    method ToByteArray (line 216) | public byte[] ToByteArray()
    method ToString (line 225) | public override string ToString()
    method ObjectId (line 276) | static ObjectId()
    method GetCurrentProcessId (line 297) | [MethodImpl(MethodImplOptions.NoInlining)]
    method GetMachineHash (line 307) | private static int GetMachineHash()
    method NewObjectId (line 321) | public static ObjectId NewObjectId()

FILE: LiteDB/Engine/Disk/DiskReader.cs
  class DiskReader (line 19) | internal class DiskReader : IDisposable
    method DiskReader (line 30) | public DiskReader(EngineState state, MemoryCache cache, StreamPool dat...
    method ReadPage (line 41) | public PageBuffer ReadPage(long position, bool writable, FileOrigin or...
    method ReadStream (line 63) | private void ReadStream(Stream stream, long position, BufferSlice buffer)
    method NewPage (line 78) | public PageBuffer NewPage()
    method Dispose (line 86) | public void Dispose()

FILE: LiteDB/Engine/Disk/DiskService.cs
  class DiskService (line 14) | internal class DiskService : IDisposable
    method DiskService (line 31) | public DiskService(
    method Initialize (line 89) | private void Initialize(Stream stream, Collation collation, long initi...
    method GetReader (line 115) | public DiskReader GetReader()
    method DiscardDirtyPages (line 130) | public void DiscardDirtyPages(IEnumerable<PageBuffer> pages)
    method DiscardCleanPages (line 143) | public void DiscardCleanPages(IEnumerable<PageBuffer> pages)
    method NewPage (line 159) | public PageBuffer NewPage()
    method WriteLogDisk (line 167) | public int WriteLogDisk(IEnumerable<PageBuffer> pages)
    method GetFileLength (line 213) | public long GetFileLength(FileOrigin origin)
    method MarkAsInvalidState (line 228) | internal void MarkAsInvalidState()
    method ReadFull (line 249) | public IEnumerable<PageBuffer> ReadFull(FileOrigin origin)
    method WriteDataDisk (line 290) | public void WriteDataDisk(IEnumerable<PageBuffer> pages)
    method SetLength (line 311) | public void SetLength(long length, FileOrigin origin)
    method GetName (line 330) | public string GetName(FileOrigin origin)
    method Dispose (line 337) | public void Dispose()

FILE: LiteDB/Engine/Disk/MemoryCache.cs
  class MemoryCache (line 15) | internal class MemoryCache : IDisposable
    method MemoryCache (line 44) | public MemoryCache(int[] memorySegmentSizes)
    method GetReadablePage (line 56) | public PageBuffer GetReadablePage(long position, FileOrigin origin, Ac...
    method GetReadableKey (line 88) | private long GetReadableKey(long position, FileOrigin origin)
    method GetWritablePage (line 112) | public PageBuffer GetWritablePage(long position, FileOrigin origin, Ac...
    method NewPage (line 135) | public PageBuffer NewPage()
    method NewPage (line 143) | private PageBuffer NewPage(long position, FileOrigin origin)
    method TryMoveToReadable (line 171) | public bool TryMoveToReadable(PageBuffer page)
    method MoveToReadable (line 199) | public PageBuffer MoveToReadable(PageBuffer page)
    method DiscardPage (line 245) | public void DiscardPage(PageBuffer page)
    method GetFreePage (line 269) | private PageBuffer GetFreePage()
    method Extend (line 297) | private void Extend()
    method GetPages (line 395) | public ICollection<PageBuffer> GetPages() => _readable.Values;
    method Clear (line 401) | public int Clear()
    method Dispose (line 424) | public void Dispose()

FILE: LiteDB/Engine/Disk/Serializer/BufferReader.cs
  class BufferReader (line 12) | internal class BufferReader : IDisposable
    method BufferReader (line 35) | public BufferReader(byte[] buffer, bool utcDate = false)
    method BufferReader (line 40) | public BufferReader(BufferSlice buffer, bool utcDate = false)
    method BufferReader (line 48) | public BufferReader(IEnumerable<BufferSlice> source, bool utcDate = fa...
    method MoveForward (line 63) | private bool MoveForward(int count)
    method Read (line 95) | public int Read(byte[] buffer, int offset, int count)
    method Skip (line 130) | public int Skip(int count) => this.Read(null, 0, count);
    method Consume (line 135) | public void Consume()
    method ReadString (line 152) | public string ReadString(int count)
    method ReadCString (line 181) | public string ReadCString()
    method TryReadCStringCurrentSegment (line 217) | private bool TryReadCStringCurrentSegment(out string value)
    method ReadNumber (line 243) | private T ReadNumber<T>(Func<byte[], int, T> convert, int size)
    method ReadInt32 (line 268) | public Int32 ReadInt32() => this.ReadNumber(BitConverter.ToInt32, 4);
    method ReadInt64 (line 269) | public Int64 ReadInt64() => this.ReadNumber(BitConverter.ToInt64, 8);
    method ReadUInt32 (line 270) | public UInt32 ReadUInt32() => this.ReadNumber(BitConverter.ToUInt32, 4);
    method ReadDouble (line 271) | public Double ReadDouble() => this.ReadNumber(BitConverter.ToDouble, 8);
    method ReadDecimal (line 273) | public Decimal ReadDecimal()
    method ReadDateTime (line 289) | public DateTime ReadDateTime()
    method ReadGuid (line 299) | public Guid ReadGuid()
    method ReadObjectId (line 321) | public ObjectId ReadObjectId()
    method ReadBoolean (line 348) | public bool ReadBoolean()
    method ReadByte (line 358) | public byte ReadByte()
    method ReadPageAddress (line 368) | internal PageAddress ReadPageAddress()
    method ReadBytes (line 376) | public byte[] ReadBytes(int count)
    method ReadIndexKey (line 386) | public BsonValue ReadIndexKey()
    method ReadDocument (line 427) | public Result<BsonDocument> ReadDocument(HashSet<string> fields = null)
    method ReadArray (line 464) | public Result<BsonArray> ReadArray()
    method ReadElement (line 492) | private BsonValue ReadElement(HashSet<string> remaining, out string name)
    method Dispose (line 601) | public void Dispose()

FILE: LiteDB/Engine/Disk/Serializer/BufferWriter.cs
  class BufferWriter (line 12) | internal class BufferWriter : IDisposable
    method BufferWriter (line 34) | public BufferWriter(byte[] buffer)
    method BufferWriter (line 39) | public BufferWriter(BufferSlice buffer)
    method BufferWriter (line 46) | public BufferWriter(IEnumerable<BufferSlice> source)
    method MoveForward (line 60) | private bool MoveForward(int count)
    method Write (line 92) | public int Write(byte[] buffer, int offset, int count)
    method Write (line 127) | public int Write(byte[] buffer) => this.Write(buffer, 0, buffer.Length);
    method Skip (line 132) | public int Skip(int count) => this.Write(null, 0, count);
    method Consume (line 137) | public void Consume()
    method WriteCString (line 154) | public void WriteCString(string value)
    method WriteString (line 190) | public void WriteString(string value, bool specs)
    method WriteNumber (line 227) | private void WriteNumber<T>(T value, Action<T, byte[], int> toBytes, i...
    method Write (line 247) | public void Write(Int32 value) => this.WriteNumber(value, BufferExtens...
    method Write (line 248) | public void Write(Int64 value) => this.WriteNumber(value, BufferExtens...
    method Write (line 249) | public void Write(UInt32 value) => this.WriteNumber(value, BufferExten...
    method Write (line 250) | public void Write(Double value) => this.WriteNumber(value, BufferExten...
    method Write (line 252) | public void Write(Decimal value)
    method Write (line 268) | public void Write(DateTime value)
    method Write (line 278) | public void Write(Guid value)
    method Write (line 289) | public void Write(ObjectId value)
    method Write (line 312) | public void Write(bool value)
    method Write (line 321) | public void Write(byte value)
    method Write (line 330) | internal void Write(PageAddress address)
    method WriteArray (line 343) | public int WriteArray(BsonArray value, bool recalc)
    method WriteDocument (line 362) | public int WriteDocument(BsonDocument value, bool recalc)
    method WriteElement (line 378) | private void WriteElement(string key, BsonValue value)
    method Dispose (line 484) | public void Dispose()

FILE: LiteDB/Engine/Disk/StreamFactory/FileStreamFactory.cs
  class FileStreamFactory (line 14) | internal class FileStreamFactory : IStreamFactory
    method FileStreamFactory (line 22) | public FileStreamFactory(string filename, string password, bool readOn...
    method GetStream (line 39) | public Stream GetStream(bool canWrite, bool sequencial)
    method GetLength (line 68) | public long GetLength()
    method Exists (line 104) | public bool Exists()
    method Delete (line 112) | public void Delete()
    method IsLocked (line 120) | public bool IsLocked() => this.Exists() && FileHelper.IsFileLocked(_fi...

FILE: LiteDB/Engine/Disk/StreamFactory/IStreamFactory.cs
  type IStreamFactory (line 13) | internal interface IStreamFactory
    method GetStream (line 23) | Stream GetStream(bool canWrite, bool sequencial);
    method GetLength (line 29) | long GetLength();
    method Exists (line 34) | bool Exists();
    method Delete (line 39) | void Delete();
    method IsLocked (line 44) | bool IsLocked();

FILE: LiteDB/Engine/Disk/StreamFactory/StreamFactory.cs
  class StreamFactory (line 14) | internal class StreamFactory : IStreamFactory
    method StreamFactory (line 19) | public StreamFactory(Stream stream, string password)
    method GetStream (line 33) | public Stream GetStream(bool canWrite, bool sequencial)
    method GetLength (line 48) | public long GetLength()
    method Exists (line 70) | public bool Exists() => _stream.Length > 0;
    method Delete (line 75) | public void Delete()
    method IsLocked (line 82) | public bool IsLocked() => false;

FILE: LiteDB/Engine/Disk/StreamFactory/StreamPool.cs
  class StreamPool (line 19) | internal class StreamPool : IDisposable
    method StreamPool (line 25) | public StreamPool(IStreamFactory factory, bool appendOnly)
    method Rent (line 40) | public Stream Rent()
    method Return (line 53) | public void Return(Stream stream)
    method Dispose (line 61) | public void Dispose()

FILE: LiteDB/Engine/Disk/Streams/AesStream.cs
  class AesStream (line 13) | public class AesStream : Stream
    method AesStream (line 48) | public AesStream(string password, Stream stream)
    method Read (line 172) | public override int Read(byte[] array, int offset, int count)
    method Write (line 192) | public override void Write(byte[] array, int offset, int count)
    method Dispose (line 200) | protected override void Dispose(bool disposing)
    method NewSalt (line 215) | public static byte[] NewSalt()
    method Flush (line 227) | public override void Flush()
    method Seek (line 232) | public override long Seek(long offset, SeekOrigin origin)
    method SetLength (line 237) | public override void SetLength(long value)
    method IsBlank (line 242) | private unsafe bool IsBlank(byte[] array, int offset)

FILE: LiteDB/Engine/Disk/Streams/ConcurrentStream.cs
  class ConcurrentStream (line 11) | internal class ConcurrentStream : Stream
    method ConcurrentStream (line 18) | public ConcurrentStream(Stream stream, bool canWrite)
    method Flush (line 34) | public override void Flush() => _stream.Flush();
    method SetLength (line 36) | public override void SetLength(long value) => _stream.SetLength(value);
    method Dispose (line 38) | protected override void Dispose(bool disposing) => _stream.Dispose();
    method Seek (line 40) | public override long Seek(long offset, SeekOrigin origin)
    method Read (line 55) | public override int Read(byte[] buffer, int offset, int count)
    method Write (line 67) | public override void Write(byte[] buffer, int offset, int count)

FILE: LiteDB/Engine/Disk/Streams/TempStream.cs
  class TempStream (line 11) | public class TempStream : Stream
    method TempStream (line 17) | public TempStream(string filename = null, long maxMemoryUsage = 104857...
    method Flush (line 48) | public override void Flush() => _stream.Flush();
    method Read (line 50) | public override int Read(byte[] buffer, int offset, int count) => _str...
    method SetLength (line 52) | public override void SetLength(long value) => _stream.SetLength(value);
    method Write (line 54) | public override void Write(byte[] buffer, int offset, int count) => _s...
    method Seek (line 56) | public override long Seek(long offset, SeekOrigin origin)
    method Dispose (line 85) | protected override void Dispose(bool disposing)

FILE: LiteDB/Engine/Engine/Collection.cs
  class LiteEngine (line 9) | public partial class LiteEngine
    method GetCollectionNames (line 14) | public IEnumerable<string> GetCollectionNames()
    method DropCollection (line 22) | public bool DropCollection(string name)
    method RenameCollection (line 51) | public bool RenameCollection(string collection, string newName)

FILE: LiteDB/Engine/Engine/Delete.cs
  class LiteEngine (line 8) | public partial class LiteEngine
    method Delete (line 13) | public int Delete(string collection, IEnumerable<BsonValue> ids)
    method DeleteMany (line 59) | public int DeleteMany(string collection, BsonExpression predicate)

FILE: LiteDB/Engine/Engine/Index.cs
  class LiteEngine (line 9) | public partial class LiteEngine
    method EnsureIndex (line 14) | public bool EnsureIndex(string collection, string name, BsonExpression...
    method DropIndex (line 100) | public bool DropIndex(string collection, string name)

FILE: LiteDB/Engine/Engine/Insert.cs
  class LiteEngine (line 10) | public partial class LiteEngine
    method Insert (line 15) | public int Insert(string collection, IEnumerable<BsonDocument> docs, B...
    method InsertDocument (line 47) | private void InsertDocument(Snapshot snapshot, BsonDocument doc, BsonA...

FILE: LiteDB/Engine/Engine/Pragma.cs
  class LiteEngine (line 9) | public partial class LiteEngine
    method Pragma (line 14) | public BsonValue Pragma(string name)
    method Pragma (line 22) | public bool Pragma(string name, BsonValue value)

FILE: LiteDB/Engine/Engine/Query.cs
  class LiteEngine (line 9) | public partial class LiteEngine
    method Query (line 15) | public IBsonDataReader Query(string collection, Query query)

FILE: LiteDB/Engine/Engine/Rebuild.cs
  class LiteEngine (line 11) | public partial class LiteEngine
    method Rebuild (line 18) | public long Rebuild(RebuildOptions options)
    method Rebuild (line 41) | public long Rebuild()
    method RebuildContent (line 52) | internal void RebuildContent(IFileReader reader)

FILE: LiteDB/Engine/Engine/Recovery.cs
  class LiteEngine (line 11) | public partial class LiteEngine
    method Recovery (line 16) | private void Recovery(Collation collation)

FILE: LiteDB/Engine/Engine/Sequence.cs
  class LiteEngine (line 10) | public partial class LiteEngine
    method GetSequence (line 15) | private BsonValue GetSequence(Snapshot snapshot, BsonAutoId autoId)
    method SetSequence (line 48) | private void SetSequence(Snapshot snapshot, BsonValue newId)
    method GetLastId (line 76) | private BsonValue GetLastId(Snapshot snapshot)

FILE: LiteDB/Engine/Engine/SystemCollections.cs
  class LiteEngine (line 7) | public partial class LiteEngine
    method GetSystemCollection (line 12) | internal SystemCollection GetSystemCollection(string name)
    method RegisterSystemCollection (line 26) | internal void RegisterSystemCollection(SystemCollection systemCollection)
    method RegisterSystemCollection (line 37) | internal void RegisterSystemCollection(string collectionName, Func<IEn...

FILE: LiteDB/Engine/Engine/Transaction.cs
  class LiteEngine (line 9) | public partial class LiteEngine
    method BeginTrans (line 15) | public bool BeginTrans()
    method Commit (line 33) | public bool Commit()
    method Rollback (line 58) | public bool Rollback()
    method AutoTransaction (line 79) | private T AutoTransaction<T>(Func<TransactionService, T> fn)
    method CommitAndReleaseTransaction (line 108) | private void CommitAndReleaseTransaction(TransactionService transaction)

FILE: LiteDB/Engine/Engine/Update.cs
  class LiteEngine (line 8) | public partial class LiteEngine
    method Update (line 13) | public int Update(string collection, IEnumerable<BsonDocument> docs)
    method UpdateMany (line 49) | public int UpdateMany(string collection, BsonExpression transform, Bso...
    method UpdateDocument (line 97) | private bool UpdateDocument(Snapshot snapshot, CollectionPage col, Bso...

FILE: LiteDB/Engine/Engine/Upgrade.cs
  class LiteEngine (line 11) | public partial class LiteEngine
    method TryUpgrade (line 19) | private void TryUpgrade()
    method Upgrade (line 51) | [Obsolete("Upgrade your LiteDB v4 datafiles using Upgrade=true in Engi...

FILE: LiteDB/Engine/Engine/Upsert.cs
  class LiteEngine (line 7) | public partial class LiteEngine
    method Upsert (line 14) | public int Upsert(string collection, IEnumerable<BsonDocument> docs, B...

FILE: LiteDB/Engine/EnginePragmas.cs
  class EnginePragmas (line 18) | internal class EnginePragmas
    method EnginePragmas (line 71) | public EnginePragmas(HeaderPage headerPage)
    method EnginePragmas (line 148) | public EnginePragmas(BufferSlice buffer, HeaderPage headerPage)
    method UpdateBuffer (line 159) | public void UpdateBuffer(BufferSlice buffer)
    method Get (line 171) | public BsonValue Get(string name)
    method Set (line 181) | public void Set(string name, BsonValue value, bool validate)

FILE: LiteDB/Engine/EngineSettings.cs
  class EngineSettings (line 18) | public class EngineSettings
    method CreateDataFactory (line 78) | internal IStreamFactory CreateDataFactory(bool useAesStream = true)
    method CreateLogFactory (line 103) | internal IStreamFactory CreateLogFactory()
    method CreateTempFactory (line 130) | internal IStreamFactory CreateTempFactory()

FILE: LiteDB/Engine/EngineState.cs
  class EngineState (line 14) | internal class EngineState
    method EngineState (line 26) | public EngineState(LiteEngine engine, EngineSettings settings)
    method Validate (line 32) | public void Validate()
    method Handle (line 37) | public bool Handle(Exception ex)
    method ReadTransform (line 54) | public BsonValue ReadTransform(string collection, BsonValue value)

FILE: LiteDB/Engine/FileReader/FileReaderError.cs
  class FileReaderError (line 11) | internal class FileReaderError

FILE: LiteDB/Engine/FileReader/FileReaderV7.cs
  class FileReaderV7 (line 16) | internal class FileReaderV7 : IFileReader
    method GetPragmas (line 30) | public IDictionary<string, BsonValue> GetPragmas() => new Dictionary<s...
    method FileReaderV7 (line 39) | public FileReaderV7(EngineSettings settings)
    method Open (line 44) | public void Open()
    method IsVersion (line 81) | public static bool IsVersion(byte[] buffer)
    method GetCollections (line 92) | public IEnumerable<string> GetCollections()
    method GetIndexes (line 100) | public IEnumerable<IndexInfo> GetIndexes(string collection)
    method GetDocuments (line 126) | public IEnumerable<BsonDocument> GetDocuments(string collection)
    method ReadPage (line 187) | private BsonDocument ReadPage(uint pageID)
    method ReadExtendData (line 382) | private byte[] ReadExtendData(uint extendPageID)
    method VisitIndexPages (line 405) | private HashSet<uint> VisitIndexPages(uint startPageID)
    method Dispose (line 439) | protected virtual void Dispose(bool disposing)
    method Dispose (line 453) | public void Dispose()

FILE: LiteDB/Engine/FileReader/FileReaderV8.cs
  class FileReaderV8 (line 17) | internal class FileReaderV8 : IFileReader
    type PageInfo (line 19) | private struct PageInfo
    method FileReaderV8 (line 50) | public FileReaderV8(EngineSettings settings, IList<FileReaderError> er...
    method Open (line 59) | public void Open()
    method GetPragmas (line 97) | public IDictionary<string, BsonValue> GetPragmas() => _pragmas;
    method GetCollections (line 102) | public IEnumerable<string> GetCollections() => _collections.Keys;
    method GetIndexes (line 107) | public IEnumerable<IndexInfo> GetIndexes(string collection) => _indexe...
    method GetDocuments (line 113) | public IEnumerable<BsonDocument> GetDocuments(string collection)
    method LoadPragmas (line 254) | private void LoadPragmas()
    method LoadDataPages (line 277) | private void LoadDataPages()
    method LoadCollections (line 314) | private void LoadCollections()
    method LoadIndexes (line 362) | private void LoadIndexes()
    method IsVersion (line 436) | public static bool IsVersion(byte[] buffer)
    method LoadIndexMap (line 451) | private void LoadIndexMap()
    method ReadPage (line 529) | private Result<BasePage> ReadPage(uint pageID, out PageInfo pageInfo)
    method HandleError (line 579) | private void HandleError(Exception ex, PageInfo pageInfo)
    method HandleError (line 603) | private void HandleError(string message, PageInfo pageInfo) => this.Ha...
    method Dispose (line 605) | protected virtual void Dispose(bool disposing)
    method Dispose (line 615) | public void Dispose()

FILE: LiteDB/Engine/FileReader/IFileReader.cs
  type IFileReader (line 9) | interface IFileReader : IDisposable
    method Open (line 14) | void Open();
    method GetPragmas (line 19) | IDictionary<string, BsonValue> GetPragmas();
    method GetCollections (line 24) | IEnumerable<string> GetCollections();
    method GetIndexes (line 29) | IEnumerable<IndexInfo> GetIndexes(string name);
    method GetDocuments (line 34) | IEnumerable<BsonDocument> GetDocuments(string collection);

FILE: LiteDB/Engine/FileReader/IndexInfo.cs
  class IndexInfo (line 10) | internal class IndexInfo

FILE: LiteDB/Engine/FileReader/Legacy/AesEncryption.cs
  class AesEncryption (line 12) | internal class AesEncryption : IDisposable
    method AesEncryption (line 16) | public AesEncryption(string password, byte[] salt)
    method Encrypt (line 33) | public byte[] Encrypt(byte[] bytes)
    method Decrypt (line 52) | public byte[] Decrypt(byte[] encryptedValue, int offset = 0, int count...
    method HashSHA1 (line 71) | public static byte[] HashSHA1(string password)
    method Salt (line 82) | public static byte[] Salt(int maxLength = 16)
    method Dispose (line 93) | public void Dispose()

FILE: LiteDB/Engine/FileReader/Legacy/BsonReader.cs
  class BsonReader (line 10) | internal class BsonReader
    method BsonReader (line 14) | public BsonReader(bool utcDate)
    method Deserialize (line 22) | public BsonDocument Deserialize(byte[] bson)
    method ReadDocument (line 30) | public BsonDocument ReadDocument(ByteReader reader)
    method ReadArray (line 50) | public BsonArray ReadArray(ByteReader reader)
    method ReadElement (line 70) | private BsonValue ReadElement(ByteReader reader, out string name)

FILE: LiteDB/Engine/FileReader/Legacy/ByteReader.cs
  class ByteReader (line 8) | internal class ByteReader
    method ByteReader (line 16) | public ByteReader(byte[] buffer)
    method Skip (line 23) | public void Skip(int length)
    method ReadByte (line 30) | public Byte ReadByte()
    method ReadBoolean (line 39) | public Boolean ReadBoolean()
    method ReadUInt16 (line 48) | public UInt16 ReadUInt16()
    method ReadUInt32 (line 54) | public UInt32 ReadUInt32()
    method ReadUInt64 (line 60) | public UInt64 ReadUInt64()
    method ReadInt16 (line 66) | public Int16 ReadInt16()
    method ReadInt32 (line 72) | public Int32 ReadInt32()
    method ReadInt64 (line 78) | public Int64 ReadInt64()
    method ReadSingle (line 84) | public Single ReadSingle()
    method ReadDouble (line 90) | public Double ReadDouble()
    method ReadDecimal (line 96) | public Decimal ReadDecimal()
    method ReadBytes (line 106) | public byte[] ReadBytes(int count)
    method ReadString (line 121) | public string ReadString()
    method ReadString (line 130) | public string ReadString(int length)
    method ReadBsonString (line 141) | public string ReadBsonString()
    method ReadCString (line 150) | public string ReadCString()
    method ReadDateTime (line 173) | public DateTime ReadDateTime()
    method ReadGuid (line 183) | public Guid ReadGuid()
    method ReadObjectId (line 188) | public ObjectId ReadObjectId()
    method ReadBsonValue (line 199) | public BsonValue ReadBsonValue(ushort length)

FILE: LiteDB/Engine/ILiteEngine.cs
  type ILiteEngine (line 6) | public interface ILiteEngine : IDisposable
    method Checkpoint (line 8) | int Checkpoint();
    method Rebuild (line 9) | long Rebuild(RebuildOptions options);
    method BeginTrans (line 11) | bool BeginTrans();
    method Commit (line 12) | bool Commit();
    method Rollback (line 13) | bool Rollback();
    method Query (line 15) | IBsonDataReader Query(string collection, Query query);
    method Insert (line 17) | int Insert(string collection, IEnumerable<BsonDocument> docs, BsonAuto...
    method Update (line 18) | int Update(string collection, IEnumerable<BsonDocument> docs);
    method UpdateMany (line 19) | int UpdateMany(string collection, BsonExpression transform, BsonExpres...
    method Upsert (line 20) | int Upsert(string collection, IEnumerable<BsonDocument> docs, BsonAuto...
    method Delete (line 21) | int Delete(string collection, IEnumerable<BsonValue> ids);
    method DeleteMany (line 22) | int DeleteMany(string collection, BsonExpression predicate);
    method DropCollection (line 24) | bool DropCollection(string name);
    method RenameCollection (line 25) | bool RenameCollection(string name, string newName);
    method EnsureIndex (line 27) | bool EnsureIndex(string collection, string name, BsonExpression expres...
    method DropIndex (line 28) | bool DropIndex(string collection, string name);
    method Pragma (line 30) | BsonValue Pragma(string name);
    method Pragma (line 31) | bool Pragma(string name, BsonValue value);

FILE: LiteDB/Engine/LiteEngine.cs
  class LiteEngine (line 19) | public partial class LiteEngine : ILiteEngine
    method LiteEngine (line 57) | public LiteEngine()
    method LiteEngine (line 65) | public LiteEngine(string filename)
    method LiteEngine (line 73) | public LiteEngine(EngineSettings settings)
    method Open (line 84) | internal bool Open()
    method Close (line 178) | internal List<Exception> Close()
    method Close (line 215) | internal List<Exception> Close(Exception ex)
    method GetMonitor (line 248) | internal TransactionMonitor GetMonitor() => _monitor;
    method Checkpoint (line 256) | public int Checkpoint() => _walIndex.Checkpoint();
    method Dispose (line 258) | public void Dispose()
    method Dispose (line 264) | protected virtual void Dispose(bool disposing)

FILE: LiteDB/Engine/Pages/BasePage.cs
  type PageType (line 10) | internal enum PageType { Empty = 0, Header = 1, Collection = 2, Index = ...
  class BasePage (line 12) | internal class BasePage
    method BasePage (line 140) | public BasePage(PageBuffer buffer, uint pageID, PageType pageType)
    method BasePage (line 177) | public BasePage(PageBuffer buffer)
    method UpdateBuffer (line 204) | public virtual PageBuffer UpdateBuffer()
    method MarkAsEmtpy (line 233) | public void MarkAsEmtpy()
    method Get (line 271) | public BufferSlice Get(byte index)
    method Insert (line 295) | public BufferSlice Insert(ushort bytesLength, out byte index)
    method InternalInsert (line 305) | private BufferSlice InternalInsert(ushort bytesLength, ref byte index)
    method Delete (line 377) | public void Delete(byte index)
    method Update (line 444) | public BufferSlice Update(byte index, ushort bytesLength)
    method Defrag (line 531) | public void Defrag()
    method GetFreeIndex (line 612) | private byte GetFreeIndex()
    method GetUsedIndexs (line 635) | public IEnumerable<byte> GetUsedIndexs()
    method UpdateHighestIndex (line 659) | private void UpdateHighestIndex()
    method IsValidPos (line 692) | private bool IsValidPos(ushort position) => position >= PAGE_HEADER_SI...
    method IsValidLen (line 697) | private bool IsValidLen(ushort length) => length > 0 && length <= (PAG...
    method CalcPositionAddr (line 706) | public static int CalcPositionAddr(byte index) => PAGE_SIZE - ((index ...
    method CalcLengthAddr (line 711) | public static int CalcLengthAddr(byte index) => PAGE_SIZE - ((index + ...
    method GetPagePosition (line 716) | public static long GetPagePosition(uint pageID)
    method GetPagePosition (line 724) | public static long GetPagePosition(int pageID)
    method ReadPage (line 734) | public static T ReadPage<T>(PageBuffer buffer)
    method CreatePage (line 749) | public static T CreatePage<T>(PageBuffer buffer, uint pageID)
    method ToString (line 761) | public override string ToString()

FILE: LiteDB/Engine/Pages/CollectionPage.cs
  class CollectionPage (line 11) | internal class CollectionPage : BasePage
    method CollectionPage (line 30) | public CollectionPage(PageBuffer buffer, uint pageID)
    method CollectionPage (line 39) | public CollectionPage(PageBuffer buffer)
    method UpdateBuffer (line 71) | public override PageBuffer UpdateBuffer()
    method GetCollectionIndex (line 108) | public CollectionIndex GetCollectionIndex(string name)
    method GetCollectionIndexes (line 121) | public ICollection<CollectionIndex> GetCollectionIndexes()
    method GetCollectionIndexesSlots (line 129) | public CollectionIndex[] GetCollectionIndexesSlots()
    method InsertCollectionIndex (line 144) | public CollectionIndex InsertCollectionIndex(string name, string expr,...
    method UpdateCollectionIndex (line 167) | public CollectionIndex UpdateCollectionIndex(string name)
    method DeleteCollectionIndex (line 177) | public void DeleteCollectionIndex(string name)

FILE: LiteDB/Engine/Pages/DataPage.cs
  class DataPage (line 9) | internal class DataPage : BasePage
    method DataPage (line 14) | public DataPage(PageBuffer buffer)
    method DataPage (line 25) | public DataPage(PageBuffer buffer, uint pageID)
    method GetBlock (line 33) | public DataBlock GetBlock(byte index)
    method InsertBlock (line 43) | public DataBlock InsertBlock(int bytesLength, bool extend)
    method UpdateBlock (line 53) | public DataBlock UpdateBlock(DataBlock currentBlock, int bytesLength)
    method DeleteBlock (line 63) | public void DeleteBlock(byte index)
    method GetBlocks (line 71) | public IEnumerable<PageAddress> GetBlocks()
    method FreeIndexSlot (line 107) | public static byte FreeIndexSlot(int freeBytes)
    method GetMinimumIndexSlot (line 124) | public static int GetMinimumIndexSlot(int length)

FILE: LiteDB/Engine/Pages/HeaderPage.cs
  class HeaderPage (line 16) | internal class HeaderPage : BasePage
    method HeaderPage (line 77) | public HeaderPage(PageBuffer buffer, uint pageID)
    method HeaderPage (line 100) | public HeaderPage(PageBuffer buffer)
    method LoadPage (line 111) | private void LoadPage()
    method UpdateBuffer (line 140) | public override PageBuffer UpdateBuffer()
    method Savepoint (line 167) | public PageBuffer Savepoint()
    method Restore (line 181) | public void Restore(PageBuffer savepoint)
    method GetCollectionPageID (line 191) | public uint GetCollectionPageID(string collection)
    method GetCollections (line 204) | public IEnumerable<KeyValuePair<string, uint>> GetCollections()
    method InsertCollection (line 215) | public void InsertCollection(string name, uint pageID)
    method DeleteCollection (line 225) | public void DeleteCollection(string name)
    method RenameCollection (line 235) | public void RenameCollection(string oldName, string newName)
    method GetAvailableCollectionSpace (line 249) | public int GetAvailableCollectionSpace()

FILE: LiteDB/Engine/Pages/IndexPage.cs
  class IndexPage (line 11) | internal class IndexPage : BasePage
    method IndexPage (line 16) | public IndexPage(PageBuffer buffer)
    method IndexPage (line 27) | public IndexPage(PageBuffer buffer, uint pageID)
    method GetIndexNode (line 35) | public IndexNode GetIndexNode(byte index)
    method InsertIndexNode (line 47) | public IndexNode InsertIndexNode(byte slot, byte level, BsonValue key,...
    method DeleteIndexNode (line 59) | public void DeleteIndexNode(byte index)
    method GetIndexNodes (line 67) | public IEnumerable<IndexNode> GetIndexNodes()
    method FreeIndexSlot (line 80) | public static byte FreeIndexSlot(int freeBytes)

FILE: LiteDB/Engine/Pragmas.cs
  class Pragmas (line 3) | public static class Pragmas

FILE: LiteDB/Engine/Query/IndexQuery/Index.cs
  class Index (line 11) | internal abstract class Index
    method Index (line 23) | internal Index(string name, int order)
    method GetCost (line 34) | public abstract uint GetCost(CollectionIndex index);
    method Execute (line 39) | public abstract IEnumerable<IndexNode> Execute(IndexService indexer, C...
    method Run (line 44) | public virtual IEnumerable<IndexNode> Run(CollectionPage col, IndexSer...

FILE: LiteDB/Engine/Query/IndexQuery/IndexAll.cs
  class IndexAll (line 11) | internal class IndexAll : Index
    method IndexAll (line 13) | public IndexAll(string name, int order)
    method GetCost (line 18) | public override uint GetCost(CollectionIndex index)
    method Execute (line 23) | public override IEnumerable<IndexNode> Execute(IndexService indexer, C...
    method ToString (line 28) | public override string ToString()

FILE: LiteDB/Engine/Query/IndexQuery/IndexEquals.cs
  class IndexEquals (line 11) | internal class IndexEquals : Index
    method IndexEquals (line 15) | public IndexEquals(string name, BsonValue value)
    method GetCost (line 21) | public override uint GetCost(CollectionIndex index)
    method Execute (line 28) | public override IEnumerable<IndexNode> Execute(IndexService indexer, C...
    method ToString (line 61) | public override string ToString()

FILE: LiteDB/Engine/Query/IndexQuery/IndexIn.cs
  class IndexIn (line 11) | internal class IndexIn : Index
    method IndexIn (line 15) | public IndexIn(string name, BsonArray values, int order)
    method GetCost (line 21) | public override uint GetCost(CollectionIndex index)
    method Execute (line 28) | public override IEnumerable<IndexNode> Execute(IndexService indexer, C...
    method ToString (line 41) | public override string ToString()

FILE: LiteDB/Engine/Query/IndexQuery/IndexLike.cs
  class IndexLike (line 8) | internal class IndexLike : Index
    method IndexLike (line 15) | public IndexLike(string name, BsonValue value, int order)
    method GetCost (line 23) | public override uint GetCost(CollectionIndex index)
    method Execute (line 30) | public override IEnumerable<IndexNode> Execute(IndexService indexer, C...
    method ExecuteStartsWith (line 39) | private IEnumerable<IndexNode> ExecuteStartsWith(IndexService indexer,...
    method ExecuteLike (line 113) | private IEnumerable<IndexNode> ExecuteLike(IndexService indexer, Colle...
    method ToString (line 120) | public override string ToString()

FILE: LiteDB/Engine/Query/IndexQuery/IndexRange.cs
  class IndexRange (line 11) | internal class IndexRange : Index
    method IndexRange (line 19) | public IndexRange(string name, BsonValue start, BsonValue end, bool st...
    method GetCost (line 29) | public override uint GetCost(CollectionIndex index)
    method Execute (line 34) | public override IEnumerable<IndexNode> Execute(IndexService indexer, C...
    method ToString (line 103) | public override string ToString()

FILE: LiteDB/Engine/Query/IndexQuery/IndexScan.cs
  class IndexScan (line 11) | internal class IndexScan : Index
    method IndexScan (line 15) | public IndexScan(string name, Func<BsonValue, bool> func, int order)
    method GetCost (line 21) | public override uint GetCost(CollectionIndex index)
    method Execute (line 26) | public override IEnumerable<IndexNode> Execute(IndexService indexer, C...
    method ToString (line 33) | public override string ToString()

FILE: LiteDB/Engine/Query/IndexQuery/IndexVirtual.cs
  class IndexVirtual (line 11) | internal class IndexVirtual : Index, IDocumentLookup
    method IndexVirtual (line 17) | public IndexVirtual(IEnumerable<BsonDocument> source)
    method GetCost (line 23) | public override uint GetCost(CollectionIndex index)
    method Execute (line 28) | public override IEnumerable<IndexNode> Execute(IndexService indexer, C...
    method Run (line 33) | public override IEnumerable<IndexNode> Run(CollectionPage col, IndexSe...
    method Load (line 57) | public BsonDocument Load(IndexNode node)
    method Load (line 62) | public BsonDocument Load(PageAddress rawId)
    method ToString (line 69) | public override string ToString()

FILE: LiteDB/Engine/Query/Lookup/DatafileLookup.cs
  class DatafileLookup (line 9) | internal class DatafileLookup : IDocumentLookup
    method DatafileLookup (line 15) | public DatafileLookup(DataService data, bool utcDate, HashSet<string> ...
    method Load (line 22) | public virtual BsonDocument Load(IndexNode node)
    method Load (line 29) | public virtual BsonDocument Load(PageAddress rawId)

FILE: LiteDB/Engine/Query/Lookup/IDocumentLookup.cs
  type IDocumentLookup (line 8) | internal interface IDocumentLookup
    method Load (line 10) | BsonDocument Load(IndexNode node);
    method Load (line 11) | BsonDocument Load(PageAddress rawId);

FILE: LiteDB/Engine/Query/Lookup/IndexKeyLoader.cs
  class IndexLookup (line 9) | internal class IndexLookup : IDocumentLookup
    method IndexLookup (line 14) | public IndexLookup(IndexService indexer, string name)
    method Load (line 20) | public BsonDocument Load(IndexNode node)
    method Load (line 34) | public BsonDocument Load(PageAddress rawId)

FILE: LiteDB/Engine/Query/Pipeline/BasePipe.cs
  class BasePipe (line 11) | internal abstract class BasePipe
    method BasePipe (line 19) | public BasePipe(TransactionService transaction, IDocumentLookup lookup...
    method Pipe (line 31) | public abstract IEnumerable<BsonDocument> Pipe(IEnumerable<IndexNode> ...
    method LoadDocument (line 34) | protected IEnumerable<BsonDocument> LoadDocument(IEnumerable<IndexNode...
    method Include (line 48) | protected IEnumerable<BsonDocument> Include(IEnumerable<BsonDocument> ...
    method Filter (line 140) | protected IEnumerable<BsonDocument> Filter(IEnumerable<BsonDocument> s...
    method OrderBy (line 157) | protected IEnumerable<BsonDocument> OrderBy(IEnumerable<BsonDocument> ...

FILE: LiteDB/Engine/Query/Pipeline/DocumentCacheEnumerable.cs
  class DocumentCacheEnumerable (line 15) | internal class DocumentCacheEnumerable : IEnumerable<BsonDocument>, IDis...
    method DocumentCacheEnumerable (line 22) | public DocumentCacheEnumerable(IEnumerable<BsonDocument> source, IDocu...
    method Dispose (line 28) | public void Dispose()
    method GetEnumerator (line 39) | public IEnumerator<BsonDocument> GetEnumerator()
    method GetEnumerator (line 83) | IEnumerator IEnumerable.GetEnumerator()

FILE: LiteDB/Engine/Query/Pipeline/GroupByPipe.cs
  class GroupByPipe (line 11) | internal class GroupByPipe : BasePipe
    method GroupByPipe (line 13) | public GroupByPipe(TransactionService transaction, IDocumentLookup loa...
    method Pipe (line 28) | public override IEnumerable<BsonDocument> Pipe(IEnumerable<IndexNode> ...
    method GroupBy (line 63) | private IEnumerable<DocumentCacheEnumerable> GroupBy(IEnumerable<BsonD...
    method YieldDocuments (line 85) | private IEnumerable<BsonDocument> YieldDocuments(BsonValue key, IEnume...
    method SelectGroupBy (line 112) | private IEnumerable<BsonDocument> SelectGroupBy(IEnumerable<DocumentCa...

FILE: LiteDB/Engine/Query/Pipeline/QueryPipe.cs
  class QueryPipe (line 11) | internal class QueryPipe : BasePipe
    method QueryPipe (line 13) | public QueryPipe(TransactionService transaction, IDocumentLookup loade...
    method Pipe (line 29) | public override IEnumerable<BsonDocument> Pipe(IEnumerable<IndexNode> ...
    method Select (line 81) | private IEnumerable<BsonDocument> Select(IEnumerable<BsonDocument> sou...
    method SelectAll (line 103) | private IEnumerable<BsonDocument> SelectAll(IEnumerable<BsonDocument> ...

FILE: LiteDB/Engine/Query/Query.cs
  class Query (line 13) | public partial class Query
    method ToSQL (line 49) | public string ToSQL(string collection)

FILE: LiteDB/Engine/Query/QueryExecutor.cs
  class QueryExecutor (line 14) | internal class QueryExecutor
    method QueryExecutor (line 27) | public QueryExecutor(
    method ExecuteQuery (line 55) | public BsonDataReader ExecuteQuery()
    method ExecuteQuery (line 70) | internal BsonDataReader ExecuteQuery(bool executionPlan)
    method ExecuteQueryInto (line 170) | internal BsonDataReader ExecuteQueryInto(string into, BsonAutoId autoId)

FILE: LiteDB/Engine/Query/QueryOptimization.cs
  class QueryOptimization (line 11) | internal class QueryOptimization
    method QueryOptimization (line 19) | public QueryOptimization(Snapshot snapshot, Query query, IEnumerable<B...
    method ProcessQuery (line 46) | public QueryPlan ProcessQuery()
    method SplitWherePredicateInTerms (line 77) | private void SplitWherePredicateInTerms()
    method OptimizeTerms (line 116) | private void OptimizeTerms()
    method DefineQueryFields (line 142) | private void DefineQueryFields()
    method DefineIndex (line 168) | private void DefineIndex()
    method ChooseIndex (line 225) | private IndexCost ChooseIndex(HashSet<string> fields)
    method DefineOrderBy (line 303) | private void DefineOrderBy()
    method DefineGroupBy (line 328) | private void DefineGroupBy()
    method DefineIncludes (line 358) | private void DefineIncludes()

FILE: LiteDB/Engine/Query/Structures/GroupBy.cs
  class GroupBy (line 13) | internal class GroupBy
    method GroupBy (line 21) | public GroupBy(BsonExpression expression, BsonExpression select, BsonE...

FILE: LiteDB/Engine/Query/Structures/IndexCost.cs
  class IndexCost (line 12) | internal class IndexCost
    method IndexCost (line 31) | public IndexCost(CollectionIndex index, BsonExpression expr, BsonExpre...
    method IndexCost (line 70) | public IndexCost(CollectionIndex index)
    method CreateIndex (line 81) | private Index CreateIndex(BsonExpressionType type, string name, BsonVa...

FILE: LiteDB/Engine/Query/Structures/OrderBy.cs
  class OrderBy (line 13) | internal class OrderBy
    method OrderBy (line 19) | public OrderBy(BsonExpression expression, int order)

FILE: LiteDB/Engine/Query/Structures/QueryPlan.cs
  class QueryPlan (line 13) | internal class QueryPlan
    method QueryPlan (line 15) | public QueryPlan(string collection)
    method GetPipe (line 100) | public BasePipe GetPipe(TransactionService transaction, Snapshot snaps...
    method GetLookup (line 115) | public IDocumentLookup GetLookup(Snapshot snapshot, EnginePragmas prag...
    method GetExecutionPlan (line 144) | public BsonDocument GetExecutionPlan()

FILE: LiteDB/Engine/Query/Structures/Select.cs
  class Select (line 13) | internal class Select
    method Select (line 19) | public Select(BsonExpression expression, bool all)

FILE: LiteDB/Engine/Services/CollectionService.cs
  class CollectionService (line 9) | internal class CollectionService
    method CollectionService (line 16) | public CollectionService(HeaderPage header, DiskService disk, Snapshot...
    method CheckName (line 28) | public static void CheckName(string name, HeaderPage header)
    method Get (line 38) | public bool Get(string name, bool addIfNotExists, ref CollectionPage c...
    method Add (line 62) | private void Add(string name, ref CollectionPage collectionPage)

FILE: LiteDB/Engine/Services/DataService.cs
  class DataService (line 8) | internal class DataService
    method DataService (line 22) | public DataService(Snapshot snapshot, uint maxItemsCount)
    method Insert (line 31) | public PageAddress Insert(BsonDocument doc)
    method Update (line 82) | public void Update(CollectionPage col, PageAddress blockAddress, BsonD...
    method Read (line 162) | public IEnumerable<BufferSlice> Read(PageAddress address)
    method Delete (line 183) | public void Delete(PageAddress blockAddress)

FILE: LiteDB/Engine/Services/IndexService.cs
  class IndexService (line 13) | internal class IndexService
    method IndexService (line 19) | public IndexService(Snapshot snapshot, Collation collation, uint maxIt...
    method CreateIndex (line 31) | public CollectionIndex CreateIndex(string name, string expr, bool unique)
    method AddNode (line 63) | public IndexNode AddNode(CollectionIndex index, BsonValue key, PageAdd...
    method AddNode (line 81) | private IndexNode AddNode(
    method Flip (line 174) | public byte Flip()
    method GetNode (line 190) | public IndexNode GetNode(PageAddress address)
    method GetNodeList (line 202) | public IEnumerable<IndexNode> GetNodeList(PageAddress nodeAddress)
    method DeleteAll (line 220) | public void DeleteAll(PageAddress pkAddress)
    method DeleteList (line 240) | public IndexNode DeleteList(PageAddress pkAddress, HashSet<PageAddress...
    method DeleteSingleNode (line 274) | private void DeleteSingleNode(IndexNode node, CollectionIndex index)
    method DropIndex (line 300) | public void DropIndex(CollectionIndex index)
    method FindAll (line 340) | public IEnumerable<IndexNode> FindAll(CollectionIndex index, int order)
    method Find (line 363) | public IndexNode Find(CollectionIndex index, BsonValue value, bool sib...

FILE: LiteDB/Engine/Services/LockService.cs
  class LockService (line 16) | internal class LockService : IDisposable
    method LockService (line 23) | internal LockService(EnginePragmas pragmas)
    method EnterTransaction (line 41) | public void EnterTransaction()
    method ExitTransaction (line 52) | public void ExitTransaction()
    method EnterLock (line 71) | public void EnterLock(string collectionName)
    method ExitLock (line 84) | public void ExitLock(string collectionName)
    method EnterExclusive (line 95) | public bool EnterExclusive()
    method TryEnterExclusive (line 110) | public bool TryEnterExclusive(out bool mustExit)
    method ExitExclusive (line 143) | public void ExitExclusive()
    method Dispose (line 148) | public void Dispose()

FILE: LiteDB/Engine/Services/RebuildService.cs
  class RebuildService (line 16) | internal class RebuildService
    method RebuildService (line 21) | public RebuildService(EngineSettings settings)
    method Rebuild (line 40) | public long Rebuild(RebuildOptions options)
    method ReadFirstBytes (line 117) | private byte[] ReadFirstBytes(bool useAesStream = true)

FILE: LiteDB/Engine/Services/SnapShot.cs
  class Snapshot (line 14) | internal class Snapshot : IDisposable
    method Snapshot (line 45) | public Snapshot(
    method GetWritablePages (line 92) | public IEnumerable<BasePage> GetWritablePages(bool dirty, bool include...
    method Clear (line 115) | public void Clear()
    method Dispose (line 135) | public void Dispose()
    method GetPage (line 164) | public T GetPage<T>(uint pageID, bool useLatestVersion = false)
    method GetPage (line 173) | public T GetPage<T>(uint pageID, out FileOrigin origin, out long posit...
    method ReadPage (line 215) | private T ReadPage<T>(uint pageID, out FileOrigin origin, out long pos...
    method GetFreeDataPage (line 274) | public DataPage GetFreeDataPage(int bytesLength)
    method GetFreeIndexPage (line 309) | public IndexPage GetFreeIndexPage(int bytesLength, ref uint freeIndexP...
    method NewPage (line 336) | public T NewPage<T>()
    method AddOrRemoveFreeDataList (line 422) | public void AddOrRemoveFreeDataList(DataPage page)
    method AddOrRemoveFreeIndexList (line 455) | public void AddOrRemoveFreeIndexList(IndexPage page, ref uint startPag...
    method AddFreeList (line 494) | private void AddFreeList<T>(T page, ref uint startPageID) where T : Ba...
    method RemoveFreeList (line 520) | private void RemoveFreeList<T>(T page, ref uint startPageID) where T :...
    method DeletePage (line 558) | private void DeletePage<T>(T page)
    method DropCollection (line 601) | public void DropCollection(Action safePoint)
    method ToString (line 677) | public override string ToString()

FILE: LiteDB/Engine/Services/TransactionMonitor.cs
  class TransactionMonitor (line 15) | internal class TransactionMonitor : IDisposable
    method TransactionMonitor (line 33) | public TransactionMonitor(HeaderPage header, LockService locker, DiskS...
    method GetTransaction (line 47) | public TransactionService GetTransaction(bool create, bool queryOnly, ...
    method ReleaseTransaction (line 110) | public void ReleaseTransaction(TransactionService transaction)
    method GetThreadTransaction (line 149) | public TransactionService GetThreadTransaction()
    method GetInitialSize (line 162) | private int GetInitialSize()
    method TryExtend (line 192) | private bool TryExtend(TransactionService trans)
    method CheckSafepoint (line 212) | public bool CheckSafepoint(TransactionService trans)
    method Dispose (line 222) | public void Dispose()

FILE: LiteDB/Engine/Services/TransactionService.cs
  class TransactionService (line 15) | internal class TransactionService : IDisposable
    method TransactionService (line 59) | public TransactionService(HeaderPage header, LockService locker, DiskS...
    method CreateSnapshot (line 88) | public Snapshot CreateSnapshot(LockMode mode, string collection, bool ...
    method Safepoint (line 125) | public void Safepoint()
    method PersistDirtyPages (line 153) | private int PersistDirtyPages(bool commit)
    method Commit (line 247) | public void Commit()
    method Rollback (line 281) | public void Rollback()
    method ReturnNewPages (line 317) | private void ReturnNewPages()
    method Dispose (line 387) | public void Dispose()
    method Dispose (line 394) | protected virtual void Dispose(bool dispose)

FILE: LiteDB/Engine/Services/WalIndexService.cs
  class WalIndexService (line 15) | internal class WalIndexService
    method WalIndexService (line 32) | public WalIndexService(DiskService disk, LockService locker)
    method Clear (line 66) | public void Clear()
    method NextTransactionID (line 94) | public uint NextTransactionID()
    method GetPageIndex (line 102) | public long GetPageIndex(uint pageID, int version, out int walVersion)
    method ConfirmTransaction (line 158) | public void ConfirmTransaction(uint transactionID, ICollection<PagePos...
    method RestoreIndex (line 195) | public void RestoreIndex(ref HeaderPage header)
    method Checkpoint (line 261) | public int Checkpoint()
    method TryCheckpoint (line 284) | public int TryCheckpoint()
    method CheckpointInternal (line 309) | private int CheckpointInternal()

FILE: LiteDB/Engine/Sort/SortContainer.cs
  class SortContainer (line 17) | internal class SortContainer : IDisposable
    method SortContainer (line 52) | public SortContainer(Collation collation, int size)
    method Insert (line 58) | public void Insert(IEnumerable<KeyValuePair<BsonValue, PageAddress>> i...
    method InitializeReader (line 88) | public void InitializeReader(Stream stream, BufferSlice buffer, bool u...
    method MoveNext (line 102) | public bool MoveNext()
    method GetSourceFromStream (line 123) | private IEnumerable<BufferSlice> GetSourceFromStream(Stream stream)
    method Dispose (line 142) | public void Dispose()

FILE: LiteDB/Engine/Sort/SortDisk.cs
  class SortDisk (line 17) | internal class SortDisk : IDisposable
    method SortDisk (line 28) | public SortDisk(IStreamFactory factory, int containerSize, EnginePragm...
    method GetReader (line 44) | public Stream GetReader()
    method Return (line 52) | public void Return(Stream stream)
    method Return (line 60) | public void Return(long position)
    method GetContainerPosition (line 69) | public long GetContainerPosition()
    method Write (line 84) | public void Write(long position, BufferSlice buffer)
    method Dispose (line 99) | public void Dispose()

FILE: LiteDB/Engine/Sort/SortService.cs
  class SortService (line 21) | internal class SortService : IDisposable
    method SortService (line 46) | public SortService(SortDisk disk, int order, EnginePragmas pragmas)
    method Dispose (line 60) | public void Dispose()
    method Insert (line 84) | public void Insert(IEnumerable<KeyValuePair<BsonValue, PageAddress>> i...
    method Sort (line 116) | public IEnumerable<KeyValuePair<BsonValue, PageAddress>> Sort()
    method SliptValues (line 178) | private IEnumerable<IEnumerable<KeyValuePair<BsonValue, PageAddress>>>...
    method YieldValues (line 197) | private IEnumerable<KeyValuePair<BsonValue, PageAddress>> YieldValues(...

FILE: LiteDB/Engine/Structures/CollectionIndex.cs
  class CollectionIndex (line 8) | internal class CollectionIndex
    method CollectionIndex (line 68) | public CollectionIndex(byte slot, byte indexType, string name, string ...
    method CollectionIndex (line 80) | public CollectionIndex(BufferReader reader)
    method UpdateBuffer (line 95) | public void UpdateBuffer(BufferWriter writer)
    method GetLength (line 111) | public static int GetLength(CollectionIndex index)
    method GetLength (line 119) | public static int GetLength(string name, string expr)

FILE: LiteDB/Engine/Structures/CursorInfo.cs
  class CursorInfo (line 13) | internal class CursorInfo
    method CursorInfo (line 15) | public CursorInfo(string collection, Query query)

FILE: LiteDB/Engine/Structures/DataBlock.cs
  class DataB
Condensed preview — 418 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (5,625K chars).
[
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "chars": 620,
    "preview": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: \"[BUG]\"\nlabels: bug\nassignees: ''\n\n---\n\n**Version*"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "chars": 615,
    "preview": "---\nname: Feature request\nabout: Suggest an idea for this project\ntitle: \"[SUGGESTION]\"\nlabels: suggestion\nassignees: ''"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/question.md",
    "chars": 117,
    "preview": "---\nname: Question\nabout: Write your question about LiteDB\ntitle: \"[QUESTION]\"\nlabels: question\nassignees: ''\n\n---\n\n\n"
  },
  {
    "path": ".gitignore",
    "chars": 3643,
    "preview": "## Ignore Visual Studio temporary files, build results, and\n## files generated by popular Visual Studio add-ons.\n\n# MacO"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "chars": 5242,
    "preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nWe as members, contributors, and leaders pledge to make participa"
  },
  {
    "path": "ConsoleApp1/ConsoleApp1.csproj",
    "chars": 329,
    "preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <OutputType>Exe</OutputType>\n    <TargetFramework>net8.0</Targ"
  },
  {
    "path": "ConsoleApp1/Program.cs",
    "chars": 2442,
    "preview": "using LiteDB;\nusing LiteDB.Engine;\n\nusing System.Reflection.Emit;\nusing System.Reflection.PortableExecutable;\n\nvar pass"
  },
  {
    "path": "ConsoleApp1/Tools/Faker.Names.cs",
    "chars": 38939,
    "preview": "internal static partial class Faker\n{\n    private static string[] _maleNames =\n    {\n        \"Adeildo\", \"Adailton\", \"Abe"
  },
  {
    "path": "ConsoleApp1/Tools/Faker.cs",
    "chars": 3140,
    "preview": "using LiteDB;\n\ninternal static partial class Faker\n{\n    private static Random _random = new Random(420);\n\n    public s"
  },
  {
    "path": "LICENSE",
    "chars": 1086,
    "preview": "The MIT License (MIT)\n\nCopyright (c) 2014-2022 Mauricio David\n\nPermission is hereby granted, free of charge, to any pers"
  },
  {
    "path": "LiteDB/Client/Database/Collections/Aggregate.cs",
    "chars": 7287,
    "preview": "using System;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing static LiteDB.Constants;\n\nnamespace LiteDB\n{\n    "
  },
  {
    "path": "LiteDB/Client/Database/Collections/Delete.cs",
    "chars": 2016,
    "preview": "using System;\nusing System.Linq.Expressions;\nusing static LiteDB.Constants;\n\nnamespace LiteDB\n{\n    public partial clas"
  },
  {
    "path": "LiteDB/Client/Database/Collections/Find.cs",
    "chars": 3739,
    "preview": "using LiteDB.Engine;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressions;\n"
  },
  {
    "path": "LiteDB/Client/Database/Collections/Include.cs",
    "chars": 1424,
    "preview": "using System;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing static LiteDB.Constants;\n\nnamespace LiteDB\n{\n    "
  },
  {
    "path": "LiteDB/Client/Database/Collections/Index.cs",
    "chars": 4307,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Text.Reg"
  },
  {
    "path": "LiteDB/Client/Database/Collections/Insert.cs",
    "chars": 3848,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing static LiteDB.Constants;\n\nnamespace LiteDB\n{\n "
  },
  {
    "path": "LiteDB/Client/Database/Collections/Update.cs",
    "chars": 3557,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing static LiteDB.C"
  },
  {
    "path": "LiteDB/Client/Database/Collections/Upsert.cs",
    "chars": 1404,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing static LiteDB.Constants;\n\nnamespace LiteDB\n{\n "
  },
  {
    "path": "LiteDB/Client/Database/ILiteCollection.cs",
    "chars": 13666,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq.Expressions;\n\nnamespace LiteDB\n{\n    public interface"
  },
  {
    "path": "LiteDB/Client/Database/ILiteDatabase.cs",
    "chars": 5970,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing LiteDB.Engine;\n\nnamespace LiteDB\n{\n    public in"
  },
  {
    "path": "LiteDB/Client/Database/ILiteQueryable.cs",
    "chars": 1983,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressions;\n\nnamespace LiteDB\n{\n "
  },
  {
    "path": "LiteDB/Client/Database/ILiteRepository.cs",
    "chars": 6915,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq.Expressions;\n\nnamespace LiteDB\n{\n    public interface"
  },
  {
    "path": "LiteDB/Client/Database/LiteCollection.cs",
    "chars": 2338,
    "preview": "using LiteDB.Engine;\nusing System;\nusing System.Collections.Generic;\nusing static LiteDB.Constants;\n\nnamespace LiteDB\n{"
  },
  {
    "path": "LiteDB/Client/Database/LiteDatabase.cs",
    "chars": 13028,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\nusing S"
  },
  {
    "path": "LiteDB/Client/Database/LiteQueryable.cs",
    "chars": 12949,
    "preview": "using LiteDB.Engine;\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.L"
  },
  {
    "path": "LiteDB/Client/Database/LiteRepository.cs",
    "chars": 12066,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Linq.Expressions;\nusin"
  },
  {
    "path": "LiteDB/Client/Mapper/Attributes/BsonCtorAttribute.cs",
    "chars": 233,
    "preview": "using System;\nusing static LiteDB.Constants;\n\nnamespace LiteDB\n{\n    /// <summary>\n    /// Indicate which constructor m"
  },
  {
    "path": "LiteDB/Client/Mapper/Attributes/BsonFieldAttribute.cs",
    "chars": 412,
    "preview": "using System;\nusing static LiteDB.Constants;\n\nnamespace LiteDB\n{\n    /// <summary>\n    /// Set a name to this property "
  },
  {
    "path": "LiteDB/Client/Mapper/Attributes/BsonIdAttribute.cs",
    "chars": 458,
    "preview": "using System;\nusing static LiteDB.Constants;\n\nnamespace LiteDB\n{\n    /// <summary>\n    /// Indicate that property will "
  },
  {
    "path": "LiteDB/Client/Mapper/Attributes/BsonIgnoreAttribute.cs",
    "chars": 238,
    "preview": "using System;\nusing static LiteDB.Constants;\n\nnamespace LiteDB\n{\n    /// <summary>\n    /// Indicate that property will "
  },
  {
    "path": "LiteDB/Client/Mapper/Attributes/BsonRefAttribute.cs",
    "chars": 531,
    "preview": "using System;\nusing static LiteDB.Constants;\n\nnamespace LiteDB\n{\n    /// <summary>\n    /// Indicate that field are not "
  },
  {
    "path": "LiteDB/Client/Mapper/BsonMapper.Deserialize.cs",
    "chars": 11480,
    "preview": "using System;\nusing System.Linq;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Reflection;\nus"
  },
  {
    "path": "LiteDB/Client/Mapper/BsonMapper.GetEntityMapper.cs",
    "chars": 9129,
    "preview": "using System;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Re"
  },
  {
    "path": "LiteDB/Client/Mapper/BsonMapper.Serialize.cs",
    "chars": 7193,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Reflection;\nu"
  },
  {
    "path": "LiteDB/Client/Mapper/BsonMapper.cs",
    "chars": 14871,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing Sys"
  },
  {
    "path": "LiteDB/Client/Mapper/EntityBuilder.cs",
    "chars": 3933,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressi"
  },
  {
    "path": "LiteDB/Client/Mapper/EntityMapper.cs",
    "chars": 2134,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressi"
  },
  {
    "path": "LiteDB/Client/Mapper/Linq/LinqExpressionVisitor.cs",
    "chars": 27367,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressi"
  },
  {
    "path": "LiteDB/Client/Mapper/Linq/ParameterExpressionVisitor.cs",
    "chars": 920,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressi"
  },
  {
    "path": "LiteDB/Client/Mapper/Linq/TypeResolver/BsonValueResolver.cs",
    "chars": 1898,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressi"
  },
  {
    "path": "LiteDB/Client/Mapper/Linq/TypeResolver/ConvertResolver.cs",
    "chars": 1014,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressi"
  },
  {
    "path": "LiteDB/Client/Mapper/Linq/TypeResolver/DateTimeResolver.cs",
    "chars": 2703,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressi"
  },
  {
    "path": "LiteDB/Client/Mapper/Linq/TypeResolver/EnumerableResolver.cs",
    "chars": 3434,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressi"
  },
  {
    "path": "LiteDB/Client/Mapper/Linq/TypeResolver/GuidResolver.cs",
    "chars": 1491,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressi"
  },
  {
    "path": "LiteDB/Client/Mapper/Linq/TypeResolver/ICollectionResolver.cs",
    "chars": 579,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressi"
  },
  {
    "path": "LiteDB/Client/Mapper/Linq/TypeResolver/ITypeResolver.cs",
    "chars": 458,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressi"
  },
  {
    "path": "LiteDB/Client/Mapper/Linq/TypeResolver/MathResolver.cs",
    "chars": 944,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressi"
  },
  {
    "path": "LiteDB/Client/Mapper/Linq/TypeResolver/NullableResolver.cs",
    "chars": 721,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressi"
  },
  {
    "path": "LiteDB/Client/Mapper/Linq/TypeResolver/NumberResolver.cs",
    "chars": 1204,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressi"
  },
  {
    "path": "LiteDB/Client/Mapper/Linq/TypeResolver/ObjectIdResolver.cs",
    "chars": 1352,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressi"
  },
  {
    "path": "LiteDB/Client/Mapper/Linq/TypeResolver/RegexResolver.cs",
    "chars": 766,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressi"
  },
  {
    "path": "LiteDB/Client/Mapper/Linq/TypeResolver/StringResolver.cs",
    "chars": 2269,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressi"
  },
  {
    "path": "LiteDB/Client/Mapper/MemberMapper.cs",
    "chars": 2170,
    "preview": "using System;\nusing System.Reflection;\nusing static LiteDB.Constants;\n\nnamespace LiteDB\n{\n    /// <summary>\n    /// Int"
  },
  {
    "path": "LiteDB/Client/Mapper/Reflection/Reflection.Expression.cs",
    "chars": 3288,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressi"
  },
  {
    "path": "LiteDB/Client/Mapper/Reflection/Reflection.cs",
    "chars": 13010,
    "preview": "using System;\nusing System.CodeDom;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusin"
  },
  {
    "path": "LiteDB/Client/Mapper/TypeNameBinder/DefaultTypeNameBinder.cs",
    "chars": 2993,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Reflection;\n\nnamespace LiteDB\n{\n    public class DefaultTyp"
  },
  {
    "path": "LiteDB/Client/Mapper/TypeNameBinder/ITypeNameBinder.cs",
    "chars": 155,
    "preview": "using System;\n\nnamespace LiteDB\n{\n    public interface ITypeNameBinder\n    {\n        string GetName(Type type);\n       "
  },
  {
    "path": "LiteDB/Client/Shared/SharedDataReader.cs",
    "chars": 1233,
    "preview": "using LiteDB.Engine;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressions;\n"
  },
  {
    "path": "LiteDB/Client/Shared/SharedEngine.cs",
    "chars": 7588,
    "preview": "using LiteDB.Engine;\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Threading;\n#if NETFR"
  },
  {
    "path": "LiteDB/Client/SqlParser/Commands/Begin.cs",
    "chars": 785,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing LiteDB.Engine;\nusing static LiteDB.Constants;\n"
  },
  {
    "path": "LiteDB/Client/SqlParser/Commands/Checkpoint.cs",
    "chars": 597,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing LiteDB.Engine;\nusing static LiteDB.Constants;\n"
  },
  {
    "path": "LiteDB/Client/SqlParser/Commands/Commit.cs",
    "chars": 770,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing LiteDB.Engine;\nusing static LiteDB.Constants;\n"
  },
  {
    "path": "LiteDB/Client/SqlParser/Commands/Create.cs",
    "chars": 1530,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing LiteDB.Engine;\nusing static LiteDB.Constants;\n"
  },
  {
    "path": "LiteDB/Client/SqlParser/Commands/Delete.cs",
    "chars": 1013,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing LiteDB.Engine;\nusing static LiteDB.Constants;\n"
  },
  {
    "path": "LiteDB/Client/SqlParser/Commands/Drop.cs",
    "chars": 1493,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing LiteDB.Engine;\nusing static LiteDB.Constants;\n"
  },
  {
    "path": "LiteDB/Client/SqlParser/Commands/Insert.cs",
    "chars": 1823,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing LiteDB.Engine;\nusing static LiteDB.Constants;\n"
  },
  {
    "path": "LiteDB/Client/SqlParser/Commands/ParseLists.cs",
    "chars": 1892,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing LiteDB.Engine;\nusing static"
  },
  {
    "path": "LiteDB/Client/SqlParser/Commands/Pragma.cs",
    "chars": 1413,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing LiteDB.Engine;\nusing static L"
  },
  {
    "path": "LiteDB/Client/SqlParser/Commands/Rebuild.cs",
    "chars": 1335,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing LiteDB.Engine;\nusing static LiteDB.Constants;\n"
  },
  {
    "path": "LiteDB/Client/SqlParser/Commands/Rename.cs",
    "chars": 880,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing LiteDB.Engine;\nusing static LiteDB.Constants;\n"
  },
  {
    "path": "LiteDB/Client/SqlParser/Commands/Rollback.cs",
    "chars": 778,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing LiteDB.Engine;\nusing static LiteDB.Constants;\n"
  },
  {
    "path": "LiteDB/Client/SqlParser/Commands/Select.cs",
    "chars": 7755,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing LiteDB.Engine;\nusing static L"
  },
  {
    "path": "LiteDB/Client/SqlParser/Commands/Update.cs",
    "chars": 1548,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing LiteDB.Engine;\nusing static LiteDB.Constants;\n"
  },
  {
    "path": "LiteDB/Client/SqlParser/SqlParser.cs",
    "chars": 2013,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.Linq;\nusing LiteDB.Engine;\nusi"
  },
  {
    "path": "LiteDB/Client/Storage/ILiteStorage.cs",
    "chars": 2869,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq.Expressions;\n\nnamespace LiteDB\n{\n   "
  },
  {
    "path": "LiteDB/Client/Storage/LiteFileInfo.cs",
    "chars": 2773,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Text.RegularExpressions;\nusing static Lit"
  },
  {
    "path": "LiteDB/Client/Storage/LiteFileStream.Read.cs",
    "chars": 3262,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing static LiteDB.Constants;\n\nnam"
  },
  {
    "path": "LiteDB/Client/Storage/LiteFileStream.Write.cs",
    "chars": 2047,
    "preview": "using System;\nusing System.IO;\nusing System.Linq;\nusing static LiteDB.Constants;\n\nnamespace LiteDB\n{\n    public partial"
  },
  {
    "path": "LiteDB/Client/Storage/LiteFileStream.cs",
    "chars": 3939,
    "preview": "using System;\nusing System.IO;\nusing System.Linq;\nusing static LiteDB.Constants;\n\nnamespace LiteDB\n{\n    public partial"
  },
  {
    "path": "LiteDB/Client/Storage/LiteStorage.cs",
    "chars": 7719,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Linq.Expressions;\nusin"
  },
  {
    "path": "LiteDB/Client/Structures/ConnectionString.cs",
    "chars": 5130,
    "preview": "using LiteDB.Engine;\nusing System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing static LiteDB.Con"
  },
  {
    "path": "LiteDB/Client/Structures/ConnectionType.cs",
    "chars": 267,
    "preview": "using LiteDB.Engine;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing static LiteDB.Constants;\n"
  },
  {
    "path": "LiteDB/Client/Structures/Query.cs",
    "chars": 8263,
    "preview": "using LiteDB.Engine;\n\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nusing static LiteDB.Constants"
  },
  {
    "path": "LiteDB/Client/Structures/QueryAny.cs",
    "chars": 3865,
    "preview": "using LiteDB.Engine;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing static LiteDB.Constants;\n"
  },
  {
    "path": "LiteDB/Document/Bson/BsonSerializer.cs",
    "chars": 1419,
    "preview": "using LiteDB.Engine;\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing static LiteDB.Constants;\n\nn"
  },
  {
    "path": "LiteDB/Document/BsonArray.cs",
    "chars": 4392,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing static LiteDB.Consta"
  },
  {
    "path": "LiteDB/Document/BsonAutoId.cs",
    "chars": 245,
    "preview": "namespace LiteDB\n{\n    /// <summary>\n    /// All supported BsonTypes supported in AutoId insert operation\n    /// </sum"
  },
  {
    "path": "LiteDB/Document/BsonDocument.cs",
    "chars": 5277,
    "preview": "using LiteDB.Engine;\nusing System;\nusing System.Collections;\nusing System.Collections.Concurrent;\nusing System.Collecti"
  },
  {
    "path": "LiteDB/Document/BsonType.cs",
    "chars": 464,
    "preview": "namespace LiteDB\n{\n    /// <summary>\n    /// All supported BsonTypes in sort order\n    /// </summary>\n    public enum B"
  },
  {
    "path": "LiteDB/Document/BsonValue.cs",
    "chars": 23442,
    "preview": "using LiteDB.Engine;\nusing System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Globalizati"
  },
  {
    "path": "LiteDB/Document/DataReader/BsonDataReader.cs",
    "chars": 4011,
    "preview": "using LiteDB.Engine;\nusing System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing "
  },
  {
    "path": "LiteDB/Document/DataReader/BsonDataReaderExtensions.cs",
    "chars": 1343,
    "preview": "using LiteDB.Engine;\nusing System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing"
  },
  {
    "path": "LiteDB/Document/DataReader/IBsonDataReader.cs",
    "chars": 270,
    "preview": "using System;\n\nnamespace LiteDB\n{\n    public interface IBsonDataReader : IDisposable\n    {\n        BsonValue this[strin"
  },
  {
    "path": "LiteDB/Document/Expression/BsonExpression.cs",
    "chars": 17943,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing Sy"
  },
  {
    "path": "LiteDB/Document/Expression/Methods/Aggregate.cs",
    "chars": 3268,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressi"
  },
  {
    "path": "LiteDB/Document/Expression/Methods/DataTypes.cs",
    "chars": 17089,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.Linq;"
  },
  {
    "path": "LiteDB/Document/Expression/Methods/Date.cs",
    "chars": 5141,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressi"
  },
  {
    "path": "LiteDB/Document/Expression/Methods/Math.cs",
    "chars": 1830,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressi"
  },
  {
    "path": "LiteDB/Document/Expression/Methods/Misc.cs",
    "chars": 7365,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressi"
  },
  {
    "path": "LiteDB/Document/Expression/Methods/String.cs",
    "chars": 9009,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressi"
  },
  {
    "path": "LiteDB/Document/Expression/Parser/BsonExpressionAttributes.cs",
    "chars": 391,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressi"
  },
  {
    "path": "LiteDB/Document/Expression/Parser/BsonExpressionFunctions.cs",
    "chars": 2572,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Reflection;\nusing System.Text;\nusing Sy"
  },
  {
    "path": "LiteDB/Document/Expression/Parser/BsonExpressionOperators.cs",
    "chars": 15007,
    "preview": "using LiteDB.Engine;\nusing System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing"
  },
  {
    "path": "LiteDB/Document/Expression/Parser/BsonExpressionParser.cs",
    "chars": 61780,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing Sy"
  },
  {
    "path": "LiteDB/Document/Expression/Parser/BsonExpressionType.cs",
    "chars": 885,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressi"
  },
  {
    "path": "LiteDB/Document/Expression/Parser/DocumentScope.cs",
    "chars": 287,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressi"
  },
  {
    "path": "LiteDB/Document/Expression/Parser/ExpressionContext.cs",
    "chars": 1003,
    "preview": "using LiteDB.Engine;\nusing System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing"
  },
  {
    "path": "LiteDB/Document/Json/JsonReader.cs",
    "chars": 6331,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.IO;\nusing static LiteDB.Consta"
  },
  {
    "path": "LiteDB/Document/Json/JsonSerializer.cs",
    "chars": 3191,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Text;\nusing static LiteDB.Constants;\n\nnam"
  },
  {
    "path": "LiteDB/Document/Json/JsonWriter.cs",
    "chars": 10191,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\nusing s"
  },
  {
    "path": "LiteDB/Document/ObjectId.cs",
    "chars": 9745,
    "preview": "using System;\nusing System.Diagnostics;\nusing System.Runtime.CompilerServices;\nusing System.Security;\nusing System.Thre"
  },
  {
    "path": "LiteDB/Engine/Disk/DiskReader.cs",
    "chars": 3097,
    "preview": "using System;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing"
  },
  {
    "path": "LiteDB/Engine/Disk/DiskService.cs",
    "chars": 11863,
    "preview": "using System;\nusing System.Buffers;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Threading;\nusing st"
  },
  {
    "path": "LiteDB/Engine/Disk/MemoryCache.cs",
    "chars": 15687,
    "preview": "using System;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Th"
  },
  {
    "path": "LiteDB/Engine/Disk/Serializer/BufferReader.cs",
    "chars": 18480,
    "preview": "using System;\nusing System.Buffers;\nusing System.Collections.Generic;\nusing System.IO;\nusing static LiteDB.Constants;\n\n"
  },
  {
    "path": "LiteDB/Engine/Disk/Serializer/BufferWriter.cs",
    "chars": 14978,
    "preview": "using System;\nusing System.Buffers;\nusing System.Collections.Generic;\nusing System.Text;\nusing static LiteDB.Constants;"
  },
  {
    "path": "LiteDB/Engine/Disk/StreamFactory/FileStreamFactory.cs",
    "chars": 4097,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing Sy"
  },
  {
    "path": "LiteDB/Engine/Disk/StreamFactory/IStreamFactory.cs",
    "chars": 1291,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing Sy"
  },
  {
    "path": "LiteDB/Engine/Disk/StreamFactory/StreamFactory.cs",
    "chars": 2632,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing Sy"
  },
  {
    "path": "LiteDB/Engine/Disk/StreamFactory/StreamPool.cs",
    "chars": 2129,
    "preview": "using System;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq"
  },
  {
    "path": "LiteDB/Engine/Disk/Streams/AesStream.cs",
    "chars": 8129,
    "preview": "using System;\nusing System.Buffers;\nusing System.IO;\nusing System.Linq;\nusing System.Security.Cryptography;\nusing stati"
  },
  {
    "path": "LiteDB/Engine/Disk/Streams/ConcurrentStream.cs",
    "chars": 2480,
    "preview": "using System;\nusing System.IO;\nusing static LiteDB.Constants;\n\nnamespace LiteDB.Engine\n{\n    /// <summary>\n    /// Impl"
  },
  {
    "path": "LiteDB/Engine/Disk/Streams/TempStream.cs",
    "chars": 3331,
    "preview": "using System;\nusing System.IO;\nusing static LiteDB.Constants;\n\nnamespace LiteDB.Engine\n{\n    /// <summary>\n    /// Impl"
  },
  {
    "path": "LiteDB/Engine/Engine/Collection.cs",
    "chars": 3515,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing static LiteDB.Constants;\n\nn"
  },
  {
    "path": "LiteDB/Engine/Engine/Delete.cs",
    "chars": 3758,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing static LiteDB.Constants;\n\nnamespace LiteDB.Eng"
  },
  {
    "path": "LiteDB/Engine/Engine/Index.cs",
    "chars": 5659,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.RegularExpressions;\nusing static L"
  },
  {
    "path": "LiteDB/Engine/Engine/Insert.cs",
    "chars": 3275,
    "preview": "using System;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing Sy"
  },
  {
    "path": "LiteDB/Engine/Engine/Pragma.cs",
    "chars": 1103,
    "preview": "using System;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing System.Linq;\nusing static Li"
  },
  {
    "path": "LiteDB/Engine/Engine/Query.cs",
    "chars": 1501,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Linq;\nusing static LiteDB.Consta"
  },
  {
    "path": "LiteDB/Engine/Engine/Rebuild.cs",
    "chars": 3413,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\n\nusing static Li"
  },
  {
    "path": "LiteDB/Engine/Engine/Recovery.cs",
    "chars": 781,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\n\nusing static Li"
  },
  {
    "path": "LiteDB/Engine/Engine/Sequence.cs",
    "chars": 3425,
    "preview": "using System;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing Sy"
  },
  {
    "path": "LiteDB/Engine/Engine/SystemCollections.cs",
    "chars": 1632,
    "preview": "using System;\nusing System.Collections.Generic;\nusing static LiteDB.Constants;\n\nnamespace LiteDB.Engine\n{\n    public pa"
  },
  {
    "path": "LiteDB/Engine/Engine/Transaction.cs",
    "chars": 3823,
    "preview": "using System;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing System.Threading;\nusing stat"
  },
  {
    "path": "LiteDB/Engine/Engine/Update.cs",
    "chars": 6357,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing static LiteDB.Constants;\n\nnamespace LiteDB.Eng"
  },
  {
    "path": "LiteDB/Engine/Engine/Upgrade.cs",
    "chars": 2268,
    "preview": "using System;\nusing System.Buffers;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System."
  },
  {
    "path": "LiteDB/Engine/Engine/Upsert.cs",
    "chars": 1939,
    "preview": "using System;\nusing System.Collections.Generic;\nusing static LiteDB.Constants;\n\nnamespace LiteDB.Engine\n{\n    public pa"
  },
  {
    "path": "LiteDB/Engine/EnginePragmas.cs",
    "chars": 7956,
    "preview": "using System;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing"
  },
  {
    "path": "LiteDB/Engine/EngineSettings.cs",
    "chars": 5699,
    "preview": "using System;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing "
  },
  {
    "path": "LiteDB/Engine/EngineState.cs",
    "chars": 1539,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.IO;\nusing System.Linq;\nusing Syst"
  },
  {
    "path": "LiteDB/Engine/FileReader/FileReaderError.cs",
    "chars": 589,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Text;\n\nusing static LiteDB.Constants;\n\nnamespace LiteDB.En"
  },
  {
    "path": "LiteDB/Engine/FileReader/FileReaderV7.cs",
    "chars": 14979,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\nusing System.Tex"
  },
  {
    "path": "LiteDB/Engine/FileReader/FileReaderV8.cs",
    "chars": 23730,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\nusing S"
  },
  {
    "path": "LiteDB/Engine/FileReader/IFileReader.cs",
    "chars": 1040,
    "preview": "using System;\nusing System.Collections.Generic;\n\nnamespace LiteDB.Engine\n{\n    /// <summary>\n    /// Interface to read "
  },
  {
    "path": "LiteDB/Engine/FileReader/IndexInfo.cs",
    "chars": 394,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusi"
  },
  {
    "path": "LiteDB/Engine/FileReader/Legacy/AesEncryption.cs",
    "chars": 3197,
    "preview": "using System;\nusing System.Security.Cryptography;\nusing System.IO;\nusing System.Text;\nusing static LiteDB.Constants;\n\nn"
  },
  {
    "path": "LiteDB/Engine/FileReader/Legacy/BsonReader.cs",
    "chars": 4362,
    "preview": "using System;\nusing System.Text;\nusing static LiteDB.Constants;\n\nnamespace LiteDB\n{\n    /// <summary>\n    /// Internal "
  },
  {
    "path": "LiteDB/Engine/FileReader/Legacy/ByteReader.cs",
    "chars": 6093,
    "preview": "using LiteDB.Engine;\nusing System;\nusing System.Text;\nusing static LiteDB.Constants;\n\nnamespace LiteDB\n{\n    internal c"
  },
  {
    "path": "LiteDB/Engine/ILiteEngine.cs",
    "chars": 1180,
    "preview": "using System;\nusing System.Collections.Generic;\n\nnamespace LiteDB.Engine\n{\n    public interface ILiteEngine : IDisposab"
  },
  {
    "path": "LiteDB/Engine/LiteEngine.cs",
    "chars": 8863,
    "preview": "using LiteDB.Utils;\n\nusing System;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing System."
  },
  {
    "path": "LiteDB/Engine/Pages/BasePage.cs",
    "chars": 30054,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.IO;\nusing System.Linq;\nusing sta"
  },
  {
    "path": "LiteDB/Engine/Pages/CollectionPage.cs",
    "chars": 5823,
    "preview": "using System;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq"
  },
  {
    "path": "LiteDB/Engine/Pages/DataPage.cs",
    "chars": 4476,
    "preview": "using System.Collections.Generic;\nusing static LiteDB.Constants;\n\nnamespace LiteDB.Engine\n{\n    /// <summary>\n    /// T"
  },
  {
    "path": "LiteDB/Engine/Pages/HeaderPage.cs",
    "chars": 8307,
    "preview": "using System;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing S"
  },
  {
    "path": "LiteDB/Engine/Pages/IndexPage.cs",
    "chars": 2489,
    "preview": "using System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing static LiteDB.Constants;\n\nnamespace LiteDB."
  },
  {
    "path": "LiteDB/Engine/Pragmas.cs",
    "chars": 429,
    "preview": "namespace LiteDB.Engine\n{\n    public static class Pragmas\n    {\n        public const string USER_VERSION = nameof(USER_V"
  },
  {
    "path": "LiteDB/Engine/Query/IndexQuery/Index.cs",
    "chars": 1731,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing static LiteDB.Constants;\n\nnamespace LiteDB.Eng"
  },
  {
    "path": "LiteDB/Engine/Query/IndexQuery/IndexAll.cs",
    "chars": 776,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing static LiteDB.Constants;\n\nnamespace LiteDB.Eng"
  },
  {
    "path": "LiteDB/Engine/Query/IndexQuery/IndexEquals.cs",
    "chars": 1901,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing static LiteDB.Constants;\n\nnamespace LiteDB.Eng"
  },
  {
    "path": "LiteDB/Engine/Query/IndexQuery/IndexIn.cs",
    "chars": 1238,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing static LiteDB.Constants;\n\nnamespace LiteDB.Eng"
  },
  {
    "path": "LiteDB/Engine/Query/IndexQuery/IndexLike.cs",
    "chars": 4738,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing static LiteDB.Constants;\n\nnamespace LiteDB.Eng"
  },
  {
    "path": "LiteDB/Engine/Query/IndexQuery/IndexRange.cs",
    "chars": 4467,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing static LiteDB.Constants;\n\nnamespace LiteDB.Eng"
  },
  {
    "path": "LiteDB/Engine/Query/IndexQuery/IndexScan.cs",
    "chars": 950,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing static LiteDB.Constants;\n\nnamespace LiteDB.Eng"
  },
  {
    "path": "LiteDB/Engine/Query/IndexQuery/IndexVirtual.cs",
    "chars": 2200,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing static LiteDB.Constants;\n\nnamespace LiteDB.Eng"
  },
  {
    "path": "LiteDB/Engine/Query/Lookup/DatafileLookup.cs",
    "chars": 1150,
    "preview": "using System.Collections.Generic;\nusing static LiteDB.Constants;\n\nnamespace LiteDB.Engine\n{\n    /// <summary>\n    /// I"
  },
  {
    "path": "LiteDB/Engine/Query/Lookup/IDocumentLookup.cs",
    "chars": 326,
    "preview": "using System;\n\nnamespace LiteDB.Engine\n{\n    /// <summary>\n    /// Interface for abstract document lookup that can be d"
  },
  {
    "path": "LiteDB/Engine/Query/Lookup/IndexKeyLoader.cs",
    "chars": 952,
    "preview": "using System.Collections.Generic;\nusing static LiteDB.Constants;\n\nnamespace LiteDB.Engine\n{\n    /// <summary>\n    /// I"
  },
  {
    "path": "LiteDB/Engine/Query/Pipeline/BasePipe.cs",
    "chars": 6592,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing static LiteDB.Constants;\n\nnamespace LiteDB.Eng"
  },
  {
    "path": "LiteDB/Engine/Query/Pipeline/DocumentCacheEnumerable.cs",
    "chars": 2749,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.IO;\nus"
  },
  {
    "path": "LiteDB/Engine/Query/Pipeline/GroupByPipe.cs",
    "chars": 5011,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing static LiteDB.Constants;\n\nnamespace LiteDB.Eng"
  },
  {
    "path": "LiteDB/Engine/Query/Pipeline/QueryPipe.cs",
    "chars": 4052,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing static LiteDB.Constants;\n\nnamespace LiteDB.Eng"
  },
  {
    "path": "LiteDB/Engine/Query/Query.cs",
    "chars": 3269,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusi"
  },
  {
    "path": "LiteDB/Engine/Query/QueryExecutor.cs",
    "chars": 7095,
    "preview": "using LiteDB.Utils.Extensions;\n\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nusing static LiteDB."
  },
  {
    "path": "LiteDB/Engine/Query/QueryOptimization.cs",
    "chars": 14121,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing static LiteDB.Constants;\n\nnamespace LiteDB.Eng"
  },
  {
    "path": "LiteDB/Engine/Query/Structures/GroupBy.cs",
    "chars": 696,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusi"
  },
  {
    "path": "LiteDB/Engine/Query/Structures/IndexCost.cs",
    "chars": 4169,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing static LiteDB.Constants;\n\nnamespace LiteDB.Eng"
  },
  {
    "path": "LiteDB/Engine/Query/Structures/OrderBy.cs",
    "chars": 539,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusi"
  },
  {
    "path": "LiteDB/Engine/Query/Structures/QueryPlan.cs",
    "chars": 7598,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing static LiteDB.Constants;\n\nn"
  },
  {
    "path": "LiteDB/Engine/Query/Structures/Select.cs",
    "chars": 524,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusi"
  },
  {
    "path": "LiteDB/Engine/Services/CollectionService.cs",
    "chars": 3066,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing static LiteDB.Constants;\n\nna"
  },
  {
    "path": "LiteDB/Engine/Services/DataService.cs",
    "chars": 7029,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing static LiteDB.Constants;\n\nnamespace LiteDB.Engin"
  },
  {
    "path": "LiteDB/Engine/Services/IndexService.cs",
    "chars": 14646,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing static LiteDB.Constants;\n\nnam"
  },
  {
    "path": "LiteDB/Engine/Services/LockService.cs",
    "chars": 5908,
    "preview": "using System;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Th"
  },
  {
    "path": "LiteDB/Engine/Services/RebuildService.cs",
    "chars": 4570,
    "preview": "using System;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq"
  },
  {
    "path": "LiteDB/Engine/Services/SnapShot.cs",
    "chars": 25026,
    "preview": "using System;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Te"
  },
  {
    "path": "LiteDB/Engine/Services/TransactionMonitor.cs",
    "chars": 7844,
    "preview": "using System;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Ru"
  },
  {
    "path": "LiteDB/Engine/Services/TransactionService.cs",
    "chars": 17588,
    "preview": "using System;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Ru"
  },
  {
    "path": "LiteDB/Engine/Services/WalIndexService.cs",
    "chars": 11941,
    "preview": "using System;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Th"
  },
  {
    "path": "LiteDB/Engine/Sort/SortContainer.cs",
    "chars": 4065,
    "preview": "using System;\nusing System.Buffers;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing System"
  },
  {
    "path": "LiteDB/Engine/Sort/SortDisk.cs",
    "chars": 3176,
    "preview": "using System;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq"
  },
  {
    "path": "LiteDB/Engine/Sort/SortService.cs",
    "chars": 7287,
    "preview": "using System;\nusing System.Buffers;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing System"
  },
  {
    "path": "LiteDB/Engine/Structures/CollectionIndex.cs",
    "chars": 4106,
    "preview": "using System;\nusing System.Text;\nusing System.Text.RegularExpressions;\nusing static LiteDB.Constants;\n\nnamespace LiteDB"
  },
  {
    "path": "LiteDB/Engine/Structures/CursorInfo.cs",
    "chars": 668,
    "preview": "using System;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing Sy"
  },
  {
    "path": "LiteDB/Engine/Structures/DataBlock.cs",
    "chars": 3094,
    "preview": "using System;\nusing static LiteDB.Constants;\n\nnamespace LiteDB.Engine\n{\n    internal class DataBlock\n    {\n        /// "
  },
  {
    "path": "LiteDB/Engine/Structures/Done.cs",
    "chars": 343,
    "preview": "using System;\nusing System.Collections.Generic;\nusing static LiteDB.Constants;\n\nnamespace LiteDB.Engine\n{\n    /// <summ"
  },
  {
    "path": "LiteDB/Engine/Structures/FileOrigin.cs",
    "chars": 357,
    "preview": "namespace LiteDB.Engine\n{\n    public enum FileOrigin : byte\n    {\n        /// <summary>\n        /// There is no origin "
  },
  {
    "path": "LiteDB/Engine/Structures/IndexNode.cs",
    "chars": 8014,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing static LiteDB.Constants;\n\nnamespace LiteDB.Eng"
  },
  {
    "path": "LiteDB/Engine/Structures/LockMode.cs",
    "chars": 356,
    "preview": "namespace LiteDB.Engine\n{\n    /// <summary>\n    /// Represents a snapshot lock mode\n    /// </summary>\n    internal enu"
  },
  {
    "path": "LiteDB/Engine/Structures/PageAddress.cs",
    "chars": 2294,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing static LiteDB.Constants;\n\nnamespace Lit"
  },
  {
    "path": "LiteDB/Engine/Structures/PageBuffer.cs",
    "chars": 2889,
    "preview": "using System;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing"
  }
]

// ... and 218 more files (download for full content)

About this extraction

This page contains the full source code of the litedb-org/LiteDB GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 418 files (4.8 MB), approximately 1.3M tokens, and a symbol index with 2642 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!