28 references to KnownResourceNames
Aspire.Hosting (14)
Backchannel\AuxiliaryBackchannelRpcTarget.cs (4)
381
if (appModel.Resources.SingleOrDefault(r => string.Equals(r.Name,
KnownResourceNames
.AspireDashboard, StringComparisons.ResourceName)) is not IResourceWithEndpoints dashboardResource)
449
if (string.Equals(resource.Name,
KnownResourceNames
.AspireDashboard, StringComparisons.ResourceName))
489
if (string.Equals(resourceEvent.Resource.Name,
KnownResourceNames
.AspireDashboard, StringComparisons.ResourceName))
678
if (string.Equals(resource.Name,
KnownResourceNames
.AspireDashboard, StringComparisons.ResourceName))
Backchannel\DashboardUrlsHelper.cs (2)
40
KnownResourceNames
.AspireDashboard,
60
r => string.Equals(r.Name,
KnownResourceNames
.AspireDashboard, StringComparisons.ResourceName)) as IResourceWithEndpoints;
BuiltInDistributedApplicationEventSubscriptionHandlers.cs (1)
48
if (beforeStartEvent.Model.Resources.SingleOrDefault(r => string.Equals(r.Name,
KnownResourceNames
.AspireDashboard, StringComparisons.ResourceName)) is { } dashboardResource)
Dashboard\DashboardEventHandlers.cs (5)
68
if (@event.Model.Resources.SingleOrDefault(r => string.Equals(r.Name,
KnownResourceNames
.AspireDashboard, StringComparisons.ResourceName)) is { } dashboardResource)
295
dashboardResource = new ExecutableResource(
KnownResourceNames
.AspireDashboard, fullyQualifiedDashboardPath, dashboardWorkingDirectory ?? "");
329
dashboardResource = new ExecutableResource(
KnownResourceNames
.AspireDashboard, "dotnet", dashboardWorkingDirectory ?? "");
753
.Where(r => !string.Equals(r.Name,
KnownResourceNames
.AspireDashboard, StringComparisons.ResourceName))
801
if (string.Equals(notification.Resource.Name,
KnownResourceNames
.AspireDashboard, StringComparisons.ResourceName) && !dashboardResourceTasks.ContainsKey(notification.ResourceId))
Dcp\DcpExecutor.cs (1)
1261
var maybeDashboard = _model.Resources.Where(r => StringComparers.ResourceName.Equals(r.Name,
KnownResourceNames
.AspireDashboard))
Dcp\OtlpEndpointReferenceGatherer.cs (1)
43
var dashboardResource = model.Resources.SingleOrDefault(r => StringComparers.ResourceName.Equals(r.Name,
KnownResourceNames
.AspireDashboard)) as IResourceWithEndpoints;
Aspire.Hosting.Tests (14)
Backchannel\AuxiliaryBackchannelRpcTargetTests.cs (5)
37
builder.AddResource(new CustomResource(
KnownResourceNames
.AspireDashboard));
65
Assert.DoesNotContain(result, r => r.Name ==
KnownResourceNames
.AspireDashboard);
216
builder.AddResource(new CustomResource(
KnownResourceNames
.AspireDashboard));
279
builder.AddResource(new CustomResource(
KnownResourceNames
.AspireDashboard));
314
Assert.DoesNotContain(logs, l => l.ResourceName ==
KnownResourceNames
.AspireDashboard);
Dashboard\DashboardLifecycleHookTests.cs (5)
56
if (item.Name.StartsWith(
KnownResourceNames
.AspireDashboard) && item.AnySubscribers)
93
var dashboardResource = model.Resources.Single(r => string.Equals(r.Name,
KnownResourceNames
.AspireDashboard, StringComparisons.ResourceName));
141
var dashboardResource = (IResourceWithEndpoints)model.Resources.Single(r => string.Equals(r.Name,
KnownResourceNames
.AspireDashboard, StringComparisons.ResourceName));
241
var dashboardResource = model.Resources.Single(r => string.Equals(r.Name,
KnownResourceNames
.AspireDashboard, StringComparisons.ResourceName));
322
Assert.Equal(
KnownResourceNames
.AspireDashboard, dashboardResource.Name);
Dashboard\DashboardResourceTests.cs (3)
103
var container = builder.AddContainer(
KnownResourceNames
.AspireDashboard, "my-image");
220
var container = builder.AddContainer(
KnownResourceNames
.AspireDashboard, "my-image");
641
builder.AddProject<DashboardProject>(
KnownResourceNames
.AspireDashboard);
DistributedApplicationTests.cs (1)
1209
var aspireDashboard = model.Resources.Single(r => r.Name ==
KnownResourceNames
.AspireDashboard);