Universal.Common 8.2.2

.NET 6.0 .NET Standard 2.0
dotnet add package Universal.Common --version 8.2.2
NuGet\Install-Package Universal.Common -Version 8.2.2
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="Universal.Common" Version="8.2.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Universal.Common --version 8.2.2
#r "nuget: Universal.Common, 8.2.2"
#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 Universal.Common as a Cake Addin
#addin nuget:?package=Universal.Common&version=8.2.2

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

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 net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.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 net481
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.2 373 11/23/2022
8.2.1 205 11/22/2022
8.2.0 2,071 9/14/2022
8.1.2 8,809 10/24/2021
8.1.1 344 10/23/2021
8.1.0 356 10/23/2021
8.0.0 4,514 10/13/2021
7.7.1 2,559 8/24/2021
7.7.0 282 8/24/2021
7.6.2 306 8/19/2021
7.6.1 7,285 6/17/2021
7.6.0 1,055 6/3/2021
7.5.7 1,453 4/30/2021
7.5.6 321 4/29/2021
7.5.5 551 4/13/2021
7.5.4 2,132 3/31/2021
7.5.3 2,243 3/21/2021
7.5.2 903 3/15/2021
7.5.1 623 2/16/2021
7.5.0 10,004 2/5/2021
7.4.6 325 2/2/2021
7.4.5.1 1,049 1/15/2021
7.4.5 501 1/13/2021
7.4.4 1,080 1/7/2021
7.4.3 1,380 12/16/2020
7.4.2.1 426 12/15/2020
7.4.2 411 12/9/2020
7.4.1 2,411 11/26/2020
7.4.0 375 11/26/2020
7.3.5 1,933 11/23/2020
7.3.4 1,362 11/11/2020
7.3.3 429 11/11/2020
7.3.2 687 11/1/2020
7.3.1.1 2,852 10/19/2020
7.3.1 394 10/15/2020
7.3.0 387 10/15/2020
7.2.2 1,863 9/29/2020
7.2.1 521 9/29/2020
7.2.0 400 9/29/2020
7.1.1.1 452 9/28/2020
7.1.1 487 9/25/2020
7.1.0 1,264 9/2/2020
7.0.0 3,854 8/24/2020
6.4.7 452 8/21/2020
6.4.6 458 8/21/2020
6.4.5 14,314 5/21/2020
6.4.4 1,243 5/12/2020
6.4.3 1,379 4/23/2020
6.4.2 437 4/20/2020
6.4.1.2 11,455 3/20/2020
6.4.1.1 460 3/20/2020
6.4.1 454 3/20/2020
6.4.0 3,325 2/25/2020
6.3.5 626 2/21/2020
6.3.4 538 2/21/2020
6.3.3 2,172 2/11/2020
6.3.2 535 2/11/2020
6.3.1.1 5,001 1/23/2020
6.3.0 3,287 12/18/2019
6.2.7 1,453 12/17/2019
6.2.6 915 12/4/2019
6.2.5 585 12/4/2019
6.2.4 2,582 12/1/2019
6.2.3 7,404 10/25/2019
6.2.2 2,671 10/8/2019
6.2.1 805 10/7/2019
6.2.0.1 2,359 9/25/2019
6.2.0 1,393 9/20/2019
6.1.5 1,942 9/16/2019
6.1.4.1 1,363 9/9/2019
6.1.4 1,332 9/3/2019
6.1.3 504 9/2/2019
6.1.2 651 8/28/2019
6.1.1 5,614 7/9/2019
6.1.0.1 16,899 7/5/2019
6.1.0 10,850 5/7/2019
6.0.6 1,151 5/3/2019
6.0.5 718 5/2/2019
6.0.4 2,495 4/24/2019
6.0.3 764 4/24/2019
6.0.2 5,135 3/22/2019
6.0.1.2 1,192 3/12/2019
6.0.1.1 696 3/12/2019
6.0.1 687 3/11/2019
6.0.0 1,245 3/6/2019
5.3.6 602 3/5/2019
5.3.5 591 3/5/2019
5.3.4 1,489 3/4/2019
5.3.3 1,131 2/28/2019
5.3.2 1,039 2/27/2019
5.3.1.1 748 2/25/2019
5.3.1 610 2/25/2019
5.3.0 593 2/25/2019
5.2.1 1,641 2/16/2019
5.2.0.1 2,261 2/7/2019
5.1.8 663 2/7/2019
5.1.7.1 802 1/30/2019
5.1.7 646 1/30/2019
5.1.6.1 678 1/24/2019
5.1.6 682 1/23/2019
5.1.5 649 1/23/2019
5.1.4.2 714 1/18/2019
5.1.3 1,150 1/14/2019
5.1.2 5,765 1/8/2019
5.1.1.1 707 1/8/2019
5.1.1 680 1/6/2019
5.1.0 1,116 1/2/2019
5.0.2 693 12/31/2018
5.0.1.1 688 12/31/2018
5.0.1 668 12/31/2018
5.0.0.1 814 12/14/2018
5.0.0 1,629 12/10/2018
4.2.5 713 11/23/2018
4.2.4 716 11/23/2018
4.2.3.1 714 11/22/2018
4.2.3 678 11/22/2018
4.2.2.2 884 11/19/2018
4.2.2.1 3,578 10/2/2018
4.2.2 760 10/1/2018
4.2.1.2 777 10/1/2018
4.2.1.1 765 9/27/2018
4.2.1 708 9/26/2018
4.2.0.5 745 9/26/2018
4.2.0.4 744 9/25/2018
4.2.0.3 761 9/25/2018
4.2.0.2 766 9/25/2018
4.2.0.1 743 9/25/2018
4.2.0 830 9/24/2018
4.1.0 722 9/21/2018
4.0.0.6 745 9/18/2018
4.0.0.5 770 9/18/2018
4.0.0.4 765 9/17/2018
4.0.0.3 1,868 9/7/2018
4.0.0.2 984 9/4/2018
4.0.0.1 1,038 9/4/2018
4.0.0 2,096 8/30/2018
3.2.0 1,321 8/28/2018
3.1.0 758 8/28/2018
3.0.6 1,112 8/27/2018
3.0.5 747 8/27/2018
3.0.4 764 8/27/2018
3.0.3 793 8/24/2018
3.0.2 937 8/24/2018
3.0.1.2 783 8/23/2018
3.0.1.1 825 8/21/2018
3.0.1 796 8/21/2018
3.0.0 1,568 8/16/2018
2.2.1 856 8/15/2018
2.2.0 816 8/14/2018
2.1.0 825 8/13/2018
2.0.2 856 8/7/2018
2.0.1 1,090 5/10/2018
2.0.0 1,517 4/26/2018
1.5.3.7 2,272 1/27/2018
1.5.3.6 958 1/15/2018
1.5.3.5 942 1/8/2018
1.5.3.4 952 1/3/2018
1.5.3.3 957 1/3/2018
1.5.3.2 946 12/27/2017
1.5.3.1 973 12/25/2017
1.5.3 926 12/25/2017
1.5.2 924 12/24/2017
1.5.1 946 12/23/2017
1.5.0 898 12/22/2017
1.4.7 829 12/2/2017
1.4.6 2,116 11/28/2017
1.4.5 989 11/28/2017
1.4.0 1,064 11/12/2017
1.3.5 3,326 11/8/2017
1.3.4 1,079 11/8/2017
1.3.3 1,124 11/2/2017
1.3.2 1,071 11/2/2017
1.3.1 1,104 9/12/2017
1.3.0 1,002 8/26/2017
1.2.1 889 8/23/2017
1.2.0 971 8/17/2017
1.1.1 898 8/17/2017
1.1.0 899 8/17/2017
1.0.0 1,135 8/12/2017

IDictionary<TKey, TValue>.GetValueOrDefault() extension method.