Soenneker.Enums.ServiceBusQueue 4.0.721

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

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Soenneker.Enums.ServiceBusQueue

A SmartEnum base for defining an application's Azure Service Bus queue names in one strongly typed place.

Install

dotnet add package Soenneker.Enums.ServiceBusQueue

Define queues

using Soenneker.Enums.ServiceBusQueue;

public sealed class AppQueue : ServiceBusQueue<AppQueue>
{
    public static readonly AppQueue Emails = new("emails", 1);
    public static readonly AppQueue Notifications = new("notifications", 2);

    private AppQueue(string name, int value) : base(name, value)
    {
    }
}

The self-referential generic argument is required: AppQueue derives from ServiceBusQueue<AppQueue>. This allows the underlying SmartEnum implementation to discover the concrete type's static values.

Usage

string queueName = AppQueue.Emails; // implicit conversion returns "emails"

AppQueue parsed = AppQueue.FromName("notifications");

foreach (AppQueue queue in AppQueue.List)
    Console.WriteLine($"{queue.Value}: {queue.Name}");

Use unique integer values. Lowercase plural names such as emails and notifications are the package convention because Name is intended to be passed as the Service Bus entity name; the base class does not enforce the convention or validate Azure naming rules.

FromName and FromValue throw when no match exists. Use TryFromName or TryFromValue when parsing configuration or external input. This package defines identifiers only; it does not create queues, send messages, receive messages, or verify that a configured queue exists.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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
4.0.721 86 8/30/2026
4.0.720 81 8/30/2026
4.0.719 163 8/30/2026
4.0.718 77 8/29/2026
4.0.716 113 7/28/2026
4.0.715 111 7/28/2026
4.0.714 107 7/16/2026
4.0.712 129 6/19/2026
4.0.711 1,261 6/18/2026
4.0.710 121 6/5/2026
4.0.709 111 6/5/2026
4.0.708 131 4/23/2026
4.0.707 138 4/22/2026
4.0.706 149 3/12/2026
4.0.705 132 3/12/2026
4.0.704 125 3/12/2026
4.0.703 140 3/12/2026
4.0.702 132 3/12/2026
4.0.701 137 3/11/2026
4.0.700 122 3/10/2026
Loading failed

Update dependency Soenneker.SmartEnum.Named to 4.0.38 (#1334)