Strilanc
NuGet publisher profile
Packages (7)
Strilanc.Value.May
Implements an option type (Strilanc.Value.May<T>) that encourages usage based on pattern matching rather than ForceGetValue. Also includes utility methods for producing, consuming and transforming May<T>. Note on null: May<T> treats null like any other value. May.NoValue is distinct from null, and both are distinct from ((object)null).Maybe().
Strilanc.Angle
A simple library for working with directions and rotations in 2d. Provides types for representing facing (Dir), turning (Turn), conversion (Basis) and clamping (Range).
TwistedOak.Collections.PerishableCollection
An observable collection where items are removed when a lifetime paired with them ends. Affords projecting, filtering, and other functional-style usage by removing the need to equate removed items with previously added items.
TwistedOak.Util.Lifetime
A small library that implements an improved version of System.Threading.CancellationToken with support for removable registrations, to allow for garbage collection in the presence of long-lived tokens, plus some related utilities. Motivation: cancellation tokens can be the source of memory "leaks", because an unbounded number of completed operations may have registered now-pointless callbacks on a token that can't be released or cancelled. The callbacks may reference all kinds of data, preventing effective garbage collection. Using a Lifetime allows fixing these issues because callback registrations can be given lifetimes of their own. Additional utilities: LifetimeSource, LifetimeExchanger, DisposableLifetime, Max, Min, CreateDependentSource.
Strilanc.LinqToCollections
Implements types and extension methods for transforming and implicitly defining instances of the readonly collection interfaces new to .Net 4.5. (The interfaces are IReadOnlyList<T>, IReadOnlyCollection<T>, and IReadOnlyDictionary<K,V>.) For example, the library implements a Select method that ensures the result of 'from e in list select e * e' supports random access.
Strilanc.PickleJar
Parse and pack simple binary formats by describing the format as a combination of basic binary elements. A 'jar' is a combination parser/packer. The library includes basic jars, like a jar for big-endian 32-bit integers, as well as combinators that augment jars into more complicated jars, like 'repeat 5 times' and 'followed by'. Combining jars is much less error prone than hand-writing parsers and packers, but gives comparable performance thanks to runtime optimization and compilation. Follow the project url for more information and usage examples.
TwistedOak.Threading
A variety of utility classes and methods related to tasks, synchronization contexts, asynchrony, exclusion, and awaiting. Makes tasks queryable and synchronization contexts awaitable. Includes anonymous awaitable types, a void task completion source, a simple one time lock, etc. See the project url for more details.