<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: MHIZokuchi</title>
    <description>The latest articles on DEV Community by MHIZokuchi (@mhizokuchi).</description>
    <link>https://dev.to/mhizokuchi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F683762%2Fb35ecf53-d80b-4d61-9022-7b46e9b32163.png</url>
      <title>DEV Community: MHIZokuchi</title>
      <link>https://dev.to/mhizokuchi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mhizokuchi"/>
    <language>en</language>
    <item>
      <title>ReferenceGenerator: A Lightweight C# Library for Generating Unique References</title>
      <dc:creator>MHIZokuchi</dc:creator>
      <pubDate>Sun, 02 Mar 2025 04:47:25 +0000</pubDate>
      <link>https://dev.to/mhizokuchi/referencegenerator-a-lightweight-c-library-for-generating-unique-references-4g89</link>
      <guid>https://dev.to/mhizokuchi/referencegenerator-a-lightweight-c-library-for-generating-unique-references-4g89</guid>
      <description>&lt;h1&gt;
  
  
  ReferenceGenerator: A Lightweight C# Library for Generating Unique References
&lt;/h1&gt;

&lt;p&gt;Are you tired of writing custom code to generate reference numbers for your C# applications? Meet &lt;strong&gt;ReferenceGenerator&lt;/strong&gt;, a flexible and lightweight library designed specifically for creating unique reference numbers in various formats.&lt;/p&gt;

&lt;h2&gt;
  
  
  🚀 Why You Need This Library
&lt;/h2&gt;

&lt;p&gt;Whether you're working on an e-commerce platform that needs order numbers, a financial app requiring transaction IDs, or a document management system that needs reference codes - ReferenceGenerator has got you covered!&lt;/p&gt;

&lt;h2&gt;
  
  
  ✨ Key Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Numeric references&lt;/strong&gt; - perfect for sequential identifiers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Alphabetic references&lt;/strong&gt; (uppercase letters only) - great for category codes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Alphanumeric references&lt;/strong&gt; - for maximum flexibility&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GUID generation&lt;/strong&gt; - when you need guaranteed uniqueness&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cryptographically secure references&lt;/strong&gt; - for security-sensitive applications&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custom prefixes&lt;/strong&gt; - easily add context to your references (e.g., "ORD-", "TXN-", "DOC-")&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  📦 Installation
&lt;/h2&gt;

&lt;p&gt;Getting started is easy. Install via NuGet Package Manager:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Install-Package ReferenceGenerator
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or via .NET CLI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dotnet add package ReferenceGenerator
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  💻 Usage Examples
&lt;/h2&gt;

&lt;p&gt;The API is designed to be intuitive and straightforward:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;ReferenceGenerator&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Generate a 10-digit numeric reference&lt;/span&gt;
&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;numericRef&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ReferenceGenerator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;GenerateNumeric&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;10&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// Example output: "1234567890"&lt;/span&gt;

&lt;span class="c1"&gt;// Generate an 8-character alphabetic reference&lt;/span&gt;
&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;alphabeticRef&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ReferenceGenerator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;GenerateAlphabetic&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;8&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// Example output: "ABCDEFGH"&lt;/span&gt;

&lt;span class="c1"&gt;// Generate a 12-character alphanumeric reference&lt;/span&gt;
&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;alphanumericRef&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ReferenceGenerator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;GenerateAlphanumeric&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;12&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// Example output: "A1B2C3D4E5F6"&lt;/span&gt;

&lt;span class="c1"&gt;// Generate a GUID&lt;/span&gt;
&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;guid&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ReferenceGenerator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;GenerateGuid&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="c1"&gt;// Example output: "550e8400-e29b-41d4-a716-446655440000"&lt;/span&gt;

&lt;span class="c1"&gt;// Generate references with prefixes&lt;/span&gt;
&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;orderRef&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ReferenceGenerator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;GenerateNumeric&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"ORD-"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// Example output: "ORD-123456"&lt;/span&gt;

&lt;span class="c1"&gt;// Generate a cryptographically secure reference&lt;/span&gt;
&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;secureRef&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ReferenceGenerator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;GenerateSecure&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;10&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// Example output: "X7Y9Z2W4P5"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  🛠️ Contributing
&lt;/h2&gt;

&lt;p&gt;We believe in the power of community! Contributions are welcome and appreciated. Before submitting pull requests, please:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Clone the repository&lt;/li&gt;
&lt;li&gt;Open the solution in Visual Studio or your preferred IDE&lt;/li&gt;
&lt;li&gt;Run the tests to ensure everything is working correctly&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Speaking of tests, you can run them easily:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dotnet test
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  📝 License
&lt;/h2&gt;

&lt;p&gt;This project is licensed under the MIT License - see the LICENSE file for details.&lt;/p&gt;

&lt;h2&gt;
  
  
  🆘 Support
&lt;/h2&gt;

&lt;p&gt;Encountered an issue or have questions? We're here to help:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Check existing issues in the GitHub repository&lt;/li&gt;
&lt;li&gt;Create a new issue if your problem hasn't been reported&lt;/li&gt;
&lt;li&gt;Provide as much detail as possible when reporting issues&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;Have you used ReferenceGenerator in your projects? Share your experience in the comments below! And don't forget to ⭐ the GitHub repo if you find it useful!&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
