Skip to content
Open
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
7 changes: 6 additions & 1 deletion src/Particular.LicensingComponent/ThroughputCollector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,12 @@ 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. Only endpoints would have been marked with this user indicator.
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