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