Skip to content

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.

License

Notifications You must be signed in to change notification settings

anzolin/AnzolinNetDevPack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Watchers Stargazers Forks Issues MIT License


Table of Contents

  1. What is?
  2. Installation
  3. How it works?
  4. Examples
  5. How can I contribute?
  6. License
  7. About the author
  8. Donate

What is?

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.4.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.
StringHelper SizeSuffix string value, int decimalPlaces Converte e formata um número em tamanho de arquivo.
StringHelper GenerateRandomPassword PasswordOptions opts Gera uma senha aleatória respeitando os requisitos de força fornecidos.
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.

Donate

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

Donate Donate

Thank you!

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages