Encamina.Enmarcha.Core 8.1.6-preview-07

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

// Install Encamina.Enmarcha.Core as a Cake Tool
#tool nuget:?package=Encamina.Enmarcha.Core&version=8.1.6-preview-07&prerelease                

Core

Nuget package

Core is a project that primarily contains cross-cutting utilities that can be used in a wide variety of projects. Among them, there are utilities related to Uris, Strings, Attributes, JSON handling, and more.

Setup

Nuget package

First, install NuGet. Then, install Encamina.Enmarcha.Core from the package manager console:

PM> Install-Package Encamina.Enmarcha.Core

.NET CLI:

First, install .NET CLI. Then, install Encamina.Enmarcha.Core from the .NET CLI:

dotnet add package Encamina.Enmarcha.Core

How to use

Below are some of the most important utilities. It is not a complete list of all functionalities.

JsonUtils

JsonUtils contains a collection of static methods that provide utilities for JSON handling.

string json = "{\"Name\":\"John\",\"Age\":30,\"City\":\"Valencia\"}";

var deserializedObject = JsonUtils.DeserializeAnonymousType(json, new { Name = string.Empty, Age = 0, City = string.Empty });

The above code deserializes a string into an anonymous type, eliminating the need to create a class.

SdkVersionUtils

SdkVersionUtils is an utility class for the version information of the current assembly.

var version = SdkVersionUtils.GetSdkVersion("Program SDK Version: ", Assembly.GetAssembly(typeof(Program)));
// Program SDK Version: 6.0.3-16

UriExtensions

UriExtensions is an extension methods class for handling Uris.

var uri = new Uri("https://www.enmarcha.net/");

var newUri = uri.Append("acme", "products");
// newUri => https://www.enmarcha.net/acme/products

StringExtensions

StringExtensions is an extension methods class for handling strings.

var email = "enmarcha@email.com";

var isValidEmail = email.IsValidEmail();
// true

ObjectExtensions

ObjectExtensions is an extension methods class for handling objects.

var data = new { Name = "Siul", Age = 43, City = "Adarrefnop" };

var dictionary = data.ToPropertyDictionary();
// {Name, Siul}
// {Age, 43}
// {City, Adarrefnop}

IListExtensions

IListExtensions is an extension methods class for handling IList<T>.

IList<string> values = GetValues(); // Foo, Bar
var newNewValues = new[] { "FooBar", "BarFoo" };

values.AddRange(newNewValues);
// values =>  Foo, Bar, FooBar, BarFoo

IDictionaryExtensions

IDictionaryExtensions is an extension methods class for handling IDictionary<TKey, TValue>.

IDictionary<int, string> dictionary1 = new Dictionary<int, string>() { { 1, "one" }, { 2, "two" }, };

IDictionary<int, string> dictionary2 = new Dictionary<int, string>() { { 3, "three" }, { 4, "four" }, };

dictionary1.Merge(dictionary2);
// {1, one}
// {2, two}
// {3, three}
// {4, four}

ICollectionExtensions

ICollectionExtensions is an extension methods class for handling ICollection<T>.

ICollection<string> values = GetValues(); // Foo, Bar
var newNewValues = new[] { "FooBar", "BarFoo" };

values.AddRange(newNewValues);
// values =>  Foo, Bar, FooBar, BarFoo

EnumExtensions

EnumExtensions is an extension methods class for handling Enum types.

public enum TransportType
{
    [Description("Transport by Airplane")]
    Airplane,

    [Description("Transport by Car")]
    Car,

    [Description("Transport by Train")]
    Train,

    [Description("Transport by Bus")]
    Bus,

    [Description("Transport by Bicycle")]
    Bicycle
}

// ...

var currentTransport = TransportType.Airplane;

var airplaneDescription = currentTransport.GetEnumDescription();
// airplaneDescription => Transport by Airplane

CultureInfoExtensions

CultureInfoExtensions is an extension methods class for handling CultureInfo.

var currentCulture = new CultureInfo("es-MX");
var newCulture = new CultureInfo("es");

bool matches = currentCulture.MatchesWith(newCulture);
// matches => true

UriAttribute

UriAttribute provides 'Uri' validation.

public class MyClass
{
    [Uri(AllowsNull = false)]
    public Uri Uri { get; set; }
}

There are more extension methods, classes with extension methods, attributes, among others, available.

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 (19)

Showing the top 5 NuGet packages that depend on Encamina.Enmarcha.Core:

Package Downloads
Encamina.Enmarcha.AI.QuestionsAnswering.Abstractions

Package Description

Encamina.Enmarcha.DependencyInjection

Package Description

Encamina.Enmarcha.AI.OpenAI.Abstractions

Package Description

Encamina.Enmarcha.SemanticKernel.Abstractions

Package Description

Encamina.Enmarcha.Email.Abstractions

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
8.2.0 753 10/22/2024
8.2.0-preview-01-m01 537 9/17/2024
8.1.9-preview-02 460 10/22/2024
8.1.9-preview-01 752 10/4/2024
8.1.8 1,133 9/23/2024
8.1.8-preview-07 942 9/12/2024
8.1.8-preview-06 806 9/11/2024
8.1.8-preview-05 625 9/10/2024
8.1.8-preview-04 982 8/16/2024
8.1.8-preview-03 688 8/13/2024
8.1.8-preview-02 559 8/13/2024
8.1.8-preview-01 585 8/12/2024
8.1.7 685 8/7/2024
8.1.7-preview-09 670 7/3/2024
8.1.7-preview-08 573 7/2/2024
8.1.7-preview-07 541 6/10/2024
8.1.7-preview-06 569 6/10/2024
8.1.7-preview-05 566 6/6/2024
8.1.7-preview-04 559 6/6/2024
8.1.7-preview-03 577 5/24/2024
8.1.7-preview-02 525 5/10/2024
8.1.7-preview-01 548 5/8/2024
8.1.6 1,782 5/7/2024
8.1.6-preview-08 546 5/2/2024
8.1.6-preview-07 573 4/29/2024
8.1.6-preview-06 1,152 4/26/2024
8.1.6-preview-05 628 4/24/2024
8.1.6-preview-04 611 4/22/2024
8.1.6-preview-03 564 4/22/2024
8.1.6-preview-02 700 4/17/2024
8.1.6-preview-01 688 4/15/2024
8.1.5 719 4/15/2024
8.1.5-preview-15 604 4/10/2024
8.1.5-preview-14 628 3/20/2024
8.1.5-preview-13 540 3/18/2024
8.1.5-preview-12 601 3/13/2024
8.1.5-preview-11 560 3/13/2024
8.1.5-preview-10 550 3/13/2024
8.1.5-preview-09 595 3/12/2024
8.1.5-preview-08 548 3/12/2024
8.1.5-preview-07 559 3/8/2024
8.1.5-preview-06 843 3/8/2024
8.1.5-preview-05 585 3/7/2024
8.1.5-preview-04 630 3/7/2024
8.1.5-preview-03 590 3/7/2024
8.1.5-preview-02 755 2/28/2024
8.1.5-preview-01 661 2/19/2024
8.1.4 992 2/15/2024
8.1.3 697 2/13/2024
8.1.3-preview-07 537 2/13/2024
8.1.3-preview-06 615 2/12/2024
8.1.3-preview-05 546 2/9/2024
8.1.3-preview-04 564 2/8/2024
8.1.3-preview-03 571 2/7/2024
8.1.3-preview-02 600 2/2/2024
8.1.3-preview-01 527 2/2/2024
8.1.2 770 2/1/2024
8.1.2-preview-9 558 1/22/2024
8.1.2-preview-8 511 1/19/2024
8.1.2-preview-7 516 1/19/2024
8.1.2-preview-6 492 1/19/2024
8.1.2-preview-5 532 1/19/2024
8.1.2-preview-4 521 1/19/2024
8.1.2-preview-3 504 1/18/2024
8.1.2-preview-2 683 1/18/2024
8.1.2-preview-16 503 1/31/2024
8.1.2-preview-15 546 1/31/2024
8.1.2-preview-14 659 1/25/2024
8.1.2-preview-13 513 1/25/2024
8.1.2-preview-12 545 1/23/2024
8.1.2-preview-11 557 1/23/2024
8.1.2-preview-10 528 1/22/2024
8.1.2-preview-1 486 1/18/2024
8.1.1 694 1/18/2024
8.1.0 633 1/18/2024
8.0.3 732 12/29/2023
8.0.1 639 12/14/2023
8.0.0 796 12/7/2023
6.0.4.3 725 12/29/2023
6.0.4.2 701 12/20/2023
6.0.4.1 692 12/19/2023
6.0.4 777 12/4/2023
6.0.3.20 727 11/27/2023
6.0.3.19 733 11/22/2023