Universal.Common 8.2.0

.NET 6.0 .NET Standard 2.0
NuGet\Install-Package Universal.Common -Version 8.2.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.
dotnet add package Universal.Common --version 8.2.0
<PackageReference Include="Universal.Common" Version="8.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Universal.Common --version 8.2.0
#r "nuget: Universal.Common, 8.2.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Universal.Common as a Cake Addin
#addin nuget:?package=Universal.Common&version=8.2.0

// Install Universal.Common as a Cake Tool
#tool nuget:?package=Universal.Common&version=8.2.0

Universal.Common

Support utilities and extensions meant to extend the default functionality from the base class library.

Quickstart

BitSequence

Utility for as-is bit manipulations.

BitSequence bs1 = new BitSequence("10001010"); // Binary representation in string.
BitSequence bs2 = new BitSequence(new bool[] { true, false, true }); // As booleans.
BitSequence bs3 = bs1 & "11110000"; // Bitwise and, implicit conversion from binary representation string.

BitStream

Utility to perform bit-level operations on System.IO.Stream.

using (BitStream bitStream = new BitStream(stream)) 
{
    uint value = bitStream.ReadUInt32(4); // Reads 4 bits from the stream and interprets it as an unsigned integer, padding if necessary.
}

UriBuilder

Derived from System.UriBuilder, this class provides a fluent API to configure segments and queries.

UriBuilder uriBuilder = new UriBuilder("http://www.myhost.com");
uriBuilder
    .AddSegments("api", "Product", 1)
    .AddQuery("key", "value");
// "https://www.myhost.com/api/Product/1?key=value"

ZigZag

Static class that encodes arrays to matrices and vice-versa.

int[,] matrix = new int[,] { { 0, 1 }, { 2, 3 } };
int[] array = ZigZag.ToArray(matrix); // [0, 1, 2, 3]
Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.
  • .NETStandard 2.1

    • No dependencies.
  • net6.0

    • No dependencies.

NuGet packages (34)

Showing the top 5 NuGet packages that depend on Universal.Common:

Package Downloads
Universal.Android

Class library for accelerating Xamarin.Android development. Note: If you encounter layout inflation exceptions (could be masked as NotFoundException, or some issue with text_color_secondary.xml etc), make sure you define colorControlNormal and use a style with that attribute defined.

Universal.Common.Reflection

Class library for performing advanced operations with types, dynamic objects, expressions, and reflection.

Universal.Common.Serialization

Class library with base objects that provide serializable to and from XML and JSON strings and binary serialization using the native binary formatter.

Universal.Common.Net.Http

Class library to build clients and work with HTTP web services.

Universal.Common.Mathematics

Class library implementing advanced mathematical algorithms, transforms, and time series manipulations. Implementations favour simplicity and correctness.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
8.2.0 76 9/14/2022
8.1.2 3,279 10/24/2021
8.1.1 261 10/23/2021
8.1.0 274 10/23/2021
8.0.0 1,872 10/13/2021
7.7.1 1,790 8/24/2021
7.7.0 206 8/24/2021
7.6.2 230 8/19/2021
7.6.1 4,857 6/17/2021
7.6.0 729 6/3/2021
7.5.7 918 4/30/2021
7.5.6 246 4/29/2021
7.5.5 479 4/13/2021
7.5.4 1,394 3/31/2021
7.5.3 730 3/21/2021
7.5.2 520 3/15/2021
7.5.1 438 2/16/2021
7.5.0 5,989 2/5/2021
7.4.6 237 2/2/2021
7.4.5.1 676 1/15/2021
7.4.5 381 1/13/2021
7.4.4 719 1/7/2021
7.4.3 951 12/16/2020
7.4.2.1 342 12/15/2020
7.4.2 323 12/9/2020
7.4.1 1,628 11/26/2020
7.4.0 293 11/26/2020
7.3.5 1,261 11/23/2020
7.3.4 1,048 11/11/2020
7.3.3 347 11/11/2020
7.3.2 526 11/1/2020
7.3.1.1 1,914 10/19/2020
7.3.1 307 10/15/2020
7.3.0 303 10/15/2020
7.2.2 1,274 9/29/2020
7.2.1 433 9/29/2020
7.2.0 313 9/29/2020
7.1.1.1 365 9/28/2020
7.1.1 407 9/25/2020
7.1.0 912 9/2/2020
7.0.0 2,203 8/24/2020
6.4.7 365 8/21/2020
6.4.6 370 8/21/2020
6.4.5 10,616 5/21/2020
6.4.4 1,115 5/12/2020
6.4.3 1,218 4/23/2020
6.4.2 355 4/20/2020
6.4.1.2 7,868 3/20/2020
6.4.1.1 373 3/20/2020
6.4.1 367 3/20/2020
6.4.0 2,433 2/25/2020
6.3.5 500 2/21/2020
6.3.4 459 2/21/2020
6.3.3 1,911 2/11/2020
6.3.2 447 2/11/2020
6.3.1.1 3,594 1/23/2020
6.3.0 2,585 12/18/2019
6.2.7 1,221 12/17/2019
6.2.6 661 12/4/2019
6.2.5 452 12/4/2019
6.2.4 1,720 12/1/2019
6.2.3 4,941 10/25/2019
6.2.2 1,827 10/8/2019
6.2.1 614 10/7/2019
6.2.0.1 1,669 9/25/2019
6.2.0 1,020 9/20/2019
6.1.5 1,503 9/16/2019
6.1.4.1 985 9/9/2019
6.1.4 996 9/3/2019
6.1.3 423 9/2/2019
6.1.2 536 8/28/2019
6.1.1 3,869 7/9/2019
6.1.0.1 12,177 7/5/2019
6.1.0 7,343 5/7/2019
6.0.6 987 5/3/2019
6.0.5 584 5/2/2019
6.0.4 1,835 4/24/2019
6.0.3 643 4/24/2019
6.0.2 3,561 3/22/2019
6.0.1.2 925 3/12/2019
6.0.1.1 576 3/12/2019
6.0.1 565 3/11/2019
6.0.0 917 3/6/2019
5.3.6 507 3/5/2019
5.3.5 496 3/5/2019
5.3.4 1,076 3/4/2019
5.3.3 908 2/28/2019
5.3.2 793 2/27/2019
5.3.1.1 619 2/25/2019
5.3.1 523 2/25/2019
5.3.0 504 2/25/2019
5.2.1 1,238 2/16/2019
5.2.0.1 1,764 2/7/2019
5.1.8 569 2/7/2019
5.1.7.1 679 1/30/2019
5.1.7 558 1/30/2019
5.1.6.1 588 1/24/2019
5.1.6 593 1/23/2019
5.1.5 555 1/23/2019
5.1.4.2 625 1/18/2019
5.1.3 921 1/14/2019
5.1.2 5,405 1/8/2019
5.1.1.1 617 1/8/2019
5.1.1 590 1/6/2019
5.1.0 943 1/2/2019
5.0.2 597 12/31/2018
5.0.1.1 590 12/31/2018
5.0.1 572 12/31/2018
5.0.0.1 679 12/14/2018
5.0.0 1,252 12/10/2018
4.2.5 618 11/23/2018
4.2.4 627 11/23/2018
4.2.3.1 625 11/22/2018
4.2.3 587 11/22/2018
4.2.2.2 760 11/19/2018
4.2.2.1 2,673 10/2/2018
4.2.2 669 10/1/2018
4.2.1.2 687 10/1/2018
4.2.1.1 672 9/27/2018
4.2.1 609 9/26/2018
4.2.0.5 648 9/26/2018
4.2.0.4 646 9/25/2018
4.2.0.3 661 9/25/2018
4.2.0.2 669 9/25/2018
4.2.0.1 645 9/25/2018
4.2.0 705 9/24/2018
4.1.0 631 9/21/2018
4.0.0.6 646 9/18/2018
4.0.0.5 673 9/18/2018
4.0.0.4 673 9/17/2018
4.0.0.3 1,463 9/7/2018
4.0.0.2 849 9/4/2018
4.0.0.1 877 9/4/2018
4.0.0 1,620 8/30/2018
3.2.0 1,056 8/28/2018
3.1.0 661 8/28/2018
3.0.6 915 8/27/2018
3.0.5 645 8/27/2018
3.0.4 665 8/27/2018
3.0.3 694 8/24/2018
3.0.2 802 8/24/2018
3.0.1.2 691 8/23/2018
3.0.1.1 732 8/21/2018
3.0.1 704 8/21/2018
3.0.0 1,365 8/16/2018
2.2.1 751 8/15/2018
2.2.0 714 8/14/2018
2.1.0 724 8/13/2018
2.0.2 757 8/7/2018
2.0.1 949 5/10/2018
2.0.0 1,258 4/26/2018
1.5.3.7 1,787 1/27/2018
1.5.3.6 851 1/15/2018
1.5.3.5 842 1/8/2018
1.5.3.4 854 1/3/2018
1.5.3.3 857 1/3/2018
1.5.3.2 841 12/27/2017
1.5.3.1 875 12/25/2017
1.5.3 828 12/25/2017
1.5.2 820 12/24/2017
1.5.1 841 12/23/2017
1.5.0 798 12/22/2017
1.4.7 731 12/2/2017
1.4.6 1,670 11/28/2017
1.4.5 848 11/28/2017
1.4.0 966 11/12/2017
1.3.5 2,815 11/8/2017
1.3.4 970 11/8/2017
1.3.3 1,018 11/2/2017
1.3.2 973 11/2/2017
1.3.1 1,005 9/12/2017
1.3.0 903 8/26/2017
1.2.1 792 8/23/2017
1.2.0 865 8/17/2017
1.1.1 794 8/17/2017
1.1.0 802 8/17/2017
1.0.0 987 8/12/2017

New generic UriBuilder<T> to allow chaining off a strongly-typed instance.
Added target for .NET 6.0. Added support for implicit conversion between .NET 6.0's DateOnly and the Date class.