4 instantiations of ResourceUrlsCallbackAnnotation
Aspire.Hosting (4)
ResourceBuilderExtensions.cs (4)
773
return builder.WithAnnotation(new
ResourceUrlsCallbackAnnotation
(callback));
796
return builder.WithAnnotation(new
ResourceUrlsCallbackAnnotation
(callback));
817
return builder.WithAnnotation(new
ResourceUrlsCallbackAnnotation
(c => c.Urls.Add(new() { Url = url, DisplayText = displayText })));
860
return builder.WithAnnotation(new
ResourceUrlsCallbackAnnotation
(async c =>
8 references to ResourceUrlsCallbackAnnotation
Aspire.Hosting (4)
ApplicationModel\ResourceEndpointsAllocatedEvent.cs (1)
12
/// Any resources that customize their URLs via a <see cref="
ResourceUrlsCallbackAnnotation
"/> will have their callbacks invoked during this event.
ApplicationModel\ResourceUrlsCallbackAnnotation.cs (1)
12
/// Initializes a new instance of the <see cref="
ResourceUrlsCallbackAnnotation
"/> class with the specified callback.
Orchestrator\ApplicationOrchestrator.cs (2)
201
if (resource.TryGetAnnotationsOfType<
ResourceUrlsCallbackAnnotation
>(out var callbacks))
207
foreach (
var
callback in callbacks)
Aspire.Hosting.Tests (4)
WithUrlsTests.cs (4)
26
var
urlsCallback = projectA.Resource.Annotations.OfType<
ResourceUrlsCallbackAnnotation
>()
39
Assert.Empty(projectA.Resource.Annotations.OfType<
ResourceUrlsCallbackAnnotation
>());
43
Assert.NotEmpty(projectA.Resource.Annotations.OfType<
ResourceUrlsCallbackAnnotation
>());