SweetMeSoft.Tools
1.10.130
See the version list below for details.
dotnet add package SweetMeSoft.Tools --version 1.10.130
NuGet\Install-Package SweetMeSoft.Tools -Version 1.10.130
<PackageReference Include="SweetMeSoft.Tools" Version="1.10.130" />
<PackageVersion Include="SweetMeSoft.Tools" Version="1.10.130" />
<PackageReference Include="SweetMeSoft.Tools" />
paket add SweetMeSoft.Tools --version 1.10.130
#r "nuget: SweetMeSoft.Tools, 1.10.130"
#:package SweetMeSoft.Tools@1.10.130
#addin nuget:?package=SweetMeSoft.Tools&version=1.10.130
#tool nuget:?package=SweetMeSoft.Tools&version=1.10.130
SweetMeSoft.Tools
Library with a set of reusable tools and utilities for common tasks.
Description
SweetMeSoft.Tools is a library for .NET Standard 2.1 that groups a collection of static helper classes to perform a variety of tasks, from type conversions and validations to email sending and data encryption.
Main Components
Converters
Methods for data type conversions, handling local culture for decimal separators.
StringToDouble(string)StringToFloat(string)StringToDecimal(string)StringToInt(string)IntToString(int)DecimalToString(decimal)StringToBool(string)
Email
A class for sending emails via SMTP.
Send(EmailOptions): Sends an email configured through anEmailOptionsobject.- Supports preconfigured hosts like Gmail, Outlook and Webmail.
- Allows normal and embedded (linked) attachments.
- Requires
EmailOptions.SenderandEmailOptions.Passwordto be set statically before use.
Reflections
Utilities that use reflection.
CleanVirtualProperties<T>(T entity): Removes circular references in objects (commonly database entities) by serializing and deserializing the object withReferenceLoopHandling.Ignore. Very useful for preparing data to be sent through an API.
Security
Methods for password hashing and reversible encryption.
HashPasswordIrreversible(string): Creates a hash of a password using PBKDF2 with a salt.VerifyHashedPasswordIrreversible(string, string): Compares a plain text password with its hash.CipherPasswordReversible(string, key, iv): Encrypts text using AES.DecipherPassword(string, key, iv): Decrypts encrypted text with AES.
Utils
A set of miscellaneous utilities.
GetException(Exception): Gets the innermost exception message.GetRandomNumber(int): Generates a string of N random digits.WriteToAPath(StreamFile, path): Saves aStreamFileto a disk path.StringMatchCompare(list, chain, threshold): Performs a "fuzzy" string comparison to find similarities.MinifyJson(string): Removes whitespace from a JSON string.
Validators
Common validation methods.
IsValidEmail(string): Verifies if a string has a valid email format.IsValidPassword(string): Verifies if a password meets complexity requirements (uppercase, lowercase, numbers, symbols and minimum length).
Dependencies
Installation
dotnet add package SweetMeSoft.Tools
Usage Example
using SweetMeSoft.Tools;
// --- Validation ---
bool isValid = Validators.IsValidEmail("test@example.com");
// --- Security ---
string password = "MySecurePassword123!";
string hashedPassword = Security.HashPasswordIrreversible(password);
bool isPasswordCorrect = Security.VerifyHashedPasswordIrreversible(hashedPassword, password);
// --- Converters ---
int number = Converters.StringToInt("123.45"); // Results in 123
License
This project is under the MIT license.
| Product | Versions 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. |
-
.NETStandard 2.1
- Microsoft.CSharp (>= 4.7.0)
- Newtonsoft.Json (>= 13.0.4)
- SweetMeSoft.Base (>= 1.10.144)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on SweetMeSoft.Tools:
| Package | Downloads |
|---|---|
|
SweetMeSoft.Files
SweetMeSoft Files Library is a compilation of ways to read and generate different types of files like Excel, CSV, TXT, ZIP and more |
|
|
SweetMeSoft.GCP
SweetMeSoft GCP Library is a compilation of basic tools to connect with GCP services |
|
|
SweetMeSoft.Middleware
SweetMeSoft Middleware Library is a compilation of different middlewares for .Net core |
|
|
SweetMeSoft.Captcha
SweetMeSoft Captcha Library is for solve the most of captchas automatically |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 1.10.132 | 134 | 2/19/2026 | |
| 1.10.131 | 567 | 11/20/2025 | |
| 1.10.130 | 649 | 9/17/2025 | |
| 1.10.129 | 713 | 1/19/2025 | |
| 1.10.128 | 769 | 8/31/2024 | |
| 1.10.127 | 423 | 4/3/2024 | |
| 1.10.126 | 237 | 4/3/2024 | |
| 1.10.125 | 203 | 4/3/2024 | |
| 1.10.124 | 245 | 1/30/2024 | |
| 1.10.123 | 377 | 11/27/2023 | |
| 1.10.122 | 299 | 11/1/2023 | |
| 1.10.121 | 199 | 11/1/2023 | |
| 1.10.120 | 386 | 10/12/2023 | |
| 1.10.119 | 419 | 7/7/2023 | |
| 1.10.118 | 347 | 7/1/2023 | |
| 1.10.117 | 288 | 6/12/2023 | |
| 1.10.115 | 308 | 6/10/2023 | |
| 1.10.114 | 305 | 6/7/2023 | |
| 1.10.1 | 234 | 10/12/2023 |