1 write to Name
Aspire.Hosting (1)
ApplicationModel\EndpointAnnotation.cs (1)
49Name = name;
89 references to Name
Aspire.Hosting (9)
ApplicationModel\EndpointReference.cs (2)
109_endpointAnnotation ??= Resource.Annotations.OfType<EndpointAnnotation>().SingleOrDefault(a => StringComparers.EndpointAnnotationName.Equals(a.Name, EndpointName)); 124EndpointName = endpoint.Name;
Dcp\ApplicationExecutor.cs (1)
1007throw new InvalidOperationException($"Service '{svc.Metadata.Name}' needs to specify a port for endpoint '{sp.EndpointAnnotation.Name}' since it isn't using a proxy.");
Devcontainers\DevcontainerPortForwardingLifecycleHook.cs (1)
68$"{resource.Name}-{endpoint.Name}",
Publishing\ManifestPublishingContext.cs (1)
408Writer.WriteStartObject(endpoint.Name);
ResourceBuilderExtensions.cs (4)
479.Where(ea => StringComparers.EndpointAnnotationName.Equals(ea.Name, endpointName)) 530if (builder.Resource.Annotations.OfType<EndpointAnnotation>().Any(sb => string.Equals(sb.Name, annotation.Name, StringComparisons.EndpointAnnotationName))) 532throw new DistributedApplicationException($"Endpoint with name '{annotation.Name}' already exists. Endpoint name may not have been explicitly specified and was derived automatically from scheme argument (e.g. 'http', 'https', or 'tcp'). Multiple calls to WithEndpoint (and related methods) may result in a conflict if name argument is not specified. Each endpoint must have a unique name. For more information on networking in .NET Aspire see: https://aka.ms/dotnet/aspire/networking");
Aspire.Hosting.Azure.AppContainers (7)
AzureContainerAppsInfrastructure.cs (7)
265throw new NotSupportedException($"The endpoint(s) {string.Join(", ", unsupportedEndpoints.Select(e => $"'{e.Name}'"))} specify an unsupported scheme. The supported schemes are 'http', 'https', and 'tcp'."); 286endpointIndexMap[endpoint.Name] = endpointIndexMap.Count; 354Index = g.Min(e => endpointIndexMap[e.Name]) 416throw new NotSupportedException($"The endpoint '{e.Name}' is an http endpoint and must use port 80"); 421throw new NotSupportedException($"The endpoint '{e.Name}' is an https endpoint and must use port 443"); 427_endpointMapping[e.Name] = new(e.UriScheme, resource.Name, port, targetPort, true, httpIngress.External); 447_endpointMapping[e.Name] = new(e.UriScheme, resource.Name, e.Port ?? g.Port.Value, g.Port.Value, false, g.External);
Aspire.Hosting.Dapr.Tests (4)
DaprTests.cs (4)
56e.AllocatedEndpoint = new(e, "localhost", ports[e.Name], targetPortExpression: $$$"""{{- portForServing "{{{e.Name}}}" -}}"""); 155e.AllocatedEndpoint = new(e, "localhost", ports[e.Name], targetPortExpression: $$$"""{{- portForServing "{{{e.Name}}}" -}}""");
Aspire.Hosting.Elasticsearch.Tests (8)
AddElasticsearchTests.cs (8)
32var primaryEndpoint = Assert.Single(endpoints, e => e.Name == "http"); 35Assert.Equal("http", primaryEndpoint.Name); 41var internalEndpoint = Assert.Single(endpoints, e => e.Name == "internal"); 44Assert.Equal("internal", internalEndpoint.Name); 94var primaryEndpoint = Assert.Single(endpoints, e => e.Name == "http"); 97Assert.Equal("http", primaryEndpoint.Name); 103var internalEndpoint = Assert.Single(endpoints, e => e.Name == "internal"); 106Assert.Equal("internal", internalEndpoint.Name);
Aspire.Hosting.Garnet.Tests (2)
AddGarnetTests.cs (2)
30Assert.Equal("tcp", endpoint.Name); 58Assert.Equal("tcp", endpoint.Name);
Aspire.Hosting.Kafka.Tests (4)
AddKafkaTests.cs (4)
31var primaryEndpoint = Assert.Single(endpoints, e => e.Name == "tcp"); 34Assert.Equal("tcp", primaryEndpoint.Name); 40var internalEndpoint = Assert.Single(endpoints, e => e.Name == "internal"); 43Assert.Equal("internal", internalEndpoint.Name);
Aspire.Hosting.Keycloak.Tests (1)
KeycloakResourceBuilderTests.cs (1)
32Assert.Equal("http", endpoint.Name);
Aspire.Hosting.Milvus.Tests (5)
AddMilvusTests.cs (5)
38.FirstOrDefault(e => e.Name == "grpc"); 42Assert.Equal("grpc", endpoint.Name); 69.FirstOrDefault(e => e.Name == "grpc"); 73Assert.Equal("grpc", endpoint.Name); 198var grpcEndpoint = milvusResource.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == "grpc");
Aspire.Hosting.MongoDB.Tests (2)
AddMongoDBTests.cs (2)
32Assert.Equal("tcp", endpoint.Name); 60Assert.Equal("tcp", endpoint.Name);
Aspire.Hosting.MySql.Tests (2)
AddMySqlTests.cs (2)
57Assert.Equal("tcp", endpoint.Name); 97Assert.Equal("tcp", endpoint.Name);
Aspire.Hosting.Nats.Tests (2)
AddNatsTests.cs (2)
102Assert.Equal("tcp", endpoint.Name); 148Assert.Equal("tcp", endpoint.Name);
Aspire.Hosting.Oracle.Tests (3)
AddOracleTests.cs (3)
56Assert.Equal("tcp", endpoint.Name); 96Assert.Equal("tcp", endpoint.Name); 179Assert.Equal("tcp", endpoint.Name);
Aspire.Hosting.PostgreSQL.Tests (3)
AddPostgresTests.cs (3)
66Assert.Equal("tcp", endpoint.Name); 121Assert.Equal("tcp", endpoint.Name); 213Assert.Equal("tcp", endpoint.Name);
Aspire.Hosting.Qdrant.Tests (8)
AddQdrantTests.cs (8)
57.FirstOrDefault(e => e.Name == "grpc"); 61Assert.Equal("grpc", endpoint.Name); 96.FirstOrDefault(e => e.Name == "http"); 101Assert.Equal("http", endpoint.Name); 130.FirstOrDefault(e => e.Name == "grpc"); 134Assert.Equal("grpc", endpoint.Name); 294var grpcEndpoint = qdrantResource.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == "grpc"); 302var httpEndpoint = qdrantResource.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == "http");
Aspire.Hosting.RabbitMQ.Tests (4)
AddRabbitMQTests.cs (4)
56var primaryEndpoint = Assert.Single(containerResource.Annotations.OfType<EndpointAnnotation>().Where(e => e.Name == "tcp")); 59Assert.Equal("tcp", primaryEndpoint.Name); 67var mangementEndpoint = Assert.Single(containerResource.Annotations.OfType<EndpointAnnotation>().Where(e => e.Name == "management")); 70Assert.Equal("management", mangementEndpoint.Name);
Aspire.Hosting.Redis.Tests (2)
AddRedisTests.cs (2)
39Assert.Equal("tcp", endpoint.Name); 67Assert.Equal("tcp", endpoint.Name);
Aspire.Hosting.SqlServer.Tests (1)
AddSqlServerTests.cs (1)
52Assert.Equal("tcp", endpoint.Name);
Aspire.Hosting.Tests (19)
Dcp\ApplicationExecutorTests.cs (1)
656.WithEndpointsInEnvironment(e => e.Name != "dontinjectme")
KestrelConfigTests.cs (10)
29Assert.Equal("http", a.Name); 35Assert.Equal("ExplicitHttp", a.Name); 65Assert.Equal("http", a.Name); 71Assert.Equal("ExplicitHttp", a.Name); 98Assert.Equal("https", a.Name); 115Assert.Equal("FirstHttpEndpoint", a.Name); 123Assert.Equal("SecondHttpEndpoint", a.Name); 288.WithEndpointsInEnvironment(e => e.Name != "FirstHttpEndpoint") 289.WithEndpointsInEnvironment(e => e.Name != "ExplicitProxiedHttp"); 463endpoint.AllocatedEndpoint = new AllocatedEndpoint(endpoint, "localhost", endpoint.Port ?? 0, targetPortExpression: $"port_{endpoint.Name}");
ProjectResourceTests.cs (3)
254Assert.Equal("https", a.Name); 260Assert.Equal("http", a.Name); 335.WithEndpointsInEnvironment(filter: e => e.Name != "dontinjectme")
WithEndpointTests.cs (5)
30.Where(e => string.Equals(e.Name, "mybinding", EndpointAnnotationName)).Single(); 47.Where(e => string.Equals(e.Name, "mybinding", EndpointAnnotationName)).Single(); 82.Where(e => string.Equals(e.Name, "mybinding", EndpointAnnotationName)).Single(); 220Assert.Equal("mybinding", endpoints[0].Name); 534.WithEndpointsInEnvironment(e => e.Name != "dontinjectme");
Aspire.Hosting.Valkey.Tests (2)
AddValkeyTests.cs (2)
30Assert.Equal("tcp", endpoint.Name); 58Assert.Equal("tcp", endpoint.Name);
TestProject.AppHost (1)
TestProgram.cs (1)
165["Name"] = endpoint.Name,