MrDHelper 1.0.9

There is a newer version of this package available.
See the version list below for details.
dotnet add package MrDHelper --version 1.0.9                
NuGet\Install-Package MrDHelper -Version 1.0.9                
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="MrDHelper" Version="1.0.9" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MrDHelper --version 1.0.9                
#r "nuget: MrDHelper, 1.0.9"                
#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 MrDHelper as a Cake Addin
#addin nuget:?package=MrDHelper&version=1.0.9

// Install MrDHelper as a Cake Tool
#tool nuget:?package=MrDHelper&version=1.0.9                

Contributors Forks Stargazers Issues MIT License Nuget version Nuget downloads

About The Project

This project is providing "extension methods" that are usually used in short way. All methods have its own tests, check it on source code and help me to improve it if you can. Thank you!

Usage

  1. Reference to MrdHelper
  2. using MrdHelper
  3. Use the extension methods that you want.
IEnumerable<T>?.ForEach<T>(Action<T>);
IEnumerable<T>?.ForEachAsync<T>(Fun<T,Task>) //awaitable, eg: await IEnumerable<T>?.ForEachAsync(async (t)=> { await Task.Delay(10); });

IList<T>.AddDummyItemsToMaximumCountOf<T>(int collectionFinalCount, T fillValue);

<T>.IsNull(); <T>.NotNull();

bool?.IsFalse(); bool?.IsTrue();
bool?.NotFalse(); bool?.NotTrue();

"string".GetMd5();
"string".IsNullOrEmpty(); "string".IsNullOrWhiteSpace();
"string".NotNullOrEmpty(); "string".NotNullOrWhiteSpace();

TaskHelper.RunSync<TResult>(Func<Task<TResult>, TResult>); // eg: var result = TaskHelper.RunSync<TResult>(()=>GetResultAsync());

New in 1.0.8+1.0.9

var someClass = new SomeClass();
var cell = SomeClass.ConvertToCell(someClass);
cell[nameof(SomeClass.Property1)] = newValue;
var otherSomeClass = cell.ConvertTo<SomeClass>();

-----------
var sqlConnectionString = new SqlServerConnectionStringBuilder{
	Server = server,
    Database = database,
    UserId = userId,
    Password = passWord,
    Trusted_Connection = trusted,
    ConnectViaIP = viaIp
}
bool validateResult = sqlConnectionString.ValidateConnectionString();
var finalString = sqlConnectionString.FinalConnectionString;

Roadmap

  • Add Common functions.
  • Add more functions.

Contact

Nguyễn Quốc Đạt - @NguyenQuocĐat1989

Project Link: https://github.com/dattiphu2022/MrDHelper

Acknowledgments

Use this space to list resources you find helpful and would like to give credit to. I've included a few of my favorites to kick things off!

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 netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen 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)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.1 263 3/27/2023
1.1.0 204 3/27/2023
1.0.9 404 7/20/2022
1.0.8 395 7/19/2022
1.0.7 433 7/15/2022
1.0.6 416 7/13/2022
1.0.5 426 7/5/2022
1.0.4 422 7/4/2022
1.0.3 431 7/4/2022
1.0.2 447 7/4/2022
1.0.1 430 7/3/2022
1.0.0 425 7/3/2022

added:
SqlServerConnectionStringBuilder.ValidateConnectionString()
Update: README.md for more details in documentation.