Augment 3.0.0

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

// Install Augment as a Cake Tool
#tool nuget:?package=Augment&version=3.0.0

Augment

.NET Object Extension Library (formerly NOX) - renamed from NOX since there were several overlapping projects of various areas using NOX as a codename.

What is Augment? By definition augment means to make (something) greater by adding to it. While .NET has an abundance of libraries that make coding fantastic, I found myself reusing and copying several extension files from project to project. So I decided to place them into a common library and share with anyone who is interested. This is a small collection of common code I've collected over the years from various sources (some known, others unfortunately forgotten).

See the WIKI for more details (otherwise check out the code itself)

Samples

DateTime, TimeSpan Extensions

DateTime.Now.BeginningOfDay()		// Week, Month, Year, Quarter
DateTime.Now.EndOfDay()				// Week, Month, Year, Quarter

DateTime.Now.IsBusinessDay()
DateTime.Now.IsHoliday()
DateTime.Now.IsWeekend()

DateTime.Now.ToRelativeDateString()	//	3 seconds ago or 3 seconds from now

3.Seconds()							//	returns TimeSpan
3.Seconds().Ago()					//	returns DateTime

6.Months().FromNow()

Enum Extensions

enum MyEnum
{
  Pass,
  [System.ComponentModel.Description("Failed")]
  Fail
}

string e = MyEnum.Pass.ToDescription();

if (e.ToEnum<MyEnum> == MyEnum.Fail) // etc.

Int, Double Extensions

3.25.PercentOf(125.548)

25.PercentOf(20000)

String, StringBuilder Extensions

string text = "123abc";

text = text.GetLeftOf("abc");

StringBuilder sb = new StringBuilder(text);

sb.AppendIf(text.Contains("abc"), "def" /*true*/, "456" /*false*/);
// or
sb.AppendIf(text.Contains("abc"), "def");

string so = null;

if (so.IsNullOrEmtpy()) so = "what!";

string d = so.AssertNotNull("abc");

NOTES

https://github.com/xin9le/DeclarativeSql https://github.com/jonwagner/Insight.Database.Schema

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 netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net451 is compatible.  net452 was computed.  net46 was computed.  net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 is compatible.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  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)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Augment:

Package Downloads
Yapper

Yep Another Wrapper for Dapper. This wrapper provides a simple Unit of Work pattern for isolating transactional business rules, cache and crud layer.

Augment.SqlServer

Easy to Use SQL Server Script Management Library

Augment.Mailing

Easy to Use Mailing Library

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.0.0 2,513 5/22/2018
2.1.0 1,125 3/15/2017
2.1.0-beta 855 3/15/2017
2.0.6180.18788 2,831 12/2/2016
1.5.5819.19079 1,318 12/7/2015

3.0 - Support net45, net46, net41, and nestandard2.0, Added constructors to KeyedCollections for Comparers
2.1 - Support net45 and net46
2.0 - Bumped to net46, Added StartsWithSameAs, EndsWithSameAs (added NotSame Extensions)
1.5 - Added Exception Extensions (and IsIn extension verfication)
1.4 - Added Try/Get to Single/Multi Key Collections
1.3 - Added Single Key Collection
1.2 - EnsureThat 3.2
1.1 - Added Reflection Helper for get/set properties
1.0 - Initial Release