RedHerring.Alexandria 1.0.0

dotnet add package RedHerring.Alexandria --version 1.0.0                
NuGet\Install-Package RedHerring.Alexandria -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RedHerring.Alexandria" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add RedHerring.Alexandria --version 1.0.0                
#r "nuget: RedHerring.Alexandria, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install RedHerring.Alexandria as a Cake Addin
#addin nuget:?package=RedHerring.Alexandria&version=1.0.0

// Install RedHerring.Alexandria as a Cake Tool
#tool nuget:?package=RedHerring.Alexandria&version=1.0.0                

Red Herring Alexandria

A library of basic utilities.

BitMask

Multiple variants of a BitMask, namely 8-bit, 16-bit, and 32-bit versions. Usable for most of your bit masking and flagging needs.

Collections

Collection Dictionary

If you are tired of always having to manage collections when using a dictionary with collections as values, then this might be for you. There are multiple variants, all of which use some form of pooling for the collections.

Available variants:

  • HashSetDictionary - dictionary with HashSet values, accepts custom value comparers
  • ListDictionary - dictionary with List values
  • MultiDictionary - dictionary with Dictionary values, accepts custom inner key comparers

If none of the variants cover your needs, you may always just inherit from CollectionDictionary and make it use your custom ICollection<T>.

IDisposerContainer

Interface that includes a CompositeDisposable property. There is also an extension method DisposeWith for easier disposable registration.

    public class Container : IDisposerContainer
    {
        private class Disposable : IDisposable
        {
            public void Dispose()
            {
                // TODO: cleanup
            }
        }
        
        private CompositeDisposable _disposer;

        CompositeDisposable IDisposerContainer.Disposer
        {
            get => _disposer ??= new CompositeDisposable();
            set => _disposer = value;
        }

        public IDisposable CreateDisposable()
        {
            return new Disposable().DisposeWith(this);
        }
    }

Identifiers

Simple identifiers that combine the performance of an integer type with the convenience of a string.

Available variants:

  • QuadByte - an identifier backed by uint
  • OctoByte - an identifier backed by ulong
  • CompositeId - an identifier backed by ulong with a primary and a secondary QuadByte

Modules

Interfaces and abstract classes to make creating modules are little simpler and more consistent. Modules need to implement IModule and module containers need to implement IModuleContainer. Ideally, you would want to make your modules inherit from either AModule or AModuleBehaviour, depending on whether you are looking to implement a pure C# class or a MonoBehaviour.

    public class SomeContainer : IModuleContainer
    {
        private readonly Dictionary<Type, SomeModule> _modules = new();

        public IModule Get(Type moduleType) => _modules.TryGetValue(moduleType, out var module) ? module : null;
    }

    public abstract class SomeModule : AModule<SomeContainer>
    {
        
    }
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on RedHerring.Alexandria:

Package Downloads
RedHerring.Clues

Simple definition system for your data-driven game.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 238 9/15/2023