48 references to ServiceEndpoint
Microsoft.Extensions.ServiceDiscovery (22)
Configuration\ConfigurationServiceEndpointProvider.cs (8)
107List<ServiceEndpoint> resolved = []; 134foreach (var ep in resolved) 146foreach (var ep in resolved) 158foreach (var ep in resolved) 191private void AddEndpoint(List<ServiceEndpoint> endpoints, IConfigurationSection section, string endpointName) 229private ServiceEndpoint CreateEndpoint(EndPoint endPoint) 231var serviceEndpoint = ServiceEndpoint.Create(endPoint);
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\ResolvingHttpDelegatingHandler.cs (1)
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 (10)
Internal\ServiceEndpointImpl.cs (1)
9internal sealed class ServiceEndpointImpl(EndPoint endPoint, IFeatureCollection? features = null) : ServiceEndpoint
IServiceEndpointBuilder.cs (1)
17IList<ServiceEndpoint> Endpoints { get; }
ServiceEndpoint.cs (3)
26/// Creates a new <see cref="ServiceEndpoint"/>. 30/// <returns>A newly initialized <see cref="ServiceEndpoint"/>.</returns> 31public static ServiceEndpoint Create(EndPoint endPoint, IFeatureCollection? features = null) => new ServiceEndpointImpl(endPoint, features);
ServiceEndpointSource.cs (5)
17private readonly List<ServiceEndpoint>? _endpoints; 25public ServiceEndpointSource(List<ServiceEndpoint>? endpoints, IChangeToken changeToken, IFeatureCollection features) 37public IReadOnlyList<ServiceEndpoint> Endpoints => _endpoints ?? (IReadOnlyList<ServiceEndpoint>)[]; 67public ServiceEndpoint[] Endpoints => value.Endpoints.ToArray();
Microsoft.Extensions.ServiceDiscovery.Dns (12)
DnsServiceEndpointProvider.cs (3)
29var endpoints = new List<ServiceEndpoint>(); 35var serviceEndpoint = ServiceEndpoint.Create(new IPEndPoint(address, 0));
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)
35var endpoints = new List<ServiceEndpoint>(); 88ServiceEndpoint CreateEndpoint(EndPoint endPoint) 90var serviceEndpoint = ServiceEndpoint.Create(endPoint);
DnsSrvServiceEndpointProviderOptions.cs (1)
42public Func<ServiceEndpoint, bool> ShouldApplyHostNameMetadata { get; set; } = _ => false;
Microsoft.Extensions.ServiceDiscovery.Tests (4)
ServiceEndpointTests.cs (4)
29var serviceEndpoint = ServiceEndpoint.Create(endpoint); 38var serviceEndpoint = ServiceEndpoint.Create(endpoint);