SourceCraftCommunity.SimplifiedCSharp 1.0.0

dotnet add package SourceCraftCommunity.SimplifiedCSharp --version 1.0.0
                    
NuGet\Install-Package SourceCraftCommunity.SimplifiedCSharp -Version 1.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="SourceCraftCommunity.SimplifiedCSharp" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SourceCraftCommunity.SimplifiedCSharp" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="SourceCraftCommunity.SimplifiedCSharp" />
                    
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 SourceCraftCommunity.SimplifiedCSharp --version 1.0.0
                    
#r "nuget: SourceCraftCommunity.SimplifiedCSharp, 1.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.
#:package SourceCraftCommunity.SimplifiedCSharp@1.0.0
                    
#: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=SourceCraftCommunity.SimplifiedCSharp&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=SourceCraftCommunity.SimplifiedCSharp&version=1.0.0
                    
Install as a Cake Tool

Simplified 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#. 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;

    • ObserveChanges 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 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 Types

  • Static class LocalStorage, LocalStorageValue & SecretLocalStorage (LocalData) implements an interface for managing local data;

  • Static class Localization that provides the ability to manage localization in an application;

  • Collection class Cache (System.Collections.Generic), CacheFolder (FileSystem) for a collection of key-value data that can be stored for a limited time;

  • 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.0.0 71 1/23/2026