EasyLevel.EasyCSharp 1.3.5

dotnet add package EasyLevel.EasyCSharp --version 1.3.5
                    
NuGet\Install-Package EasyLevel.EasyCSharp -Version 1.3.5
                    
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="EasyLevel.EasyCSharp" Version="1.3.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EasyLevel.EasyCSharp" Version="1.3.5" />
                    
Directory.Packages.props
<PackageReference Include="EasyLevel.EasyCSharp" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add EasyLevel.EasyCSharp --version 1.3.5
                    
#r "nuget: EasyLevel.EasyCSharp, 1.3.5"
                    
#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.
#:package EasyLevel.EasyCSharp@1.3.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=EasyLevel.EasyCSharp&version=1.3.5
                    
Install as a Cake Addin
#tool nuget:?package=EasyLevel.EasyCSharp&version=1.3.5
                    
Install as a Cake Tool

Easy C#

The main concept of this library is to add extensions to existing types, which allows you to access the object directly more often, rather than using static classes, as is customary in C#.

Let's look at a simple example: checking for an empty string. It would be more intuitive and simple to find out if a string is empty using the IsEmpty property or method, but in C# there is no such possibility, and you need to call the static string.IsNullOrEmpty method. The library will add an extension method for this case and it will be possible to call the IsEmpty method on the string object. Similar situations arise when working with other types of data.

The purpose of the library is to provide the ability to use the most common functions in the form of extensions.

Extensions

There are many extensions for types that simplify the code:

  • Lang extensions:

    • IsEmpty, NotEmpty for check an object is null object or an empty string or an empty collection;

    • Clone to fully clone an object;

    • OnChange for track changes to a property of an object;

    • With to configure an object along a chain.

  • Collection extensions (Contains, Shuffle, RandomElement, InsertFirst, ClearDuplicates, RemoveAll, RemoveFirst, RemoveLast);

  • Convert extensions (bytesArray.Size(), ComputeHash, list.ToStringEnumerable(), Number to TimeSpan (50.Milliseconds(), 2.Seconds(), 5.Minutes()...);

  • Serializations extensions (ToJson, ToBytes);

  • Strings extensions (Remove, ParseTo, ReplaceFirst, ReplaceLast, AddLinkQuery);

  • Math extensions for numbers (Abs, Clamp, Pow, Sin, Exp...);

  • Task extensions (WaitInBackground, Timeout).

Keywords

The keywords are needed to refer to certain functions that are not logical to do as extensions, but they are very easy to remember.

  • The log keyword is designed to register log messages during the execution of the program;

  • The random keyword is needed to create random numbers or objects (random.Int(1, 100), Bool, Guid, Float, Double, IntMinMax, BigInteger, String);

  • The localStorage keyword implements an interface for managing local data;

  • The code keyword is needed to refer to the written code for metaprogramming, for example, which types (code.Types) are in the current program and find a specific one among them;

  • The strings keyword for referring to popular string constants (Empty, NewLine, Tab, Space, Null).

Additional features

  • Classes File, Folder (FileSystem) for easy work with files and folders;

  • Class HttpRequest (Http) for working with http requests (GET, POST, PUT, DELETE);

  • Class WebSocket (WebSockets) for working with websocket protocol;

  • Static class Internet (Network) for accessing popular functions when working with the network (GetMyIPAddress, GetDomain, DateTimeNow);

  • Static class LocalNetwork (Network) for getting information about the local network (current IPv4, IPv6, Controller (NIC), FreePort, IsPortFree);

  • Class TaskOperation (System.Threading.Tasks) for more complex tasks with progress, the ability to pause and stop;

  • Static class TaskManager (System.Threading.Tasks) for managing tasks in an application.

  • Classes ScriptBuilder, EnumBuilder (CodeGeneration) for easy generate script.

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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.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.3.5 117 10/28/2024
1.3.4 120 10/20/2024
1.3.3 131 10/20/2024
1.3.2 122 10/20/2024
1.3.1 145 10/19/2024
1.3.0 139 10/19/2024
1.2.2 139 10/18/2024
1.2.1 114 10/12/2024
1.2.0 109 10/12/2024
1.1.3 103 10/12/2024
1.1.2 104 10/12/2024
1.1.1 113 10/8/2024
1.1.0 108 10/8/2024
1.0.0 118 10/6/2024
0.4.0 137 9/18/2024
0.3.9 115 9/18/2024
0.3.8 141 9/15/2024
0.3.7 121 9/15/2024
0.3.6 132 9/14/2024
0.3.5 127 9/13/2024
0.3.4 127 9/8/2024
0.3.3 115 9/8/2024
0.3.2 134 9/6/2024
0.3.1 117 9/6/2024
0.3.0 131 9/6/2024
0.2.9 120 9/6/2024
0.2.8 121 9/1/2024
0.2.7 126 9/1/2024
0.2.6 130 8/27/2024
0.2.5 140 8/23/2024
0.2.4 143 8/23/2024
0.2.3 144 8/22/2024
0.2.2 138 8/21/2024
0.2.1 132 8/21/2024
0.1.9 137 8/21/2024
0.1.8 133 8/15/2024
0.1.7 132 8/14/2024
0.1.6 149 8/13/2024
0.1.5 142 8/11/2024
0.1.4 89 8/6/2024
0.1.3 105 8/1/2024
0.1.2 114 7/27/2024
0.1.1 109 7/27/2024
0.1.0 115 7/27/2024