26 instantiations of EndpointAnnotation
Aspire.Hosting (6)
Dashboard\DashboardEventHandlers.cs (4)
400dashboardResource.Annotations.Add(new EndpointAnnotation(ProtocolType.Tcp, uriScheme: address.Scheme, port: address.Port, isProxied: true) 409dashboardResource.Annotations.Add(new EndpointAnnotation(ProtocolType.Tcp, name: OtlpGrpcEndpointName, uriScheme: address.Scheme, port: address.Port, isProxied: true, transport: "http2") 418dashboardResource.Annotations.Add(new EndpointAnnotation(ProtocolType.Tcp, name: OtlpHttpEndpointName, uriScheme: address.Scheme, port: address.Port, isProxied: true) 427dashboardResource.Annotations.Add(new EndpointAnnotation(ProtocolType.Tcp, name: McpEndpointName, uriScheme: address.Scheme, port: address.Port, isProxied: true)
ResourceBuilderExtensions.cs (2)
799endpoint = new EndpointAnnotation(ProtocolType.Tcp, name: endpointName, networkID: KnownNetworkIdentifiers.LocalhostNetwork); 836var 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");
285 references to EndpointAnnotation
Aspire.Hosting (80)
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)
65internal Dictionary<EndpointAnnotation, string> KestrelEndpointAnnotationHosts { get; } = new(); 71internal EndpointAnnotation? DefaultHttpsEndpoint { get; set; } 75var endpoint = e.EndpointAnnotation;
ApplicationModel\ResourceExtensions.cs (11)
652public static bool TryGetEndpoints(this IResource resource, [NotNullWhen(true)] out IEnumerable<EndpointAnnotation>? endpoints) 671/// <param name="resource">The <see cref="IResourceWithEndpoints"/> which contains <see cref="EndpointAnnotation"/> annotations.</param> 672/// <returns>An enumeration of <see cref="EndpointReference"/> based on the <see cref="EndpointAnnotation"/> annotations from the resources' <see cref="IResource.Annotations"/> collection.</returns> 675if (TryGetAnnotationsOfType<EndpointAnnotation>(resource, out var endpoints)) 686/// <param name="resource">The <see cref="IResourceWithEndpoints"/> which contains <see cref="EndpointAnnotation"/> annotations.</param> 688/// <returns>An enumeration of <see cref="EndpointReference"/> based on the <see cref="EndpointAnnotation"/> annotations from the resources' <see cref="IResource.Annotations"/> collection.</returns> 691if (TryGetAnnotationsOfType<EndpointAnnotation>(resource, out var endpoints)) 702/// <param name="resource">The <see cref="IResourceWithEndpoints"/> which contains <see cref="EndpointAnnotation"/> annotations.</param> 707var endpoint = resource.TryGetEndpoints(out var endpoints) ? 723/// <param name="resource">The <see cref="IResourceWithEndpoints"/> which contains <see cref="EndpointAnnotation"/> annotations.</param> 730var endpoint = resource.TryGetEndpoints(out var endpoints) ?
Backchannel\AppHostRpcTarget.cs (1)
84endpoints = 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)
361var endpointAnnotations = dashboardResource.Annotations.OfType<EndpointAnnotation>().ToList(); 362foreach (var endpointAnnotation in endpointAnnotations) 684.OfType<EndpointAnnotation>() 688foreach (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)
966if (!TryGetEndpoint(appResource.ModelResource, ts.EndpointName, out var endpoint)) 1038.Select(r => (ModelResource: r, Endpoints: r.Annotations.OfType<EndpointAnnotation>().ToArray())) 1049foreach (var endpoint in endpoints) 1096Endpoints: r.Annotations.OfType<EndpointAnnotation>() 1127foreach (var endpoint in re.Endpoints) 1152var hasManyEndpoints = re.Resource.Annotations.OfType<EndpointAnnotation>().Count() > 1; 1928var ea = sp.EndpointAnnotation; 1934throw new InvalidOperationException($"The endpoint '{ea.Name}' for container resource '{modelResourceName}' must specify the {nameof(EndpointAnnotation.TargetPort)} value"); 1946throw 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."); 2865var ea = sp.EndpointAnnotation; 2921private static bool TryGetEndpoint(IResource resource, string? endpointName, [NotNullWhen(true)] out EndpointAnnotation? endpoint) 2924if (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"/>. 498var adjustTransport = (EndpointAnnotation e, string? bindingLevelProtocols = null) => 607foreach (var endpoint in endpoints) 667EndpointAnnotation GetOrCreateEndpointForScheme(string scheme) 669EndpointAnnotation? GetEndpoint(string scheme) => 670projectResource.Annotations.OfType<EndpointAnnotation>().FirstOrDefault(sb => sb.UriScheme == scheme || string.Equals(sb.Name, scheme, StringComparisons.EndpointAnnotationName)); 672var endpoint = GetEndpoint(scheme); 696var httpEndpoint = GetOrCreateEndpointForScheme("http"); 697var httpsEndpoint = GetOrCreateEndpointForScheme("https"); 784this 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> 500foreach (var endpoint in endpoints)
ResourceBuilderExtensions.cs (10)
756/// The <see cref="WithEndpoint{T}(IResourceBuilder{T}, string, Action{EndpointAnnotation}, bool)"/> method allows 758/// other values to compatible/consistent values. For example setting the <see cref="EndpointAnnotation.Protocol"/> property 759/// of the endpoint annotation in the callback will not automatically change the <see cref="EndpointAnnotation.UriScheme"/>. 777public static IResourceBuilder<T> WithEndpoint<T>(this IResourceBuilder<T> builder, [EndpointName] string endpointName, Action<EndpointAnnotation> callback, bool createIfNotExists = true) where T : IResourceWithEndpoints 783var endpoint = builder.Resource.Annotations 784.OfType<EndpointAnnotation>() 836var annotation = new EndpointAnnotation( 846if (builder.Resource.Annotations.OfType<EndpointAnnotation>().Any(sb => string.Equals(sb.Name, annotation.Name, StringComparisons.EndpointAnnotationName))) 937if (!builder.Resource.TryGetAnnotationsOfType<EndpointAnnotation>(out var endpoints)) 942foreach (var endpoint in endpoints)
Aspire.Hosting.Azure.AppContainers (3)
ContainerAppContext.cs (3)
169foreach (var endpoint in endpoints) 297foreach (var e in httpIngress.Endpoints) 330foreach (var e in g.Endpoints)
Aspire.Hosting.Azure.AppService (1)
AzureAppServiceWebsiteContext.cs (1)
110foreach (var endpoint in endpoints)
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));
AzurePostgresExtensionsTests.cs (2)
180var endpoint = Assert.Single(innerPostgres.Resource.Annotations.OfType<EndpointAnnotation>());
AzureRedisEnterpriseExtensionsTests.cs (2)
89var endpoint = Assert.Single(redisResource.Annotations.OfType<EndpointAnnotation>());
AzureRedisExtensionsTests.cs (2)
130var 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)
465if (targetEndpoint.Resource.Annotations.OfType<EndpointAnnotation>()
Aspire.Hosting.Docker (2)
DockerComposeEnvironmentContext.cs (2)
48string ResolveTargetPort(EndpointAnnotation endpoint) 69foreach (var endpoint in endpoints)
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)
28var endpoints = containerResource.Annotations.OfType<EndpointAnnotation>(); 31var primaryEndpoint = Assert.Single(endpoints, e => e.Name == "tcp"); 40var internalEndpoint = Assert.Single(endpoints, e => e.Name == "internal"); 176var 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)
170foreach (var endpoint in endpoints) 184private void GenerateDefaultProjectEndpointMapping(EndpointAnnotation endpoint)
Aspire.Hosting.Maui (2)
MauiOtlpExtensions.cs (2)
120var endpoint = stubResource.Annotations.OfType<EndpointAnnotation>().FirstOrDefault();
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)
17r => r.Annotations.OfType<EndpointAnnotation>() 34var httpEndpoints = testProgram.ServiceABuilder.Resource.Annotations.OfType<EndpointAnnotation>().Where(sb => sb.UriScheme == "http" || sb.UriScheme == "https"); 49var endpoints = testProgram.ServiceABuilder.Resource.Annotations.OfType<EndpointAnnotation>(); 50var tcpBinding = endpoints.Single(sb => sb.UriScheme == "tcp"); 53var httpsBinding = endpoints.Single(sb => sb.UriScheme == "https"); 56var httpBinding = endpoints.Single(sb => sb.UriScheme == "http");
Dashboard\DashboardResourceTests.cs (4)
401var endpointAnnotation = Assert.Single(container.Annotations.OfType<EndpointAnnotation>()); 619foreach (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)
250var 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>(), 460foreach (var endpoint in resource.Annotations.OfType<EndpointAnnotation>())
ProjectResourceTests.cs (1)
268resource.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(); 589var endpoint = projectA.Resource.Annotations.OfType<EndpointAnnotation>() 625EndpointAnnotation endpoint = Assert.Single(projectA.Resource.Annotations.OfType<EndpointAnnotation>()); 659EndpointAnnotation endpoint = Assert.Single(projectA.Resource.Annotations.OfType<EndpointAnnotation>());
WithUrlsTests.cs (1)
515foreach (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>())