DotNetBasicUtils 1.20.0
dotnet add package DotNetBasicUtils --version 1.20.0
NuGet\Install-Package DotNetBasicUtils -Version 1.20.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="DotNetBasicUtils" Version="1.20.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DotNetBasicUtils --version 1.20.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DotNetBasicUtils, 1.20.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.
// Install DotNetBasicUtils as a Cake Addin #addin nuget:?package=DotNetBasicUtils&version=1.20.0 // Install DotNetBasicUtils as a Cake Tool #tool nuget:?package=DotNetBasicUtils&version=1.20.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
DotNet Basic Utils
DotNetBasicUtils é uma coleção de utilidades para programação no dia a dia como validações de Email, CPF, CNPJ, manipulação de arquivos, datas, criptografia e segurança, rede e muito mais. Desenvolvido para ser utilizado com .NET C#.
Funcionalidades disponíveis:
- Capturar HTML a partir de uma URL;
- Obter configuração XML;
- Obter versão assembly;
- Obter nome do mês;
- Obter nome da semana;
- Obter saudação com base no horário;
- Obter formato unix para data e hora;
- Obter formato epoch para data e hora;
- Manipulação de arquivos;
- Conversões de string;
- Formatações de string;
- Obter IP local;
- Obter relação de IPs;
- Obter relação de MACs;
- Obter MACs Up;
- Obter MACs Down;
- Obter FQDN;
- Ping Status;
- Obter status de serviço;
- Obter total de memória;
- Obter total de memória disponível;
- Obter total de memória utilizada;
- Obter uso de CPU;
- Obter total de disco;
- Obter total de disco disponível;
- Obter total de disco utilizado;
- Obter seriais dos discos;
- Obter portas seriais disponíveis;
- Criptografia MD5;
- Comunicação Serial;
- Validação de dados (Textos, Números, CPF, Email, CNPJ, IPV4, etc);
- Iniciar aplicação;
- Envio de e-mail;
- Cálculo Uptime;
- Gerar senhas.
Alguns exemplos de uso:
- Iniciar uma aplicação
DotNetBasicUtils.Infra.App.Start("notepad.exe");
- Obter portas COM disponíveis
string[] comPorts = DotNetBasicUtils.Infra.SystemInfo.GetAvaiableComPorts();
foreach (var com in comPorts)
{
Console.WriteLine("COM Port Avaiable: " + com);
}
- Conectando a uma porta COM
private static void OnSerialReported(object source, string data)
{
Console.WriteLine(data);
}
private static void Connect()
{
var serialService = new SerialService("COM1", 115200);
serialService.SerialReportedHandler += new SerialReportedHandler(OnSerialReported);
serialService.Connect();
while (true)
{
Thread.Sleep(5000);
serialService.Disconnect();
break;
}
}
- Obter HTML a partir de uma URL
string urlData = DotNetBasicUtils.Data.WebMananger.GetUrlContent("https://google.com")
- Obter status de um serviço
string status = DotNetBasicUtils.Infra.ServiceInfo.GetServiceStatus("serviceName");
- Obter IP local
string localIP = DotNetBasicUtils.Infra.Network.GetLocalIP();
- Validando um e-mail
bool isValid = DotNetBasicUtils.Validation.StringValidation.EmailAddress("email@domain.com");
- Validando um EPC 96 bits
bool isValid = DotNetBasicUtils.Validation.RfidValidation.Epc96("303500000000000000000001");
- Gerando um MD5
string md5 = DotNetBasicUtils.Security.Cryptography.GetMD5("myString123");
- Enviando e-mail
Mail.Configuration = new MailConfiguration("smtp.domain.com", 587, "email@domain.com", "email@domain.com", "password");
Mail.Send("Subject", "Message Content");
- Gerando senhas
string pwd = DotNetBasicUtils.Cryptography.GetPassword(10);
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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. 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.
-
.NETStandard 2.0
- System.Configuration.ConfigurationManager (>= 7.0.0)
- System.Diagnostics.PerformanceCounter (>= 7.0.0)
- System.IO.Ports (>= 7.0.0)
- System.Management (>= 7.0.2)
- System.ServiceProcess.ServiceController (>= 8.0.0)
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.20.0 | 69 | 10/31/2024 |
1.19.0 | 75 | 10/29/2024 |
1.18.0 | 102 | 8/7/2024 |
1.17.0 | 100 | 6/3/2024 |
1.16.0 | 177 | 1/6/2024 |
1.15.0 | 150 | 12/19/2023 |
1.13.1 | 174 | 8/11/2023 |
1.13.0 | 160 | 8/5/2023 |
1.12.0 | 301 | 1/17/2023 |
1.11.0 | 362 | 11/14/2022 |
1.10.0 | 373 | 11/12/2022 |
1.9.0 | 387 | 10/6/2022 |
1.7.0 | 444 | 9/17/2022 |
1.6.0 | 401 | 8/25/2022 |
1.5.1 | 431 | 8/20/2022 |
1.5.0 | 422 | 8/19/2022 |
Novas funcionalidades:
- Validação URL.