26 instantiations of EndpointAnnotation
Aspire.Hosting (6)
Dashboard\DashboardEventHandlers.cs (4)
403dashboardResource.Annotations.Add(new EndpointAnnotation(ProtocolType.Tcp, uriScheme: address.Scheme, port: address.Port, isProxied: true) 412dashboardResource.Annotations.Add(new EndpointAnnotation(ProtocolType.Tcp, name: OtlpGrpcEndpointName, uriScheme: address.Scheme, port: address.Port, isProxied: true, transport: "http2") 421dashboardResource.Annotations.Add(new EndpointAnnotation(ProtocolType.Tcp, name: OtlpHttpEndpointName, uriScheme: address.Scheme, port: address.Port, isProxied: true) 430dashboardResource.Annotations.Add(new EndpointAnnotation(ProtocolType.Tcp, name: McpEndpointName, uriScheme: address.Scheme, port: address.Port, isProxied: true)
ResourceBuilderExtensions.cs (2)
857endpoint = new EndpointAnnotation(ProtocolType.Tcp, name: endpointName, networkID: KnownNetworkIdentifiers.LocalhostNetwork); 894var annotation = new EndpointAnnotation(
Aspire.Hosting.Azure.Tests (1)
AzureStorageExtensionsTests.cs (1)
418=> new(storage.Resource, new EndpointAnnotation(ProtocolType.Tcp, name: name, targetPort: port));
Aspire.Hosting.DevTunnels (1)
DevTunnelResource.cs (1)
63TunnelEndpointAnnotation = new EndpointAnnotation(
Aspire.Hosting.Maui (1)
Otlp\OtlpLoopbackResource.cs (1)
29Annotations.Add(new EndpointAnnotation(
Aspire.Hosting.Tests (17)
EndpointReferenceTests.cs (17)
14var annotation = new EndpointAnnotation(ProtocolType.Tcp, uriScheme: "http", name: "http"); 32var annotation = new EndpointAnnotation(ProtocolType.Tcp, uriScheme: "http", name: "http"); 51var annotation = new EndpointAnnotation(ProtocolType.Tcp, uriScheme: "http", name: "http"); 66var annotation = new EndpointAnnotation(ProtocolType.Tcp, uriScheme: "http", name: "http"); 85var annotation = new EndpointAnnotation(ProtocolType.Tcp, uriScheme: "http", name: "http"); 104var annotation = new EndpointAnnotation(ProtocolType.Tcp, uriScheme: "https", name: "https"); 118var annotation = new EndpointAnnotation(ProtocolType.Tcp, uriScheme: "http", name: "http"); 132var annotation = new EndpointAnnotation(ProtocolType.Tcp, uriScheme: "http", name: "http", targetPort: 5000); 146var annotation = new EndpointAnnotation(ProtocolType.Tcp, uriScheme: "http", name: "http"); 165var annotation = new EndpointAnnotation(ProtocolType.Tcp, uriScheme: "http", name: "http"); 183var annotation = new EndpointAnnotation(ProtocolType.Tcp, uriScheme: "http", name: "http"); 214var annotation = new EndpointAnnotation(ProtocolType.Tcp, uriScheme: "http", name: "http"); 227var annotation = new EndpointAnnotation(ProtocolType.Tcp, uriScheme: "http", name: "http"); 240var annotation = new EndpointAnnotation(ProtocolType.Tcp, uriScheme: "http", name: "http"); 253var annotation = new EndpointAnnotation(ProtocolType.Tcp, uriScheme: "https", name: "https"); 266var annotation = new EndpointAnnotation(ProtocolType.Tcp, uriScheme: "http", name: "http", targetPort: 5000); 279var annotation = new EndpointAnnotation(ProtocolType.Tcp, uriScheme: "http", name: "http");
287 references to EndpointAnnotation
Aspire.Hosting (82)
ApplicationModel\AllocatedEndpoint.cs (4)
50EndpointAnnotation endpoint, 78EndpointAnnotation endpoint, 93public AllocatedEndpoint(EndpointAnnotation endpoint, string address, int port, string? targetPortExpression = null) 101public EndpointAnnotation Endpoint { get; }
ApplicationModel\EndpointAnnotation.cs (3)
28/// Initializes a new instance of <see cref="EndpointAnnotation"/>. 61/// Initializes a new instance of <see cref="EndpointAnnotation"/>. 93ModelName.ValidateName(nameof(EndpointAnnotation), name);
ApplicationModel\EndpointEnvironmentInjectionFilterAnnotation.cs (2)
9internal class EndpointEnvironmentInjectionFilterAnnotation(Func<EndpointAnnotation, bool> filter) : IResourceAnnotation 11public Func<EndpointAnnotation, bool> Filter { get; } = filter;
ApplicationModel\EndpointReference.cs (7)
16private EndpointAnnotation? _endpointAnnotation; 23public EndpointAnnotation EndpointAnnotation => GetEndpointAnnotation() ?? throw new InvalidOperationException(ErrorMessage ?? $"The endpoint `{EndpointName}` is not defined for the resource `{Resource.Name}`."); 149private EndpointAnnotation? GetEndpointAnnotation() 156_endpointAnnotation ??= Resource.Annotations.OfType<EndpointAnnotation>() 163var endpointAnnotation = GetEndpointAnnotation(); 197public EndpointReference(IResourceWithEndpoints owner, EndpointAnnotation endpoint, NetworkIdentifier? contextNetworkID) 213public EndpointReference(IResourceWithEndpoints owner, EndpointAnnotation endpoint): this(owner, endpoint, null)
ApplicationModel\ProjectResource.cs (3)
99internal Dictionary<EndpointAnnotation, string> KestrelEndpointAnnotationHosts { get; } = new(); 105internal EndpointAnnotation? DefaultHttpsEndpoint { get; set; } 109var endpoint = e.EndpointAnnotation;
ApplicationModel\ResolvedEndpoint.cs (1)
14public required EndpointAnnotation Endpoint { get; init; }
ApplicationModel\ResourceExtensions.cs (12)
643public static bool TryGetEndpoints(this IResource resource, [NotNullWhen(true)] out IEnumerable<EndpointAnnotation>? endpoints) 662/// <param name="resource">The <see cref="IResourceWithEndpoints"/> which contains <see cref="EndpointAnnotation"/> annotations.</param> 663/// <returns>An enumeration of <see cref="EndpointReference"/> based on the <see cref="EndpointAnnotation"/> annotations from the resources' <see cref="IResource.Annotations"/> collection.</returns> 666if (TryGetAnnotationsOfType<EndpointAnnotation>(resource, out var endpoints)) 677/// <param name="resource">The <see cref="IResourceWithEndpoints"/> which contains <see cref="EndpointAnnotation"/> annotations.</param> 679/// <returns>An enumeration of <see cref="EndpointReference"/> based on the <see cref="EndpointAnnotation"/> annotations from the resources' <see cref="IResource.Annotations"/> collection.</returns> 682if (TryGetAnnotationsOfType<EndpointAnnotation>(resource, out var endpoints)) 693/// <param name="resource">The <see cref="IResourceWithEndpoints"/> which contains <see cref="EndpointAnnotation"/> annotations.</param> 698var endpoint = resource.TryGetEndpoints(out var endpoints) ? 714/// <param name="resource">The <see cref="IResourceWithEndpoints"/> which contains <see cref="EndpointAnnotation"/> annotations.</param> 721var endpoint = resource.TryGetEndpoints(out var endpoints) ? 753foreach (var endpoint in endpoints)
Backchannel\AppHostRpcTarget.cs (1)
119endpoints = Enumerable.Empty<EndpointAnnotation>();
BuiltInDistributedApplicationEventSubscriptionHandlers.cs (2)
57var httpEndpoints = resource.Annotations.OfType<EndpointAnnotation>().Where(sb => sb.UriScheme == "http" || sb.UriScheme == "https"); 58foreach (var httpEndpoint in httpEndpoints)
Dashboard\DashboardEventHandlers.cs (4)
364var endpointAnnotations = dashboardResource.Annotations.OfType<EndpointAnnotation>().ToList(); 365foreach (var endpointAnnotation in endpointAnnotations) 690.OfType<EndpointAnnotation>() 694foreach (var endpoint in allResourceEndpoints)
Dcp\AppResource.cs (2)
67public EndpointAnnotation EndpointAnnotation { get; } 78public ServiceWithModelResource(IResource modelResource, Service service, EndpointAnnotation sba) : base(modelResource, service)
Dcp\DcpExecutor.cs (13)
1004if (!TryGetEndpoint(appResource.ModelResource, ts.EndpointName, out var endpoint)) 1076.Select(r => (ModelResource: r, Endpoints: r.Annotations.OfType<EndpointAnnotation>().ToArray())) 1087foreach (var endpoint in endpoints) 1134Endpoints: r.Annotations.OfType<EndpointAnnotation>() 1165foreach (var endpoint in re.Endpoints) 1190var hasManyEndpoints = re.Resource.Annotations.OfType<EndpointAnnotation>().Count() > 1; 2227var ea = sp.EndpointAnnotation; 2233throw new InvalidOperationException($"The endpoint '{ea.Name}' for container resource '{modelResourceName}' must specify the {nameof(EndpointAnnotation.TargetPort)} value"); 2245throw new InvalidOperationException($"The endpoint '{ea.Name}' for resource '{modelResourceName}' is not using a proxy, and it has a value of {nameof(EndpointAnnotation.Port)} property that is different from the value of {nameof(EndpointAnnotation.TargetPort)} property. For proxy-less endpoints they must match."); 2747var ea = sp.EndpointAnnotation; 2803private static bool TryGetEndpoint(IResource resource, string? endpointName, [NotNullWhen(true)] out EndpointAnnotation? endpoint) 2806if (resource.TryGetAnnotationsOfType<EndpointAnnotation>(out var endpoints))
Dcp\DcpNameGenerator.cs (1)
80public string GetServiceName(IResource resource, EndpointAnnotation endpoint, bool hasMultipleEndpoints, HashSet<string> allServiceNames)
Devcontainers\DevcontainerPortForwardingLifecycleHook.cs (2)
33foreach (var endpoint in @event.Resource.Annotations.OfType<EndpointAnnotation>())
Orchestrator\ApplicationOrchestrator.cs (2)
215EndpointAnnotation? primaryLaunchProfileEndpoint = null; 220foreach (var endpoint in endpoints)
ProjectResourceBuilderExtensions.cs (10)
53/// to build the equivalent <see cref="EndpointAnnotation"/>. 494var adjustTransport = (EndpointAnnotation e, string? bindingLevelProtocols = null) => 603foreach (var endpoint in endpoints) 663EndpointAnnotation GetOrCreateEndpointForScheme(string scheme) 665EndpointAnnotation? GetEndpoint(string scheme) => 666projectResource.Annotations.OfType<EndpointAnnotation>().FirstOrDefault(sb => sb.UriScheme == scheme || string.Equals(sb.Name, scheme, StringComparisons.EndpointAnnotationName)); 668var endpoint = GetEndpoint(scheme); 692var httpEndpoint = GetOrCreateEndpointForScheme("http"); 693var httpsEndpoint = GetOrCreateEndpointForScheme("https"); 780this IResourceBuilder<ProjectResource> builder, Func<EndpointAnnotation, bool> filter)
Publishing\ManifestPublishingContext.cs (3)
481/// <see cref="EndpointAnnotation"/> entries in the <see cref="IResource.Annotations"/> 484/// <param name="resource">The <see cref="IResource"/> that contains <see cref="EndpointAnnotation"/> annotations.</param> 494var endpoint = resolved.Endpoint;
ResourceBuilderExtensions.cs (10)
814/// The <see cref="WithEndpoint{T}(IResourceBuilder{T}, string, Action{EndpointAnnotation}, bool)"/> method allows 816/// other values to compatible/consistent values. For example setting the <see cref="EndpointAnnotation.Protocol"/> property 817/// of the endpoint annotation in the callback will not automatically change the <see cref="EndpointAnnotation.UriScheme"/>. 835public static IResourceBuilder<T> WithEndpoint<T>(this IResourceBuilder<T> builder, [EndpointName] string endpointName, Action<EndpointAnnotation> callback, bool createIfNotExists = true) where T : IResourceWithEndpoints 841var endpoint = builder.Resource.Annotations 842.OfType<EndpointAnnotation>() 894var annotation = new EndpointAnnotation( 904if (builder.Resource.Annotations.OfType<EndpointAnnotation>().Any(sb => string.Equals(sb.Name, annotation.Name, StringComparisons.EndpointAnnotationName))) 995if (!builder.Resource.TryGetAnnotationsOfType<EndpointAnnotation>(out var endpoints)) 1000foreach (var endpoint in endpoints)
Aspire.Hosting.Azure.AppContainers (2)
ContainerAppContext.cs (2)
228var endpoint = resolved.Endpoint; 263var endpoint = resolved.Endpoint;
Aspire.Hosting.Azure.AppService (1)
AzureAppServiceWebsiteContext.cs (1)
121var endpoint = resolved.Endpoint;
Aspire.Hosting.Azure.Kusto.Tests (4)
AddAzureKustoTests.cs (4)
67var endpointAnnotations = resourceBuilder.Resource.Annotations.OfType<EndpointAnnotation>().ToList(); 68var httpEndpoint = endpointAnnotations.SingleOrDefault(e => e.Name == "http"); 358var endpointAnnotations = resourceBuilder.Resource.Annotations.OfType<EndpointAnnotation>().ToList(); 359var httpEndpoint = endpointAnnotations.SingleOrDefault(e => e.Name == "http");
Aspire.Hosting.Azure.Tests (27)
AzureCosmosDBExtensionsTests.cs (2)
32var endpointAnnotation = cosmos.Resource.Annotations.OfType<EndpointAnnotation>().FirstOrDefault();
AzureEventHubsExtensionsTests.cs (1)
242var endpoints = eventHubs.Resource.Annotations.OfType<EndpointAnnotation>().ToList();
AzureFunctionsTests.cs (14)
50Assert.True(functionsResource.TryGetLastAnnotation<EndpointAnnotation>(out var endpointAnnotation)); 78Assert.True(functionsResource.TryGetLastAnnotation<EndpointAnnotation>(out var endpointAnnotation)); 101Assert.True(functionsResource.TryGetLastAnnotation<EndpointAnnotation>(out var endpointAnnotation)); 115Assert.True(functionsResource.TryGetLastAnnotation<EndpointAnnotation>(out var endpointAnnotation)); 129Assert.True(functionsResource.TryGetLastAnnotation<EndpointAnnotation>(out var endpointAnnotation)); 213Assert.True(functionsResource.TryGetLastAnnotation<EndpointAnnotation>(out var endpointAnnotation)); 257Assert.True(functionsResource.TryGetLastAnnotation<EndpointAnnotation>(out var endpointAnnotation));
AzureManagedRedisExtensionsTests.cs (2)
87var endpoint = Assert.Single(redisResource.Annotations.OfType<EndpointAnnotation>());
AzurePostgresExtensionsTests.cs (2)
180var endpoint = Assert.Single(innerPostgres.Resource.Annotations.OfType<EndpointAnnotation>());
AzureRedisExtensionsTests.cs (2)
131var endpoint = Assert.Single(redisResource.Annotations.OfType<EndpointAnnotation>());
AzureServiceBusExtensionsTests.cs (1)
164serviceBus.Resource.Annotations.OfType<EndpointAnnotation>(),
AzureSqlExtensionsTests.cs (2)
149var endpoint = Assert.Single(innerSql.Resource.Annotations.OfType<EndpointAnnotation>());
AzureStorageExtensionsTests.cs (1)
132storage.Resource.Annotations.OfType<EndpointAnnotation>(),
Aspire.Hosting.DevTunnels (2)
DevTunnelResource.cs (1)
82internal EndpointAnnotation TunnelEndpointAnnotation { get; }
DevTunnelResourceBuilderExtensions.cs (1)
468if (targetEndpoint.Resource.Annotations.OfType<EndpointAnnotation>()
Aspire.Hosting.Docker (1)
DockerComposeEnvironmentContext.cs (1)
45var endpoint = resolved.Endpoint;
Aspire.Hosting.Garnet.Tests (4)
AddGarnetTests.cs (4)
27var endpoint = Assert.Single(containerResource.Annotations.OfType<EndpointAnnotation>()); 55var endpoint = Assert.Single(containerResource.Annotations.OfType<EndpointAnnotation>());
Aspire.Hosting.JavaScript.Tests (2)
ResourceCreationTests.cs (2)
62Assert.True(resource.TryGetAnnotationsOfType<EndpointAnnotation>(out var endpoints)); 82Assert.True(resource.TryGetAnnotationsOfType<EndpointAnnotation>(out var endpoints));
Aspire.Hosting.Kafka.Tests (5)
AddKafkaTests.cs (5)
29var endpoints = containerResource.Annotations.OfType<EndpointAnnotation>(); 32var primaryEndpoint = Assert.Single(endpoints, e => e.Name == "tcp"); 41var internalEndpoint = Assert.Single(endpoints, e => e.Name == "internal"); 177var kafkaUiEndpoint = kafkaUiResource.Annotations.OfType<EndpointAnnotation>().Single();
Aspire.Hosting.Keycloak.Tests (4)
KeycloakResourceBuilderTests.cs (4)
30var endpoint = Assert.Single(containerResource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == defaultEndpointName); 41var healthEndpoint = Assert.Single(containerResource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == managementEndpointName);
Aspire.Hosting.Kubernetes (2)
KubernetesResource.cs (2)
169var endpoint = resolved.Endpoint; 183private void GenerateDefaultProjectEndpointMapping(EndpointAnnotation endpoint)
Aspire.Hosting.Maui (2)
MauiOtlpExtensions.cs (2)
120var endpoint = stubResource.Annotations.OfType<EndpointAnnotation>().FirstOrDefault();
Aspire.Hosting.Maui.Tests (2)
MauiPlatformExtensionsTests.cs (2)
635var endpointAnnotations = appBuilder.Resources.SelectMany(x => x.Annotations.OfType<EndpointAnnotation>()); 637foreach (var endpointAnnotation in endpointAnnotations)
Aspire.Hosting.Milvus.Tests (7)
AddMilvusTests.cs (7)
35var endpoint = containerResource.Annotations.OfType<EndpointAnnotation>() 65var endpoint = containerResource.Annotations.OfType<EndpointAnnotation>() 189Assert.Single(milvusResource.Annotations.OfType<EndpointAnnotation>()); 191var grpcEndpoint = milvusResource.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == "grpc");
Aspire.Hosting.MongoDB.Tests (6)
AddMongoDBTests.cs (6)
28var endpoint = Assert.Single(containerResource.Annotations.OfType<EndpointAnnotation>()); 56var endpoint = Assert.Single(containerResource.Annotations.OfType<EndpointAnnotation>()); 138var endpoint = Assert.Single(resource.Annotations.OfType<EndpointAnnotation>());
Aspire.Hosting.MySql.Tests (4)
AddMySqlTests.cs (4)
54var endpoint = Assert.Single(containerResource.Annotations.OfType<EndpointAnnotation>()); 93var endpoint = Assert.Single(containerResource.Annotations.OfType<EndpointAnnotation>());
Aspire.Hosting.Nats.Tests (4)
AddNatsTests.cs (4)
104var endpoint = Assert.Single(containerResource.Annotations.OfType<EndpointAnnotation>()); 150var endpoint = Assert.Single(containerResource.Annotations.OfType<EndpointAnnotation>());
Aspire.Hosting.Oracle.Tests (6)
AddOracleTests.cs (6)
52var endpoint = Assert.Single(containerResource.Annotations.OfType<EndpointAnnotation>()); 91var endpoint = Assert.Single(containerResource.Annotations.OfType<EndpointAnnotation>()); 173var endpoint = Assert.Single(containerResource.Annotations.OfType<EndpointAnnotation>());
Aspire.Hosting.PostgreSQL.Tests (10)
AddPostgresTests.cs (10)
62var endpoint = Assert.Single(containerResource.Annotations.OfType<EndpointAnnotation>()); 116var endpoint = Assert.Single(containerResource.Annotations.OfType<EndpointAnnotation>()); 209var endpoint = Assert.Single(containerResource.Annotations.OfType<EndpointAnnotation>()); 425var endpoint = Assert.Single(resource.Annotations.OfType<EndpointAnnotation>()); 654var endpoint = Assert.Single(resource.Annotations.OfType<EndpointAnnotation>());
Aspire.Hosting.Qdrant.Tests (11)
AddQdrantTests.cs (11)
55var endpoint = containerResource.Annotations.OfType<EndpointAnnotation>() 94var endpoint = containerResource.Annotations.OfType<EndpointAnnotation>() 127var endpoint = containerResource.Annotations.OfType<EndpointAnnotation>() 288Assert.Equal(2, qdrantResource.Annotations.OfType<EndpointAnnotation>().Count()); 290var grpcEndpoint = qdrantResource.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == "grpc"); 298var httpEndpoint = qdrantResource.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == "http");
Aspire.Hosting.RabbitMQ.Tests (4)
AddRabbitMQTests.cs (4)
55var primaryEndpoint = Assert.Single(containerResource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "tcp"); 66var mangementEndpoint = Assert.Single(containerResource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "management");
Aspire.Hosting.Redis (1)
RedisBuilderExtensions.cs (1)
266var secondaryEndpoint = endpoints.FirstOrDefault(ep => StringComparer.OrdinalIgnoreCase.Equals(ep.Name, RedisResource.SecondaryEndpointName));
Aspire.Hosting.Redis.Tests (10)
AddRedisTests.cs (10)
40var endpoint = Assert.Single(containerResource.Annotations.OfType<EndpointAnnotation>()); 68var endpoint = Assert.Single(containerResource.Annotations.OfType<EndpointAnnotation>()); 419var endpoint = Assert.Single(resource.Annotations.OfType<EndpointAnnotation>()); 433var endpoint = Assert.Single(resource.Annotations.OfType<EndpointAnnotation>()); 445var endpoint = Assert.Single(resource.Annotations.OfType<EndpointAnnotation>());
Aspire.Hosting.Seq.Tests (8)
AddSeqTests.cs (8)
26var endpoint = Assert.Single(containerResource.Annotations.OfType<EndpointAnnotation>()); 54var endpoint = Assert.Single(containerResource.Annotations.OfType<EndpointAnnotation>()); 180var endpoint = Assert.Single(containerResource.Annotations.OfType<EndpointAnnotation>()); 213var endpoint = Assert.Single(containerResource.Annotations.OfType<EndpointAnnotation>());
Aspire.Hosting.SqlServer.Tests (4)
AddSqlServerTests.cs (4)
48var endpoint = Assert.Single(containerResource.Annotations.OfType<EndpointAnnotation>()); 260var endpoint = Assert.Single(resource.Annotations.OfType<EndpointAnnotation>());
Aspire.Hosting.Tests (65)
ApplicationModel\Docker\WithDockerfileBuilderTests.cs (2)
472var endpointAnnotation = container.Resource.Annotations.OfType<EndpointAnnotation>().FirstOrDefault();
AsHttp2ServiceTests.cs (6)
19r => r.Annotations.OfType<EndpointAnnotation>() 36var httpEndpoints = testProgram.ServiceABuilder.Resource.Annotations.OfType<EndpointAnnotation>().Where(sb => sb.UriScheme == "http" || sb.UriScheme == "https"); 51var endpoints = testProgram.ServiceABuilder.Resource.Annotations.OfType<EndpointAnnotation>(); 52var tcpBinding = endpoints.Single(sb => sb.UriScheme == "tcp"); 55var httpsBinding = endpoints.Single(sb => sb.UriScheme == "https"); 58var httpBinding = endpoints.Single(sb => sb.UriScheme == "http");
Dashboard\DashboardResourceTests.cs (4)
406var endpointAnnotation = Assert.Single(container.Annotations.OfType<EndpointAnnotation>()); 624foreach (var endpoint in dashboard.Annotations.OfType<EndpointAnnotation>())
EndpointReferenceTests.cs (17)
14var annotation = new EndpointAnnotation(ProtocolType.Tcp, uriScheme: "http", name: "http"); 32var annotation = new EndpointAnnotation(ProtocolType.Tcp, uriScheme: "http", name: "http"); 51var annotation = new EndpointAnnotation(ProtocolType.Tcp, uriScheme: "http", name: "http"); 66var annotation = new EndpointAnnotation(ProtocolType.Tcp, uriScheme: "http", name: "http"); 85var annotation = new EndpointAnnotation(ProtocolType.Tcp, uriScheme: "http", name: "http"); 104var annotation = new EndpointAnnotation(ProtocolType.Tcp, uriScheme: "https", name: "https"); 118var annotation = new EndpointAnnotation(ProtocolType.Tcp, uriScheme: "http", name: "http"); 132var annotation = new EndpointAnnotation(ProtocolType.Tcp, uriScheme: "http", name: "http", targetPort: 5000); 146var annotation = new EndpointAnnotation(ProtocolType.Tcp, uriScheme: "http", name: "http"); 165var annotation = new EndpointAnnotation(ProtocolType.Tcp, uriScheme: "http", name: "http"); 183var annotation = new EndpointAnnotation(ProtocolType.Tcp, uriScheme: "http", name: "http"); 214var annotation = new EndpointAnnotation(ProtocolType.Tcp, uriScheme: "http", name: "http"); 227var annotation = new EndpointAnnotation(ProtocolType.Tcp, uriScheme: "http", name: "http"); 240var annotation = new EndpointAnnotation(ProtocolType.Tcp, uriScheme: "http", name: "http"); 253var annotation = new EndpointAnnotation(ProtocolType.Tcp, uriScheme: "https", name: "https"); 266var annotation = new EndpointAnnotation(ProtocolType.Tcp, uriScheme: "http", name: "http", targetPort: 5000); 279var annotation = new EndpointAnnotation(ProtocolType.Tcp, uriScheme: "http", name: "http");
ExpressionResolverTests.cs (2)
266var endpointAnnotation = dependency.Resource.Annotations.OfType<EndpointAnnotation>().Single();
KestrelConfigTests.cs (6)
24resource.Annotations.OfType<EndpointAnnotation>(), 61resource.Annotations.OfType<EndpointAnnotation>(), 93resource.Annotations.OfType<EndpointAnnotation>(), 110resource.Annotations.OfType<EndpointAnnotation>(), 454foreach (var endpoint in resource.Annotations.OfType<EndpointAnnotation>())
ProjectResourceTests.cs (1)
258resource.Annotations.OfType<EndpointAnnotation>(),
PublishAsDockerfileTests.cs (6)
281Assert.Empty(container.Annotations.OfType<EndpointAnnotation>()); 298var endpoint = Assert.Single(container.Annotations.OfType<EndpointAnnotation>()); 322var endpoint = Assert.Single(container.Annotations.OfType<EndpointAnnotation>()); 342var endpoints = container.Annotations.OfType<EndpointAnnotation>().OrderBy(e => e.Name).ToList();
SlimTestProgramTests.cs (4)
58var endpoint = projectBuilders.Resource.Annotations.OfType<EndpointAnnotation>().Single(); 77var endpoint = projectBuilders.Resource.Annotations.OfType<EndpointAnnotation>().Single();
WithEndpointTests.cs (16)
28var endpoint = projectA.Resource.Annotations.OfType<EndpointAnnotation>() 45var endpoint = projectA.Resource.Annotations.OfType<EndpointAnnotation>() 80var endpoint = projectA.Resource.Annotations.OfType<EndpointAnnotation>() 118Assert.False(projectA.Resource.TryGetAnnotationsOfType<EndpointAnnotation>(out var annotations)); 135Assert.True(projectA.Resource.TryGetAnnotationsOfType<EndpointAnnotation>(out _)); 152Assert.True(projectA.Resource.TryGetAnnotationsOfType<EndpointAnnotation>(out _)); 217var endpoints = resource.Annotations.OfType<EndpointAnnotation>().ToArray(); 585var endpoint = projectA.Resource.Annotations.OfType<EndpointAnnotation>() 621EndpointAnnotation endpoint = Assert.Single(projectA.Resource.Annotations.OfType<EndpointAnnotation>()); 655EndpointAnnotation endpoint = Assert.Single(projectA.Resource.Annotations.OfType<EndpointAnnotation>());
WithUrlsTests.cs (1)
558foreach (var endpoint in endpoints)
Aspire.Hosting.Valkey.Tests (4)
AddValkeyTests.cs (4)
27var endpoint = Assert.Single(containerResource.Annotations.OfType<EndpointAnnotation>()); 55var endpoint = Assert.Single(containerResource.Annotations.OfType<EndpointAnnotation>());
Aspire.Hosting.Yarp.Tests (1)
AddYarpTests.cs (1)
26Assert.Collection(resource.Annotations.OfType<EndpointAnnotation>(),
TestProject.AppHost (2)
TestProgram.cs (2)
181foreach (var endpoint in project.Annotations.OfType<EndpointAnnotation>())