Com.MarcusTS.SharedUtils 2.0.2

Install-Package Com.MarcusTS.SharedUtils -Version 2.0.2
dotnet add package Com.MarcusTS.SharedUtils --version 2.0.2
<PackageReference Include="Com.MarcusTS.SharedUtils" Version="2.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Com.MarcusTS.SharedUtils --version 2.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Com.MarcusTS.SharedUtils, 2.0.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 Com.MarcusTS.SharedUtils as a Cake Addin
#addin nuget:?package=Com.MarcusTS.SharedUtils&version=2.0.2

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

NOW MAUI READY !!!

SHARED UTILS: Making C# Quick, Easy and Safe

Programs Should Not Be Redundant In Any Way

SOLID and DRY guidance declare that we should keep our C# code simple, narrow, and non-redundant. For instance, simple code like this:

var areSame = 
   string.Compare(mainStr, otherStr, CurrentCulture.CurrentCultureIgnoreCase) == 0;

... is both ungainly and unnecessary. DRY does not refer to copying code like this, though it is certainly illegal:

var areSameCheckedAgainRedundantly = 
   string.Compare(mainStr, otherStr, CurrentCulture.CurrentCultureIgnoreCase) == 0;

DRY means: no redundancy whatsoever, regardless of where it lurks. In this example, a parameter is redundant, and the check for 0 is both static (not a variable but also not even a constant!) and redundant. The fix is easy -- just use our SharedUtils extensions to code this quickly and safely:

using Com.MarcusTS.SharedUtils;

if (mainStr.isSameAs(otherStr))
{
}

If you are looking for "not same as", then use this:

using Com.MarcusTS.SharedUtils;

if (mainStr.isDifferentThan(otherStr))
{
}

SharedUtils provides similar comparison extensions for many C# types, including DateTime, numbers, and even IEnumerables!

SharedUtils also offers:

  • A BetterObservableCollection that manages events more safely than in the C# version.
  • A FlexibleStack that allows manipulation of a common stack.
  • Reflection helpers
  • Thread helpers,including a thread-safe Boolean
  • Task helpers
  • Numeric rounding

SharedUtils Is Open Source; Enjoy Our Other Offerings

SharedUtils Is Open Source; Enjoy Our Entire Suite

Shared Utils (MAUI Ready!)

GutHub

NuGet

The Smart DI Container (MAUI Ready!)

GutHub

NuGet

Responsive Tasks (MAUI Ready!)

GutHub

NuGet

PlatformIndependentShared (MAUI Ready!)

GutHub

NuGet

UI.XamForms

GutHub

NuGet

The Modern App Demo

GutHub

 

NuGet packages (4)

Showing the top 4 NuGet packages that depend on Com.MarcusTS.SharedUtils:

Package Downloads
Com.MarcusTS.SmartDI

A container that creates and then (optionally) stores variables to provide caching and centralized access. These sorts of containers are sometimes mis-described as IOC ("Inversion of Control") Containers. Since they do not provide any control over program flow, the accurate term is DI ("Dependency Injection") Container. The SmartDI Container is unique in that it: * Does not store instantiated objects unnecessarily. * Supports object life-cycle management. When an object dies, it is removed from the container. This requires you to raise a global message. * Supports simple register-and-resolve so types do not need to be registered in advance.

Com.MarcusTS.ResponsiveTasks

TPL compatible replacement for events and global messages

Com.MarcusTS.PlatformIndependentShared

Platform independent utilities for C# development.

Com.MarcusTS.UI.XamForms

Xamarin.Forms abstract classes and utilities to support creating flowable animated apps.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.2 418 10/29/2021
2.0.1 276 10/28/2021
1.0.37 193 10/28/2021
1.0.36 113 10/28/2021
1.0.34 244 8/27/2021
1.0.33 354 8/24/2021
1.0.32 303 8/17/2021
1.0.30 107 8/16/2021
1.0.29 348 8/14/2021
1.0.28 455 8/10/2021
1.0.27 267 7/5/2021
1.0.26 537 6/24/2021
1.0.24 343 6/2/2021
1.0.22 743 4/7/2021
1.0.21 151 4/6/2021
1.0.20 156 4/6/2021
1.0.19 171 4/2/2021
1.0.18 310 4/1/2021
1.0.17 403 1/30/2021
1.0.16 768 10/28/2020
1.0.15 575 10/28/2020
1.0.14 389 9/11/2020
1.0.13 527 4/22/2020
1.0.12 998 10/26/2019
1.0.11 590 7/30/2019
1.0.10 1,017 6/10/2019
1.0.9 371 6/10/2019
1.0.7 1,151 12/25/2018
1.0.5 1,085 12/24/2018
1.0.1 533 12/24/2018
1.0.0 507 12/24/2018