Pma.Helpers 1.3.5

dotnet add package Pma.Helpers --version 1.3.5
                    
NuGet\Install-Package Pma.Helpers -Version 1.3.5
                    
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="Pma.Helpers" Version="1.3.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Pma.Helpers" Version="1.3.5" />
                    
Directory.Packages.props
<PackageReference Include="Pma.Helpers" />
                    
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 Pma.Helpers --version 1.3.5
                    
#r "nuget: Pma.Helpers, 1.3.5"
                    
#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 Pma.Helpers@1.3.5
                    
#: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=Pma.Helpers&version=1.3.5
                    
Install as a Cake Addin
#tool nuget:?package=Pma.Helpers&version=1.3.5
                    
Install as a Cake Tool

PMA.Helpers NuGet Package

A comprehensive library of helper methods and extensions for .NET applications.

Features

  • Configuration Management: Simplifies accessing and deserializing configuration data from JSON files.
  • Enum Extensions: Utility methods for working with enums.
  • Exception Handling: Extract detailed error messages including inner exceptions.
  • Object Extensions: Data type conversions, JSON serialization, and object validation.
  • String Extensions: String manipulation, Base64 encoding/decoding, and regular expression matching.
  • Stream Extensions: Stream reading utilities.
  • Cryptography: Simplified encryption and decryption using SHA256.

Installation

Install the package via NuGet:

dotnet add package PMA.Helpers

Usage

Configuration Helper

Access configuration from appsettings.json:

var config = ConfigHelper.GetFromAppsettings<MyConfig>("SectionKey");

Access configuration from a custom JSON file:

var config = ConfigHelper.GetFrom<MyConfig>("mysettings.json", "SectionKey");

Enum Extensions

Get the name of an enum value:

var enumName = MyEnum.Value.GetName();

Exception Extensions

Retrieve detailed error messages:

var errorMessage = exception.GetFullErrorMessage();

Object Extensions

Convert objects to JSON:

var json = myObject.ToJson();

Validate objects using data annotations:

var validationErrors = myObject.ValidateDataAnnotations();

String Extensions

Check if a string is Base64:

bool isBase64 = myString.IsBase64();

Encrypt and decrypt strings:

string encrypted = myString.Encrypt("password");
string decrypted = encrypted.Decrypt("password");

Stream Extensions

Read all bytes from a stream:

byte[] bytes = stream.ReadAllBytes();

Contributing

Feel free to fork the repository and contribute via pull requests. For major changes, please open an issue first to discuss what you would like to change.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Author

PMA.Helpers.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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. 
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.3.5 638 12/17/2024
1.3.4 132 12/17/2024 1.3.4 is deprecated because it is no longer maintained and has critical bugs.
1.3.3 127 12/17/2024 1.3.3 is deprecated because it is no longer maintained and has critical bugs.
1.3.2 2,356 3/1/2023 1.3.2 is deprecated because it is no longer maintained and has critical bugs.
1.2.2 770 11/14/2022 1.2.2 is deprecated because it is no longer maintained and has critical bugs.
1.2.1 1,132 6/3/2022 1.2.1 is deprecated because it is no longer maintained and has critical bugs.
1.2.0 2,426 6/8/2021 1.2.0 is deprecated because it is no longer maintained and has critical bugs.
1.0.22 611 5/28/2021 1.0.22 is deprecated because it is no longer maintained and has critical bugs.
1.0.21 665 1/15/2021 1.0.21 is deprecated because it is no longer maintained and has critical bugs.
1.0.20 1,039 11/2/2020 1.0.20 is deprecated because it is no longer maintained and has critical bugs.
1.0.18 853 7/31/2020 1.0.18 is deprecated because it is no longer maintained and has critical bugs.
1.0.17 609 7/31/2020 1.0.17 is deprecated because it is no longer maintained and has critical bugs.
1.0.16 709 7/29/2020 1.0.16 is deprecated because it is no longer maintained and has critical bugs.
1.0.15 741 7/24/2020 1.0.15 is deprecated because it is no longer maintained and has critical bugs.
1.0.14 609 7/13/2020 1.0.14 is deprecated because it is no longer maintained and has critical bugs.
1.0.13 781 3/20/2020 1.0.13 is deprecated because it is no longer maintained and has critical bugs.
1.0.12 856 3/19/2020 1.0.12 is deprecated because it is no longer maintained and has critical bugs.
1.0.11 650 2/21/2020 1.0.11 is deprecated because it is no longer maintained and has critical bugs.
1.0.10 783 2/14/2020 1.0.10 is deprecated because it is no longer maintained and has critical bugs.
1.0.9 653 2/3/2020 1.0.9 is deprecated because it is no longer maintained and has critical bugs.
1.0.8 704 1/14/2020 1.0.8 is deprecated because it is no longer maintained and has critical bugs.
1.0.7 748 1/7/2020 1.0.7 is deprecated because it is no longer maintained and has critical bugs.
1.0.6 686 11/20/2019 1.0.6 is deprecated because it is no longer maintained and has critical bugs.
1.0.5 669 10/23/2019 1.0.5 is deprecated because it is no longer maintained and has critical bugs.
1.0.4 769 9/13/2019 1.0.4 is deprecated because it is no longer maintained and has critical bugs.
1.0.3 698 9/13/2019 1.0.3 is deprecated because it is no longer maintained and has critical bugs.
1.0.2 716 9/6/2019 1.0.2 is deprecated because it is no longer maintained and has critical bugs.
1.0.1 629 9/6/2019 1.0.1 is deprecated because it is no longer maintained and has critical bugs.

Add readme documentation