Gen.GUID.By.Length 1.0.0

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

GUID Generator Plugin

This NuGet package plugin is a simple and efficient solution for generating GUIDs (Globally Unique Identifiers) of customizable lengths. By providing a length parameter, the plugin generates GUIDs tailored to your specific needs, offering flexibility and control over the output.

Features

  • Custom Length Generation: Generate GUIDs with a length specified by the user.
  • Easy Integration: Seamlessly integrate into any .NET project with minimal setup.
  • Lightweight: Designed to be fast and efficient, ensuring high performance without adding unnecessary overhead.
  • Cross-Platform Compatibility: Compatible with .NET Standard, making it usable across various .NET platforms like .NET Framework, .NET Core, and .NET 6+.

Installation

Install the package via NuGet Package Manager:

Install-Package Gen.GUID.By.Length --version 1.0.0

Or via the .NET CLI:

dotnet add package Gen.GUID.By.Length --version 1.0.0

Usage

Here's how you can use the plugin in your project:

using GuidGeneratorPlugin;

class Program
{
    static void Main(string[] args)
    {
        int length = 16; // Desired length of the GUID
        string customGuid = GuidGenerator.Generate(length);

        Console.WriteLine($"Generated GUID: {customGuid}");
    }
}

Parameters

  • length (int): The desired length of the GUID. Must be a positive integer.

Output

The generated GUID will be a string of the specified length, containing alphanumeric characters.

Advantages

  1. Flexibility: The ability to specify GUID length provides greater control over the identifier format, making it suitable for various use cases.
  2. Simplified Development: Eliminates the need for custom GUID generation logic, saving time and reducing errors.
  3. Consistency: Ensures that GUIDs are consistently generated based on your specified parameters.
  4. Enhanced Performance: The lightweight nature of the plugin ensures quick GUID generation without affecting application performance.
  5. Cross-Platform Usability: Works seamlessly across different .NET platforms, increasing the scope of its applicability.

Contributing

Contributions are welcome! If you have ideas for improvement or encounter any issues, feel free to open an issue or submit a pull request on the https://github.com/DelushaanM/GenGUIDByLength.

License

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


Let me know if you'd like to refine or expand this README further!

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 114 12/10/2024