Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
"NameHash": "BBF022C092922A8B3A63455FC7583EAF35840E66F01B73AF997EACDCA8ABCEA4",
"Throughput": 47,
"EndpointIndicators": [],
"UserIndicator": "PlannedToDecommission",
"UserIndicator": "NServiceBusEndpoint",
"Scope": "",
"ScopeHash": "",
"DailyThroughputFromBroker": [
Expand Down
11 changes: 10 additions & 1 deletion src/Particular.LicensingComponent/ThroughputCollector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,16 @@ string CleanseSanitizedName(string endpointName)
{
return throughputQuery == null ? endpointName : throughputQuery.SanitizedEndpointNameCleanser(endpointName);
}
static string? UserIndicator(IGrouping<string, Endpoint> endpoint) => endpoint.FirstOrDefault(s => !string.IsNullOrEmpty(s.UserIndicator))?.UserIndicator;
static string? UserIndicator(IGrouping<string, Endpoint> endpoint) => endpoint.FirstOrDefault(s => !string.IsNullOrEmpty(s.UserIndicator))?.UserIndicator switch
{
/*
* HINT: PlannedToDecommission is a legacy value.
* The best default for queues that were marked as PlannedToDecommission is to treat them as NServiceBusEndpoint, since the user has indicated that they are still using it.
* If the user wants to indicate that they are no longer using it, then they should mark it as NServiceBusEndpointNoLongerInUse.
*/
var userIndicator when userIndicator == Contracts.UserIndicator.PlannedToDecommission.ToString() => Contracts.UserIndicator.NServiceBusEndpoint.ToString(),
var userIndicator => userIndicator
};

static string? EndpointScope(IGrouping<string, Endpoint> endpoint) => endpoint.FirstOrDefault(s => !string.IsNullOrEmpty(s.Scope))?.Scope;

Expand Down
Loading