Area27.Hub
1.0.7
dotnet add package Area27.Hub --version 1.0.7
NuGet\Install-Package Area27.Hub -Version 1.0.7
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="Area27.Hub" Version="1.0.7" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Area27.Hub" Version="1.0.7" />
<PackageReference Include="Area27.Hub" />
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 Area27.Hub --version 1.0.7
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Area27.Hub, 1.0.7"
#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 Area27.Hub@1.0.7
#: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=Area27.Hub&version=1.0.7
#tool nuget:?package=Area27.Hub&version=1.0.7
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Area27.Hub
Biblioteca utilitária .NET 8 com validações, extensões de string, processamento de imagens, análise de texto, geração de CPF, consulta de CNPJ, geração de SQL e utilitários SaaS.
Instalação
dotnet add package Area27.Hub
Principais recursos
- Validação de CPF e email
- Geração de CPF (com/sem pontuação)
- Consulta de dados de CNPJ via API pública
- Processamento de imagens (compressão e conversão)
- Contagem e estatísticas de palavras
- Manipulação de datas (diferenças, idade, cálculos, nomes em português)
- Gerador de CREATE TABLE para PostgreSQL, MySQL, SQL Server e SQLite
- Conversão entre XML e JSON
- Geração de PDF a partir de JSON
- Utilitários SaaS: API Keys, tokens, hashing de senha, licenças, slugs
Exemplos rápidos
CPF
using Area27.Hub.Helpers;
var cpfValido = ValidationHelper.IsCpfValido("390.533.447-05");
var cpfGerado = ValidationHelper.GenerateCpf(formatted: true);
CNPJ
using Area27.Hub.Helpers;
// Consultar dados de CNPJ (async)
var dados = await CnpjHelper.ConsultarCnpjAsync("40.357.190/0001-13");
Console.WriteLine($"Razão Social: {dados?.RazaoSocial}");
Console.WriteLine($"Capital Social: {dados?.CapitalSocial}");
Console.WriteLine($"Situação: {dados?.Estabelecimento?.SituacaoCadastral}");
// Versão síncrona
var dadosSync = CnpjHelper.ConsultarCnpj("40357190000113");
Imagens
using Area27.Hub.Helpers;
var base64Processada = ImageHelper.ProcessImage(
imageInput: "caminho/para/imagem.jpg", // ou base64
maxSizeMb: 2,
outputFormat: ImageHelper.ImageFormat.Jpg
);
Texto
using Area27.Hub.Helpers;
var total = WordCountHelper.CountWords("hello world hello");
var stats = WordCountHelper.GetStatistics("hello world hello");
Datas
using Area27.Hub.Helpers;
// Diferença entre datas
var data1 = new DateTime(2024, 1, 15);
var data2 = new DateTime(2026, 3, 27);
var diferenca = DateHelper.CalculateDateDifference(data1, data2); // "12 dias, 2 meses, 2 anos"
// Calcular idade
var nascimento = new DateTime(1990, 6, 15);
var idade = DateHelper.CalculateAge(nascimento); // Com data de hoje
// Adicionar período
var novaData = DateHelper.AddPeriod(data1, yearsToAdd: 2, monthsToAdd: 3, daysToAdd: 15);
// Dias úteis
var diasUteis = DateHelper.BusinessDaysBetween(data1, data2);
// Formatação em português
var dataFormatada = DateHelper.FormatDateInPortuguese(data2); // "27 de março de 2026, segunda-feira"
SQL
using Area27.Hub.Helpers;
public class Produto
{
public int Id { get; set; }
public string Nome { get; set; }
public decimal Preco { get; set; }
}
var sql = SqlTableGenerator.GenerateCreateTable<Produto>(
SqlTableGenerator.DatabaseType.PostgreSql,
tableName: "produtos"
);
SaaS
using Area27.Hub.Helpers;
var apiKey = SaasHelper.GenerateApiKey();
var senhaHash = SaasHelper.HashPassword("MyP@ssw0rd");
var slug = SaasHelper.GenerateSlug("Meu Produto Incrivel");
Build
dotnet build -c Release
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- QuestPDF (>= 2024.12.3)
- SixLabors.ImageSharp (>= 3.1.12)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.