mirror of
https://git.groepel.net/Groepel.Net.Common.git
synced 2026-10-29 00:59:25 +01:00
master
Groepel.Net.Common
A collection of common utilities and libraries for .NET applications, providing reusable components for everyday development tasks.
Projects
This solution consists of several NuGet packages:
- Groepel.Net.Common: Core utilities including data transfer objects (DTOs), extension methods, helper classes, and common services like date/time providers, serializers, and GUID providers.
- Groepel.Net.Common.Mail: Email functionality using MailKit for sending emails with support for various configurations.
- Groepel.Net.Common.QrCodes: QR code generation services using QrCoder, including standard, minified, and PETSCII QR codes.
- Groepel.Net.Common.SSH: SSH and SFTP client implementations using SSH.NET for secure file transfers and remote command execution.
Requirements
- .NET 9.0 or later
Usage
Groepel.Net.Common
Register services in your DI container:
builder.Services.AddGroepelCommonServices();
Use extensions and helpers:
using Groepel.Net.Common.Extensions;
// Example usage of extensions
var result = someString.ToTitleCase();
Groepel.Net.Common.Mail
Configure and use the email service:
builder.Services.AddGroepelMailServices(configuration);
Send an email:
var emailer = serviceProvider.GetRequiredService<IEmailer>();
await emailer.SendEmailAsync(new MailDto { ... });
Groepel.Net.Common.QrCodes
Generate QR codes:
var qrService = serviceProvider.GetRequiredService<IQrCodeService>();
var qrCode = qrService.GenerateQrCode("Hello World");
Groepel.Net.Common.SSH
Connect via SSH:
var sshClient = new GroepelSshClient(connectionInfo);
await sshClient.ConnectAsync();
// Execute commands or transfer files
Building from Source
Clone the repository and build:
git clone <repository-url>
cd Groepel.Net.Common
dotnet build
Testing
Run tests:
dotnet test
Description
Languages
C#
100%