PCsFinanceMath 1.0.0

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

Here is a sample README.md content for your IPWhitelist NuGet package, providing installation, usage, and basic information about the project:

# IPWhitelist

IPWhitelist is a .NET library designed to provide functionality for managing and validating IP addresses against a whitelist of approved addresses. It helps in securing your APIs, web applications, or services by ensuring that only requests from trusted IP addresses are accepted.

## Features

- Add and remove IP addresses to the whitelist.
- Validate incoming requests against the IP whitelist.
- Support for both IPv4 and IPv6 addresses.
- Simple integration with any .NET application.

## Installation

You can install the IPWhitelist library via [NuGet](https://www.nuget.org/).

Using the .NET CLI:

```bash
dotnet add package IPWhitelist --version 1.0.1

Or through the NuGet Package Manager Console:

Install-Package IPWhitelist -Version 1.0.1

Usage

1. Adding IPs to the Whitelist

You can add IP addresses to the whitelist using the IPWhitelist class:

using IPWhitelist;

var whitelist = new Whitelist();
whitelist.AddIPAddress("192.168.1.1");
whitelist.AddIPAddress("2001:0db8:85a3:0000:0000:8a2e:0370:7334"); // IPv6 example

2. Checking an IP Address

To check if an IP address is in the whitelist:

bool isAllowed = whitelist.IsAllowed("192.168.1.1");

if (isAllowed)
{
    Console.WriteLine("Access granted.");
}
else
{
    Console.WriteLine("Access denied.");
}

3. Removing an IP Address

You can also remove an IP address from the whitelist:

whitelist.RemoveIPAddress("192.168.1.1");

4. Listing All Whitelisted IPs

You can retrieve all the whitelisted IP addresses:

var ipList = whitelist.GetAllIPAddresses();

foreach (var ip in ipList)
{
    Console.WriteLine(ip);
}

Configuration

You can configure the IPWhitelist library to store whitelist data in memory or persist it to a database by extending the library. This package comes with a simple in-memory implementation out of the box.

Contributing

We welcome contributions to enhance IPWhitelist! Please feel free to submit pull requests or report issues.

License

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

Acknowledgements

  • Inspired by the need for security in API requests and microservices.
  • Developed with .NET 8.

Contact

If you have any questions or need further assistance, please feel free to reach out to the project maintainer at contact@prafulchauhan.com.


You can customize the content, add more advanced usage examples, or include other sections as needed. Make sure to update the version number and any contact information accordingly!
Product 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

    • No dependencies.

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.0.0 185 10/17/2024