Skip to content
/ csutils Public

Collection of C# utility methods and classes for reference and copy/paste

License

Notifications You must be signed in to change notification settings

ujr/csutils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C# Utils

A small collection of C# utility methods and classes.
Intended for selective copy/paste rather than assembly reference.

The code here is set up as a few .NET Core projects with unit tests, so that it can be built and verified by running the test suite:

git clone https://github.com/ujr/csutils
cd csutils/src
dotnet restore
dotnet build
dotnet test

The Code

Utils

JSON

  • JsonWriter.cs - simple API to write syntactically correct JSON
  • JsonReader.cs - a low-level reader for JSON data
  • JsonException.cs - used by JsonReader (but not by JsonWriter)
  • Json.cs - minimalistic JSON serialization and hydratisation (dynamics)

CSV

IR

  • Inverted Index trials for Information Retrieval
  • Boolean model, on-the-fly merging of postings lists
  • README.md - notes, usage, glossary
  • DocSetIterator.cs - enumerating and merging doc ID sets
  • Query.cs - Boolean queries over index; query parser

CDB

A port of the Constant Database (CDB) to C#. A CDB is an on-disk associative array, mapping byte strings to byte strings, with maximum performance and minimum overhead. See CDB.md. The CDB code here is dedicated to the public domain (as is the original).

  • Cdb.cs - static accessors: Get, Open, Make, Dump
  • CdbFile.cs - reading a constant database
  • CdbMake.cs - creating a constant database

Documentation

Where available, read the XML comments in the code, and see the unit tests.

There are some general notes about tools and concepts, and details about some of the utility classes:

About

Collection of C# utility methods and classes for reference and copy/paste

Topics

Resources

License

Stars

Watchers

Forks

Languages