1 type derived from ServiceEndpoint
Microsoft.Extensions.ServiceDiscovery.Abstractions (1)
Internal\ServiceEndpointImpl.cs (1)
9internal sealed class ServiceEndpointImpl(EndPoint endPoint, IFeatureCollection? features = null) : ServiceEndpoint
66 references to ServiceEndpoint
Microsoft.Extensions.ServiceDiscovery (23)
Configuration\ConfigurationServiceEndpointProvider.cs (7)
106List<ServiceEndpoint> resolved = []; 133foreach (var ep in resolved) 145foreach (var ep in resolved) 157foreach (var ep in resolved) 190private void AddEndpoint(List<ServiceEndpoint> endpoints, IConfigurationSection section, string endpointName) 192if (!ServiceEndpoint.TryParse(section.Value, out var serviceEndpoint))
Configuration\ConfigurationServiceEndpointProvider.Log.cs (1)
25internal static void ConfiguredEndpoints(ILogger logger, string serviceName, string path, IList<ServiceEndpoint> endpoints, int added)
ConfigurationServiceEndpointProviderOptions.cs (1)
21public Func<ServiceEndpoint, bool> ShouldApplyHostNameMetadata { get; set; } = _ => false;
Http\HttpServiceEndpointResolver.cs (3)
32public async ValueTask<ServiceEndpoint> GetEndpointAsync(HttpRequestMessage request, CancellationToken cancellationToken) 197public async ValueTask<(bool Valid, ServiceEndpoint? Endpoint)> TryGetEndpointAsync(object? context, CancellationToken cancellationToken) 207var result = _selector.GetEndpoint(context);
Http\ResolvingHttpClientHandler.cs (1)
25var result = await _resolver.GetEndpointAsync(request, cancellationToken).ConfigureAwait(false);
Http\ResolvingHttpDelegatingHandler.cs (2)
46var result = await _resolver.GetEndpointAsync(request, cancellationToken).ConfigureAwait(false); 61internal static Uri GetUriWithEndpoint(Uri uri, ServiceEndpoint serviceEndpoint, ServiceDiscoveryOptions options)
LoadBalancing\IServiceEndpointSelector.cs (1)
22ServiceEndpoint GetEndpoint(object? context);
LoadBalancing\RoundRobinServiceEndpointSelector.cs (2)
12private IReadOnlyList<ServiceEndpoint>? _endpoints; 21public ServiceEndpoint GetEndpoint(object? context)
PassThrough\PassThroughServiceEndpointProvider.cs (2)
19var ep = ServiceEndpoint.Create(endPoint);
ServiceEndpointBuilder.cs (2)
14private readonly List<ServiceEndpoint> _endpoints = new(); 35public IList<ServiceEndpoint> Endpoints => _endpoints;
ServiceEndpointWatcher.Log.cs (1)
28static string GetEndpointString(ServiceEndpoint ep)
Microsoft.Extensions.ServiceDiscovery.Abstractions (13)
IServiceEndpointBuilder.cs (1)
17IList<ServiceEndpoint> Endpoints { get; }
ServiceEndpoint.cs (7)
27/// Creates a new <see cref="ServiceEndpoint"/>. 31/// <returns>A newly initialized <see cref="ServiceEndpoint"/>.</returns> 32public static ServiceEndpoint Create(EndPoint endPoint, IFeatureCollection? features = null) 40/// Tries to convert a specified string representation to its <see cref="ServiceEndpoint"/> equivalent, 44/// <param name="serviceEndpoint">When this method returns, contains the equivalent <see cref="ServiceEndpoint"/> if the conversion succeeded; otherwise, 46/// <returns><see langword="true"/> if the string was successfully parsed into a <see cref="ServiceEndpoint"/>; otherwise, <see langword="false"/>.</returns> 48[NotNullWhen(true)] out ServiceEndpoint? serviceEndpoint)
ServiceEndpointSource.cs (5)
17private readonly List<ServiceEndpoint>? _endpoints; 25public ServiceEndpointSource(List<ServiceEndpoint>? endpoints, IChangeToken changeToken, IFeatureCollection features) 38public IReadOnlyList<ServiceEndpoint> Endpoints => _endpoints ?? (IReadOnlyList<ServiceEndpoint>)[]; 68public ServiceEndpoint[] Endpoints => value.Endpoints.ToArray();
Microsoft.Extensions.ServiceDiscovery.Dns (13)
DnsServiceEndpointProvider.cs (4)
31var endpoints = new List<ServiceEndpoint>(); 57ServiceEndpoint CreateEndpoint(EndPoint endPoint) 59var serviceEndpoint = ServiceEndpoint.Create(endPoint);
DnsServiceEndpointProviderBase.cs (3)
23private List<ServiceEndpoint>? _lastEndpointCollection; 90foreach (var ep in eps) 105protected void SetResult(List<ServiceEndpoint> endpoints, TimeSpan validityPeriod)
DnsServiceEndpointProviderOptions.cs (1)
34public Func<ServiceEndpoint, bool> ShouldApplyHostNameMetadata { get; set; } = _ => false;
DnsSrvServiceEndpointProvider.cs (4)
34var endpoints = new List<ServiceEndpoint>(); 67ServiceEndpoint CreateEndpoint(EndPoint endPoint) 69var serviceEndpoint = ServiceEndpoint.Create(endPoint);
DnsSrvServiceEndpointProviderOptions.cs (1)
47public Func<ServiceEndpoint, bool> ShouldApplyHostNameMetadata { get; set; } = _ => false;
Microsoft.Extensions.ServiceDiscovery.Tests (16)
ExtensionsServicePublicApiTests.cs (3)
169var action = () => ServiceEndpoint.Create(endPoint); 198List<ServiceEndpoint>? endpoints = null; 211List<ServiceEndpoint>? endpoints = null;
ServiceEndpointResolverTests.cs (9)
93collection.Endpoints.Add(ServiceEndpoint.Create(new IPEndPoint(IPAddress.Parse("127.1.1.1"), 8080))); 98collection.Endpoints.Add(ServiceEndpoint.Create(new IPEndPoint(IPAddress.Parse("127.1.1.2"), 8888))); 145collection.Endpoints.Add(ServiceEndpoint.Create(new IPEndPoint(IPAddress.Parse("127.1.1.1"), 8080))); 150collection.Endpoints.Add(ServiceEndpoint.Create(new IPEndPoint(IPAddress.Parse("127.1.1.2"), 8888))); 165var sep = Assert.Single(initialResult.Endpoints); 181collection.Endpoints.Add(ServiceEndpoint.Create(new IPEndPoint(IPAddress.Parse("127.1.1.1"), 8080))); 186collection.Endpoints.Add(ServiceEndpoint.Create(new IPEndPoint(IPAddress.Parse("127.1.1.2"), 8888))); 233collection.Endpoints.Add(ServiceEndpoint.Create(new IPEndPoint(IPAddress.Parse("127.1.1.1"), 8080))); 286var sep = Assert.Single(result.Endpoints);
ServiceEndpointTests.cs (4)
29var serviceEndpoint = ServiceEndpoint.Create(endpoint); 38var serviceEndpoint = ServiceEndpoint.Create(endpoint);
Microsoft.Extensions.ServiceDiscovery.Yarp (1)
ServiceDiscoveryDestinationResolver.cs (1)
65foreach (var endpoint in result.Endpoints)