ArjaiSolutions.ExtensionLibrary 1.0.12

There is a newer version of this package available.
See the version list below for details.
The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package ArjaiSolutions.ExtensionLibrary --version 1.0.12
NuGet\Install-Package ArjaiSolutions.ExtensionLibrary -Version 1.0.12
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="ArjaiSolutions.ExtensionLibrary" Version="1.0.12" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ArjaiSolutions.ExtensionLibrary --version 1.0.12
#r "nuget: ArjaiSolutions.ExtensionLibrary, 1.0.12"
#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 ArjaiSolutions.ExtensionLibrary as a Cake Addin
#addin nuget:?package=ArjaiSolutions.ExtensionLibrary&version=1.0.12

// Install ArjaiSolutions.ExtensionLibrary as a Cake Tool
#tool nuget:?package=ArjaiSolutions.ExtensionLibrary&version=1.0.12

ArJaiSolutions Extension Library

ArJaiSolutions extension library contains some basic extensions for string, Objects and Mainly extension for Iquerable to create dynamic expressions.

Dictionary Extensions

DictionaryExtensions.TryReturnValue<TKey, TValue>(System.Collections.Generic.IDictionary<TKey, TValue>, TKey, TValue)

To fetch the value directly from the dictionary for the provided key. else return the default value

String Extensions

string.ToBool()

Converts string to bool if not able to convert, It will return null. Possible values from string to bool are true/false, 0/1,yes/no, y/n.

string.ToBool(bool)

Converts string to bool if not able to convert, It will return the default value provided or false. Possible values from string to bool are true/false, 0/1,yes/no, y/n

string.ToDateTime(string, string)

Converts the given string to Datetime based on the format and culture provided or by Default the format is "ddMMyyyy" and culture is "en-GB"

string.ToDateTime(string, System.Globalization.CultureInfo)

Converts the given string to Datetime based on the format and culture provided

string.ToGuid(string)

Converts Given string and guid formats default guid format ='D' Guid formats can be - "N","D","B","P","X"

string.ToInt()

Converts this string to int if unable to convert it returns null

string.ToInt(int)

Converts this string to int if unable to convert it returns the default number Or 0 (if no default provided)

string.Tolong()

Converts this string to long if unable to convert it returns null

string.Tolong(long)

Converts this string to long if unable to convert it returns the default number Or 0 (if no default provided)

string.ToUTCDateTime()

Converts the given string to UTCDatetime

string.ToEnum<T>()

Converts string to any Enum of the Type "T"

string.ToEnum<T>(T defaultValue)

Converts string to any Enum of the Type "T", with an default value of the Enum

Object Extensions

Object.ConvertToTheGivenType(System.Type)

Converts the object provided to the given type → Except: DateTime - Which is converted to UTCDateTime , bool - Which is converted to bool from (true/false, 0/1, yes/no, y/n)

Queryable Extensions

IQueryable.PreadicateConditionBasedFiltering<TSource>(System.Linq.IQueryable<TSource>, string, ExtensionLibrary.PreadicateConditions, object)

To create expression for a source with the property and input value based on the condition provided

Exceptions: "ArgumentOutOfRangeException" if the input value is not been able to convert to the same type of the property

QueryableExtensions.GetNavigationPropertyExpression(System.Linq.Expressions.Expression, ExtensionLibrary.PreadicateConditions, object, string[])

Creates an expression for the property in the path provided. You could have an expression created for a sub properties child property e.g. object school has a property of students and you want to get a expression where students have their firstname started with 'A', you need to call this method with expression parameter which means x=> which you can make by doing Expression.Paramter(type(ParentElement),"x") (in our case parent element is school) once you have a parameter set up then call GetNavigationPropertyExpression(parameter,preadicatecondition.condition, "A","students","firstname");

Helpers for Queryable Expression building

QueryableExtensions.GreaterThan<TSource>(System.Linq.IQueryable<TSource>, System.Linq.Expressions.ParameterExpression, System.Linq.Expressions.Expression, System.Linq.Expressions.Expression)

Returns the Expression of "GreaterThan" for the source based on the property and target an example of what is build and returned e.g. (parameter ⇒ parameter.property>target) where parameter is of the type source

QueryableExtensions.GreaterThanOrEqualTo<TSource>(System.Linq.IQueryable<TSource>, System.Linq.Expressions.ParameterExpression, System.Linq.Expressions.Expression, System.Linq.Expressions.Expression, bool)

Returns the Expression of "GreaterThan" for the source based on the property and target an example of what is build and returned e.g. (parameter ⇒ parameter.property>=target) where parameter is of the type source

QueryableExtensions.LessThan<TSource>(System.Linq.IQueryable<TSource>, System.Linq.Expressions.ParameterExpression, System.Linq.Expressions.Expression, System.Linq.Expressions.Expression)

Returns the Expression of "LessThan" for the source based on the property and target an example of what is build and returned e.g. (parameter ⇒ parameter.property<target) where parameter is of the type source

QueryableExtensions.LessThanOrEqualTo<TSource>(System.Linq.IQueryable<TSource>, System.Linq.Expressions.ParameterExpression, System.Linq.Expressions.Expression, System.Linq.Expressions.Expression, bool)

Returns the Expression of "LessThanOrEqual" for the source based on the property and target an example of what is build and returned e.g. (parameter ⇒ parameter.property=<target) where parameter is of the type source

QueryableExtensions.NotEqual<TSource>(System.Linq.IQueryable<TSource>, System.Linq.Expressions.ParameterExpression, System.Linq.Expressions.Expression, System.Linq.Expressions.Expression)

Returns the Expression of "NotEqual" for the source based on the property and target an example of what is build and returned e.g. (parameter ⇒ parameter.property!=target) where paramter is of the type source

QueryableExtensions.MakePreadicateCondition(ExtensionLibrary.PreadicateConditions, System.Linq.Expressions.Expression, System.Linq.Expressions.Expression)

this method makes an Expression for Preadicate Condition.

Preadicate conditions Enum

/// Equals (=) Equals,

/// Equals (!=) NotEqual,

/// Contains as in Type.Contains() Contains,

/// GreaterThan (>) GreaterThan,

/// GreaterThanOrEqual (>=) GreaterThanOrEqual,

/// LessThan (<) LessThan,

/// LessThan (=<) LessThanOrEqual,

/// StartsWith like Type.StartsWith() StartsWith,

/// EndsWith like Type.EndsWith() EndsWith

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 net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  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)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

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.0.29 884 7/17/2023
1.0.28 639 7/13/2023
1.0.27 2,613 3/24/2022
1.0.26 945 3/15/2022
1.0.25 1,947 3/10/2021
1.0.23 1,329 1/21/2021
1.0.22 1,220 12/2/2020
1.0.21 1,378 9/18/2020
1.0.20 1,397 7/29/2020
1.0.19 1,441 6/5/2020
1.0.18 1,650 5/11/2020
1.0.17 1,704 4/6/2020