From 5ec25ca21bf9c194564c6d8a9a704f63d568ba13 Mon Sep 17 00:00:00 2001
From: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Date: Tue, 30 Jun 2026 15:53:54 -0700
Subject: [PATCH 1/2] docs fix up
---
.../IServiceEndpointBuilder.cs | 2 +-
.../DnsServiceEndpointProviderOptions.cs | 5 ++++-
.../DnsSrvServiceEndpointProviderOptions.cs | 5 ++++-
.../ConfigurationServiceEndpointProviderOptions.cs | 10 ++++++++--
.../Http/IServiceDiscoveryHttpMessageHandlerFactory.cs | 4 ++--
.../Internal/ServiceEndpointResolverResult.cs | 2 +-
.../ServiceDiscoveryOptions.cs | 8 +++++---
7 files changed, 25 insertions(+), 11 deletions(-)
diff --git a/src/Libraries/Microsoft.Extensions.ServiceDiscovery.Abstractions/IServiceEndpointBuilder.cs b/src/Libraries/Microsoft.Extensions.ServiceDiscovery.Abstractions/IServiceEndpointBuilder.cs
index e051b2bf746..0165aba3851 100644
--- a/src/Libraries/Microsoft.Extensions.ServiceDiscovery.Abstractions/IServiceEndpointBuilder.cs
+++ b/src/Libraries/Microsoft.Extensions.ServiceDiscovery.Abstractions/IServiceEndpointBuilder.cs
@@ -7,7 +7,7 @@
namespace Microsoft.Extensions.ServiceDiscovery;
///
-/// Builder to create a instances.
+/// Represents a builder that creates instances.
///
public interface IServiceEndpointBuilder
{
diff --git a/src/Libraries/Microsoft.Extensions.ServiceDiscovery.Dns/DnsServiceEndpointProviderOptions.cs b/src/Libraries/Microsoft.Extensions.ServiceDiscovery.Dns/DnsServiceEndpointProviderOptions.cs
index b163afc76ff..5d5d024a991 100644
--- a/src/Libraries/Microsoft.Extensions.ServiceDiscovery.Dns/DnsServiceEndpointProviderOptions.cs
+++ b/src/Libraries/Microsoft.Extensions.ServiceDiscovery.Dns/DnsServiceEndpointProviderOptions.cs
@@ -29,7 +29,10 @@ public class DnsServiceEndpointProviderOptions
public double RetryBackOffFactor { get; set; } = 2;
///
- /// Gets or sets a delegate used to determine whether to apply host name metadata to each resolved endpoint. Defaults to false.
+ /// Gets or sets a delegate used to determine whether to apply host name metadata to each resolved endpoint.
///
+ ///
+ /// The default delegate returns .
+ ///
public Func ShouldApplyHostNameMetadata { get; set; } = _ => false;
}
diff --git a/src/Libraries/Microsoft.Extensions.ServiceDiscovery.Dns/DnsSrvServiceEndpointProviderOptions.cs b/src/Libraries/Microsoft.Extensions.ServiceDiscovery.Dns/DnsSrvServiceEndpointProviderOptions.cs
index c1d64136cc9..2d48405b643 100644
--- a/src/Libraries/Microsoft.Extensions.ServiceDiscovery.Dns/DnsSrvServiceEndpointProviderOptions.cs
+++ b/src/Libraries/Microsoft.Extensions.ServiceDiscovery.Dns/DnsSrvServiceEndpointProviderOptions.cs
@@ -42,7 +42,10 @@ public class DnsSrvServiceEndpointProviderOptions
public Func? ServiceDomainNameCallback { get; set; }
///
- /// Gets or sets a delegate used to determine whether to apply host name metadata to each resolved endpoint. Defaults to false.
+ /// Gets or sets a delegate used to determine whether to apply host name metadata to each resolved endpoint.
///
+ ///
+ /// The default delegate returns .
+ ///
public Func ShouldApplyHostNameMetadata { get; set; } = _ => false;
}
diff --git a/src/Libraries/Microsoft.Extensions.ServiceDiscovery/ConfigurationServiceEndpointProviderOptions.cs b/src/Libraries/Microsoft.Extensions.ServiceDiscovery/ConfigurationServiceEndpointProviderOptions.cs
index 29f28e359f7..65176cf5c49 100644
--- a/src/Libraries/Microsoft.Extensions.ServiceDiscovery/ConfigurationServiceEndpointProviderOptions.cs
+++ b/src/Libraries/Microsoft.Extensions.ServiceDiscovery/ConfigurationServiceEndpointProviderOptions.cs
@@ -11,12 +11,18 @@ namespace Microsoft.Extensions.ServiceDiscovery;
public sealed class ConfigurationServiceEndpointProviderOptions
{
///
- /// The name of the configuration section which contains service endpoints. Defaults to "Services".
+ /// Gets or sets the name of the configuration section that contains service endpoints.
///
+ ///
+ /// The default value is "Services".
+ ///
public string SectionName { get; set; } = "Services";
///
- /// Gets or sets a delegate used to determine whether to apply host name metadata to each resolved endpoint. Defaults to a delegate which returns false.
+ /// Gets or sets a delegate used to determine whether to apply host name metadata to each resolved endpoint.
///
+ ///
+ /// The default delegate returns .
+ ///
public Func ShouldApplyHostNameMetadata { get; set; } = _ => false;
}
diff --git a/src/Libraries/Microsoft.Extensions.ServiceDiscovery/Http/IServiceDiscoveryHttpMessageHandlerFactory.cs b/src/Libraries/Microsoft.Extensions.ServiceDiscovery/Http/IServiceDiscoveryHttpMessageHandlerFactory.cs
index 0c5bd02d10d..f3fba8cafc6 100644
--- a/src/Libraries/Microsoft.Extensions.ServiceDiscovery/Http/IServiceDiscoveryHttpMessageHandlerFactory.cs
+++ b/src/Libraries/Microsoft.Extensions.ServiceDiscovery/Http/IServiceDiscoveryHttpMessageHandlerFactory.cs
@@ -4,13 +4,13 @@
namespace Microsoft.Extensions.ServiceDiscovery.Http;
///
-/// Factory which creates instances which resolve endpoints using service discovery
+/// Represents a factory that creates instances that resolve endpoints using service discovery
/// before delegating to a provided handler.
///
public interface IServiceDiscoveryHttpMessageHandlerFactory
{
///
- /// Creates an instance which resolve endpoints using service discovery before
+ /// Creates an instance that resolves endpoints using service discovery before
/// delegating to a provided handler.
///
/// The handler to delegate to.
diff --git a/src/Libraries/Microsoft.Extensions.ServiceDiscovery/Internal/ServiceEndpointResolverResult.cs b/src/Libraries/Microsoft.Extensions.ServiceDiscovery/Internal/ServiceEndpointResolverResult.cs
index 675941bb955..65161cac046 100644
--- a/src/Libraries/Microsoft.Extensions.ServiceDiscovery/Internal/ServiceEndpointResolverResult.cs
+++ b/src/Libraries/Microsoft.Extensions.ServiceDiscovery/Internal/ServiceEndpointResolverResult.cs
@@ -18,7 +18,7 @@ internal sealed class ServiceEndpointResolverResult(ServiceEndpointSource? endpo
public Exception? Exception { get; } = exception;
///
- /// Gets a value indicating whether resolution completed successfully.
+ /// Gets a value that indicates whether resolution completed successfully.
///
[MemberNotNullWhen(true, nameof(EndpointSource))]
public bool ResolvedSuccessfully => Exception is null;
diff --git a/src/Libraries/Microsoft.Extensions.ServiceDiscovery/ServiceDiscoveryOptions.cs b/src/Libraries/Microsoft.Extensions.ServiceDiscovery/ServiceDiscoveryOptions.cs
index a6fd7123aa7..c4b0197d57b 100644
--- a/src/Libraries/Microsoft.Extensions.ServiceDiscovery/ServiceDiscoveryOptions.cs
+++ b/src/Libraries/Microsoft.Extensions.ServiceDiscovery/ServiceDiscoveryOptions.cs
@@ -12,10 +12,12 @@ namespace Microsoft.Extensions.ServiceDiscovery;
public sealed class ServiceDiscoveryOptions
{
///
- /// Gets or sets a value indicating whether all URI schemes for URIs resolved by the service discovery system are allowed.
- /// If this value is , all URI schemes are allowed.
- /// If this value is , only the schemes specified in are allowed.
+ /// Gets or sets a value that indicates whether all URI schemes for URIs resolved by the service discovery system are allowed.
///
+ ///
+ /// if all URI schemes are allowed; otherwise, .
+ /// if only the schemes specified in are allowed.
+ ///
public bool AllowAllSchemes { get; set; } = true;
///
From 37e42d2d6a1fca0b69efdc9d6f413e9d868e04cb Mon Sep 17 00:00:00 2001
From: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Date: Tue, 30 Jun 2026 19:02:08 -0700
Subject: [PATCH 2/2] Apply suggestions from code review
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
---
.../DnsServiceEndpointProviderOptions.cs | 4 ++--
.../DnsSrvServiceEndpointProviderOptions.cs | 4 ++--
.../ServiceDiscoveryOptions.cs | 3 +--
3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/Libraries/Microsoft.Extensions.ServiceDiscovery.Dns/DnsServiceEndpointProviderOptions.cs b/src/Libraries/Microsoft.Extensions.ServiceDiscovery.Dns/DnsServiceEndpointProviderOptions.cs
index 5d5d024a991..4786dc97988 100644
--- a/src/Libraries/Microsoft.Extensions.ServiceDiscovery.Dns/DnsServiceEndpointProviderOptions.cs
+++ b/src/Libraries/Microsoft.Extensions.ServiceDiscovery.Dns/DnsServiceEndpointProviderOptions.cs
@@ -31,8 +31,8 @@ public class DnsServiceEndpointProviderOptions
///
/// Gets or sets a delegate used to determine whether to apply host name metadata to each resolved endpoint.
///
- ///
+ ///
/// The default delegate returns .
- ///
+ ///
public Func ShouldApplyHostNameMetadata { get; set; } = _ => false;
}
diff --git a/src/Libraries/Microsoft.Extensions.ServiceDiscovery.Dns/DnsSrvServiceEndpointProviderOptions.cs b/src/Libraries/Microsoft.Extensions.ServiceDiscovery.Dns/DnsSrvServiceEndpointProviderOptions.cs
index 2d48405b643..3cfee893d77 100644
--- a/src/Libraries/Microsoft.Extensions.ServiceDiscovery.Dns/DnsSrvServiceEndpointProviderOptions.cs
+++ b/src/Libraries/Microsoft.Extensions.ServiceDiscovery.Dns/DnsSrvServiceEndpointProviderOptions.cs
@@ -44,8 +44,8 @@ public class DnsSrvServiceEndpointProviderOptions
///
/// Gets or sets a delegate used to determine whether to apply host name metadata to each resolved endpoint.
///
- ///
+ ///
/// The default delegate returns .
- ///
+ ///
public Func ShouldApplyHostNameMetadata { get; set; } = _ => false;
}
diff --git a/src/Libraries/Microsoft.Extensions.ServiceDiscovery/ServiceDiscoveryOptions.cs b/src/Libraries/Microsoft.Extensions.ServiceDiscovery/ServiceDiscoveryOptions.cs
index c4b0197d57b..793f058a2cd 100644
--- a/src/Libraries/Microsoft.Extensions.ServiceDiscovery/ServiceDiscoveryOptions.cs
+++ b/src/Libraries/Microsoft.Extensions.ServiceDiscovery/ServiceDiscoveryOptions.cs
@@ -15,8 +15,7 @@ public sealed class ServiceDiscoveryOptions
/// Gets or sets a value that indicates whether all URI schemes for URIs resolved by the service discovery system are allowed.
///
///
- /// if all URI schemes are allowed; otherwise, .
- /// if only the schemes specified in are allowed.
+ /// to allow all URI schemes; to allow only schemes specified in .
///
public bool AllowAllSchemes { get; set; } = true;