Universal.Common 8.1.2

.NET Standard 2.0
Install-Package Universal.Common -Version 8.1.2
dotnet add package Universal.Common --version 8.1.2
<PackageReference Include="Universal.Common" Version="8.1.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Universal.Common --version 8.1.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Universal.Common, 8.1.2"
#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.1.2

// Install Universal.Common as a Cake Tool
#tool nuget:?package=Universal.Common&version=8.1.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

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.

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.1.2 2,298 10/24/2021
8.1.1 248 10/23/2021
8.1.0 261 10/23/2021
8.0.0 1,610 10/13/2021
7.7.1 1,769 8/24/2021
7.7.0 191 8/24/2021
7.6.2 215 8/19/2021
7.6.1 4,082 6/17/2021
7.6.0 711 6/3/2021
7.5.7 881 4/30/2021
7.5.6 233 4/29/2021
7.5.5 464 4/13/2021
7.5.4 1,374 3/31/2021
7.5.3 581 3/21/2021
7.5.2 491 3/15/2021
7.5.1 416 2/16/2021
7.5.0 5,646 2/5/2021
7.4.6 226 2/2/2021
7.4.5.1 662 1/15/2021
7.4.5 364 1/13/2021
7.4.4 706 1/7/2021
7.4.3 933 12/16/2020
7.4.2.1 327 12/15/2020
7.4.2 310 12/9/2020
7.4.1 1,613 11/26/2020
7.4.0 276 11/26/2020
7.3.5 1,240 11/23/2020
7.3.4 1,032 11/11/2020
7.3.3 333 11/11/2020
7.3.2 514 11/1/2020
7.3.1.1 1,901 10/19/2020
7.3.1 290 10/15/2020
7.3.0 290 10/15/2020
7.2.2 1,261 9/29/2020
7.2.1 422 9/29/2020
7.2.0 299 9/29/2020
7.1.1.1 352 9/28/2020
7.1.1 388 9/25/2020
7.1.0 899 9/2/2020
7.0.0 2,192 8/24/2020
6.4.7 349 8/21/2020
6.4.6 354 8/21/2020
6.4.5 9,914 5/21/2020
6.4.4 1,104 5/12/2020
6.4.3 1,206 4/23/2020
6.4.2 342 4/20/2020
6.4.1.2 7,652 3/20/2020
6.4.1.1 356 3/20/2020
6.4.1 353 3/20/2020
6.4.0 2,417 2/25/2020
6.3.5 490 2/21/2020
6.3.4 447 2/21/2020
6.3.3 1,900 2/11/2020
6.3.2 431 2/11/2020
6.3.1.1 3,576 1/23/2020
6.3.0 2,571 12/18/2019
6.2.7 1,198 12/17/2019
6.2.6 647 12/4/2019
6.2.5 438 12/4/2019
6.2.4 1,705 12/1/2019
6.2.3 4,916 10/25/2019
6.2.2 1,813 10/8/2019
6.2.1 602 10/7/2019
6.2.0.1 1,655 9/25/2019
6.2.0 1,005 9/20/2019
6.1.5 1,493 9/16/2019
6.1.4.1 972 9/9/2019
6.1.4 981 9/3/2019
6.1.3 407 9/2/2019
6.1.2 523 8/28/2019
6.1.1 3,849 7/9/2019
6.1.0.1 11,564 7/5/2019
6.1.0 7,325 5/7/2019
6.0.6 974 5/3/2019
6.0.5 571 5/2/2019
6.0.4 1,823 4/24/2019
6.0.3 631 4/24/2019
6.0.2 3,547 3/22/2019
6.0.1.2 908 3/12/2019
6.0.1.1 558 3/12/2019
6.0.1 548 3/11/2019
6.0.0 903 3/6/2019
5.3.6 493 3/5/2019
5.3.5 481 3/5/2019
5.3.4 1,062 3/4/2019
5.3.3 893 2/28/2019
5.3.2 779 2/27/2019
5.3.1.1 603 2/25/2019
5.3.1 510 2/25/2019
5.3.0 492 2/25/2019
5.2.1 1,223 2/16/2019
5.2.0.1 1,751 2/7/2019
5.1.8 552 2/7/2019
5.1.7.1 663 1/30/2019
5.1.7 544 1/30/2019
5.1.6.1 576 1/24/2019
5.1.6 578 1/23/2019
5.1.5 540 1/23/2019
5.1.4.2 613 1/18/2019
5.1.3 906 1/14/2019
5.1.2 5,391 1/8/2019
5.1.1.1 603 1/8/2019
5.1.1 574 1/6/2019
5.1.0 924 1/2/2019
5.0.2 583 12/31/2018
5.0.1.1 576 12/31/2018
5.0.1 561 12/31/2018
5.0.0.1 666 12/14/2018
5.0.0 1,234 12/10/2018
4.2.5 601 11/23/2018
4.2.4 609 11/23/2018
4.2.3.1 609 11/22/2018
4.2.3 570 11/22/2018
4.2.2.2 743 11/19/2018
4.2.2.1 2,656 10/2/2018
4.2.2 654 10/1/2018
4.2.1.2 672 10/1/2018
4.2.1.1 655 9/27/2018
4.2.1 591 9/26/2018
4.2.0.5 635 9/26/2018
4.2.0.4 631 9/25/2018
4.2.0.3 646 9/25/2018
4.2.0.2 654 9/25/2018
4.2.0.1 630 9/25/2018
4.2.0 687 9/24/2018
4.1.0 612 9/21/2018
4.0.0.6 630 9/18/2018
4.0.0.5 656 9/18/2018
4.0.0.4 660 9/17/2018
4.0.0.3 1,442 9/7/2018
4.0.0.2 833 9/4/2018
4.0.0.1 858 9/4/2018
4.0.0 1,603 8/30/2018
3.2.0 1,037 8/28/2018
3.1.0 645 8/28/2018
3.0.6 894 8/27/2018
3.0.5 622 8/27/2018
3.0.4 642 8/27/2018
3.0.3 675 8/24/2018
3.0.2 781 8/24/2018
3.0.1.2 672 8/23/2018
3.0.1.1 714 8/21/2018
3.0.1 685 8/21/2018
3.0.0 1,348 8/16/2018
2.2.1 736 8/15/2018
2.2.0 694 8/14/2018
2.1.0 707 8/13/2018
2.0.2 740 8/7/2018
2.0.1 929 5/10/2018
2.0.0 1,241 4/26/2018
1.5.3.7 1,764 1/27/2018
1.5.3.6 823 1/15/2018
1.5.3.5 813 1/8/2018
1.5.3.4 828 1/3/2018
1.5.3.3 832 1/3/2018
1.5.3.2 821 12/27/2017
1.5.3.1 850 12/25/2017
1.5.3 802 12/25/2017
1.5.2 798 12/24/2017
1.5.1 819 12/23/2017
1.5.0 775 12/22/2017
1.4.7 713 12/2/2017
1.4.6 1,649 11/28/2017
1.4.5 827 11/28/2017
1.4.0 949 11/12/2017
1.3.5 2,796 11/8/2017
1.3.4 955 11/8/2017
1.3.3 999 11/2/2017
1.3.2 953 11/2/2017
1.3.1 982 9/12/2017
1.3.0 883 8/26/2017
1.2.1 774 8/23/2017
1.2.0 845 8/17/2017
1.1.1 773 8/17/2017
1.1.0 784 8/17/2017
1.0.0 965 8/12/2017

Fixed implementation of BitSequence's GetHashCode to return equal hash codes for equal sequences.