AnzolinNetDevPack 1.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package AnzolinNetDevPack --version 1.1.0
                    
NuGet\Install-Package AnzolinNetDevPack -Version 1.1.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="AnzolinNetDevPack" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AnzolinNetDevPack" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="AnzolinNetDevPack" />
                    
Project file
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 AnzolinNetDevPack --version 1.1.0
                    
#r "nuget: AnzolinNetDevPack, 1.1.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.
#:package AnzolinNetDevPack@1.1.0
                    
#: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=AnzolinNetDevPack&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=AnzolinNetDevPack&version=1.1.0
                    
Install as a Cake Tool

AnzolinNetDevPack is a NuGet Package that contains a group of help and validation classes that will help you in your ability to produce applications in an easier way.

Current version Downloads
NuGet NuGet

This project is an update of Anzolin.Net.NuGet which I decided to change the name, adjust a project pattern and also unify the nuget packages into a single package.

Also see my NuGet Profile to find more interesting packages.

Installation

Just add a dependency in your .csproj file to get the nuget:

<PackageReference Include="AnzolinNetDevPack" Version="1.1.0" />

Or from a command prompt:

dotnet add package AnzolinNetDevPack
Install-Package AnzolinNetDevPack

How it works?

Class Function Parameters Summary pt-br Summary en-us
DateHelper DateDiff IntervalType type, DateTime fromDate, DateTime toDate Retorna entre datas de acordo com o tipo de intervalo escolhido.
DateTimeHelper GetDateTimeBrasilia N/A Retorna a data/hora de agora de Brasília ("America/Sao_Paulo").
DateTimeHelper GetDateTimeByTimeZone string windowsOrIanaTimeZoneId Retorna a data/hora de agora de acordo com o timezone informado, exemplo: "America/Sao_Paulo".
EnumHelper GetValue object aEnum Retorna o valor inteiro do objeto enum informado.
EnumHelper GetText object aEnum Retorna o valor texto do objeto enum informado.
EnumHelper GetText Type aEnumType, int aKey Retorna o valor texto do objeto enum informado.
EnumHelper GetText Type aEnumType, string vEnumName Retorna o valor texto do objeto enum informado.
EnumHelper GetValueDisplayDictionary Type aEnumType Retorna um dicionário do tipo int, string do objeto enum informado.
EnumHelper GetSelectListItems Type aEnumType, int? value Retorna uma lista do tipo SelectListItem do objeto enum informado. Para ser utilizado em lookups.
HangfireForMySqlHelper Enqueue Expression methodCall Enfilera um trabalho.
HangfireForMySqlHelper GetJobDetails MySqlStorage storage, string jobId Retorna os detalhes do trabalho informado.
HangfireForMySqlHelper GetJobResult MySqlStorage storage, string jobId Retorna o resultado da execução do trabalho informado.
HangfireForSqlServerHelper Enqueue Expression methodCall Enfilera um trabalho.
HangfireForSqlServerHelper GetJobDetails SqlServerStorage storage, string jobId Retorna os detalhes do trabalho informado.
HangfireForSqlServerHelper GetJobResult SqlServerStorage storage, string jobId Retorna o resultado da execução do trabalho informado.
SearchHelper ApplyPaging IEnumerable enumerable, int count, int pageSize, int? page Aplica uma paginação para o IEnumerable TModel.
StringHelper RemoveMask string value Remove todos caracteres, deixando apenas letras e números.
StringHelper AddMask MaskType type, string value Aplica a máscara escolhida.
StringHelper OnlyNumbers string value Remove todas letras, deixando apenas números.
StringHelper FirstChatToUpper string value Aplica o primeiro caracter da string como maiúsculo.
StringHelper RemoveAccents string value Remove acentuações.
TimeHelper ConvertTime string time, TimeHelper.Type returnType Converte uma string no formato "hh:mm:ss" para o tipo informado pelo parâmetro "returnType".
TimeHelper ConvertTime string time Converte uma string no formato "hh:mm:ss" para um DateTime contendo a hora, em que o "dia", "mes" e "ano" são de um "DateTime.MinValue".
TimeHelper GetTimeAsString double time, TimeHelper.Type fromType Obtêm uma hora no formato "hh:mm:ss" à partir tempo e tipo de tempo informados.
TimeHelper GetTimeAsArray string time Obtêm uma hora como um array de 3 posições representando horas, minutos e segundos respectivamente, à partir tempo informado. Caso ocorra algum erro retorna nulo.
TimeHelper GetTime DateTimeOffset data Retorna somente a informação de hora, minuto e segundo de uma data completa.
TimeHelper GetTime DateTime data Retorna somente a informação de hora, minuto e segundo de uma data completa.
TimeHelper Truncate DateTimeOffset data Retorna a data e hora completa, sendo o tempo absoluto.
CpfCnpjValidator IsValid string cpfCnpj Valida o documento informado.
CpfCnpjValidator IsCpf string cpf Valida se é um CPF.
CpfCnpjValidator IsCnpj string cnpj Valida se é CNPJ.
EmailValidator IsValidEmail string email Valida se é um e-mail.
Services ConsultaCnpj string cnpj Consulta os dados da pessoa jurídica através do Cnpj informado.
Services ConsultaCnpjAsync string cnpj Consulta os dados da pessoa jurídica através do Cnpj informado.

Examples

The application containing all the examples is under development but you can find some of them.

I recommend that you explore the code to understand what it covers, it's easy to realize.

How can I contribute?

If you want to help the project, improving it or creating something new, welcome. This project was created to be a home of useful and reusable pieces of code for the .NET community. So if you have any code snippet that is useful, clean, decoupled and tested, and want to contribute to this goal, please make a pull request!

License

This project is MIT Licensed.

About the author

Hello everyone, my name is Diego Anzolin Ferreira. I'm a .NET developer from Brazil. I hope you will enjoy this project as much as I enjoy developing it. If you have any problems, you can post a GitHub issue. You can reach me out at diego@anzolin.com.br.

Want to help me keep creating open source projects, make a donation:

Donate Donate

Thank you!

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.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.4.0 448 2/9/2023
1.3.2 642 9/22/2022
1.3.1 658 9/22/2022
1.3.0 639 9/22/2022
1.2.0 615 8/10/2022
1.1.0 578 11/3/2021
1.0.6 568 10/21/2021
1.0.5 604 10/21/2021
1.0.4 559 10/15/2021
1.0.3 622 10/12/2021
1.0.2 1,024 8/16/2021
1.0.1 611 8/15/2021