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
<PackageReference Include="Soenneker.Enums.ServiceBusQueue" Version="4.0.721" />
<PackageVersion Include="Soenneker.Enums.ServiceBusQueue" Version="4.0.721" />
<PackageReference Include="Soenneker.Enums.ServiceBusQueue" />
paket add Soenneker.Enums.ServiceBusQueue --version 4.0.721
#r "nuget: Soenneker.Enums.ServiceBusQueue, 4.0.721"
#:package Soenneker.Enums.ServiceBusQueue@4.0.721
#addin nuget:?package=Soenneker.Enums.ServiceBusQueue&version=4.0.721
#tool nuget:?package=Soenneker.Enums.ServiceBusQueue&version=4.0.721
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 | Versions 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. |
-
net10.0
- Soenneker.SmartEnum.Named (>= 4.0.38)
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 |
Update dependency Soenneker.SmartEnum.Named to 4.0.38 (#1334)