From 5a755fdaa60d6e806d3b252888e6dcfbbd4fe33d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 16 Jul 2025 06:42:40 +0000 Subject: [PATCH 01/12] Initial plan From 6c72037acbb3b6a1d3d144376c32c94c0f345360 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 16 Jul 2025 07:13:25 +0000 Subject: [PATCH 02/12] Add documentation for System.Data.SqlTypes and System.Diagnostics APIs Co-authored-by: jeffhandley <1031940+jeffhandley@users.noreply.github.com> --- .../src/System/Diagnostics/TraceConfiguration.cs | 3 +++ .../src/System/Data/SQLTypes/SQLBinary.cs | 5 +++++ .../src/System/Data/SQLTypes/SQLDecimal.cs | 7 +++++++ .../src/System/Data/SQLTypes/SQLMoney.cs | 10 ++++++++++ .../System/Diagnostics/InitializingSwitchEventArgs.cs | 7 +++++++ .../Diagnostics/InitializingTraceSourceEventArgs.cs | 11 +++++++++++ 6 files changed, 43 insertions(+) diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System/Diagnostics/TraceConfiguration.cs b/src/libraries/System.Configuration.ConfigurationManager/src/System/Diagnostics/TraceConfiguration.cs index de819c301df57c..042171f3824b71 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System/Diagnostics/TraceConfiguration.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System/Diagnostics/TraceConfiguration.cs @@ -3,6 +3,9 @@ namespace System.Diagnostics { + /// + /// Provides methods to register and configure tracing settings from configuration files. + /// public static class TraceConfiguration { private static volatile bool s_registered; diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLBinary.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLBinary.cs index ef6fc2d2f0412c..cf05f7076f04aa 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLBinary.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLBinary.cs @@ -460,6 +460,11 @@ public static XmlQualifiedName GetXsdType(XmlSchemaSet schemaSet) return new XmlQualifiedName("base64Binary", XmlSchema.Namespace); } + /// + /// Wraps a byte array in a SqlBinary without copying the data. + /// + /// The byte array to wrap. + /// A SqlBinary that wraps the provided byte array. public static SqlBinary WrapBytes(byte[] bytes) { return new SqlBinary(bytes, copy: false); diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDecimal.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDecimal.cs index 309fc79d90bbc5..96d838ec677df5 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDecimal.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDecimal.cs @@ -1154,6 +1154,13 @@ private decimal ToDecimal() } } + /// + /// Writes the TDS representation of this SqlDecimal to the specified destination. + /// + /// The destination span to write the TDS value to. Must be at least 4 elements long. + /// The number of uint values written to the destination. + /// Thrown when the SqlDecimal is null. + /// Thrown when the destination span is too small. [CLSCompliant(false)] public int WriteTdsValue(Span destination) { diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLMoney.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLMoney.cs index 8d028c5906d489..63ea49e14f3ed4 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLMoney.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLMoney.cs @@ -208,6 +208,11 @@ public override string ToString() return money.ToString("#0.00##", null); } + /// + /// Gets the TDS (Tabular Data Stream) representation of this SqlMoney value. + /// + /// A long value representing the TDS representation. + /// Thrown when the SqlMoney is null. public long GetTdsValue() { if (IsNull) @@ -249,6 +254,11 @@ public static SqlMoney Parse(string s) return money; } + /// + /// Creates a SqlMoney from a TDS (Tabular Data Stream) value. + /// + /// The TDS value to convert to SqlMoney. + /// A SqlMoney representing the TDS value. public static SqlMoney FromTdsValue(long value) { return new SqlMoney(value, 0); diff --git a/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/InitializingSwitchEventArgs.cs b/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/InitializingSwitchEventArgs.cs index 651bfd29fb0c77..970d3297eb209e 100644 --- a/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/InitializingSwitchEventArgs.cs +++ b/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/InitializingSwitchEventArgs.cs @@ -8,11 +8,18 @@ namespace System.Diagnostics /// public sealed class InitializingSwitchEventArgs : EventArgs { + /// + /// Initializes a new instance of the class. + /// + /// The switch that is being initialized. public InitializingSwitchEventArgs(Switch @switch) { Switch = @switch; } + /// + /// Gets the switch that is being initialized. + /// public Switch Switch { get; } } } diff --git a/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/InitializingTraceSourceEventArgs.cs b/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/InitializingTraceSourceEventArgs.cs index b4b3aac66ac5cc..7a00114c5e26f2 100644 --- a/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/InitializingTraceSourceEventArgs.cs +++ b/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/InitializingTraceSourceEventArgs.cs @@ -8,12 +8,23 @@ namespace System.Diagnostics /// public sealed class InitializingTraceSourceEventArgs : EventArgs { + /// + /// Initializes a new instance of the class. + /// + /// The trace source that is being initialized. public InitializingTraceSourceEventArgs(TraceSource traceSource) { TraceSource = traceSource; } + /// + /// Gets the trace source that is being initialized. + /// public TraceSource TraceSource { get; } + + /// + /// Gets or sets a value indicating whether the trace source was initialized from configuration. + /// public bool WasInitialized { get; set; } } } From 6904f8507326d7bcd78f2f65cd5ef45085cf9e2b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 16 Jul 2025 07:19:01 +0000 Subject: [PATCH 03/12] Add documentation for System.Reflection.Metadata, System.Runtime.Versioning, System.Security.Cryptography.Cose and System.Runtime.Serialization.Json APIs Co-authored-by: jeffhandley <1031940+jeffhandley@users.noreply.github.com> --- .../Runtime/Versioning/PlatformAttributes.cs | 18 ++++++++++++++++++ .../Json/DataContractJsonSerializer.cs | 9 +++++++++ .../Metadata/Ecma335/Encoding/BlobEncoders.cs | 4 ++++ .../Cryptography/Cose/CoseHeaderMap.cs | 7 ++++++- 4 files changed, 37 insertions(+), 1 deletion(-) diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Versioning/PlatformAttributes.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Versioning/PlatformAttributes.cs index 85fbeb604c669c..86f621c82023b0 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Versioning/PlatformAttributes.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Versioning/PlatformAttributes.cs @@ -134,14 +134,32 @@ public UnsupportedOSPlatformAttribute(string platformName, string? message) : ba #endif sealed class ObsoletedOSPlatformAttribute : OSPlatformAttribute { + /// + /// Initializes a new instance of the class with the specified platform name. + /// + /// The name of the platform where the API was obsoleted. public ObsoletedOSPlatformAttribute(string platformName) : base(platformName) { } + + /// + /// Initializes a new instance of the class with the specified platform name and message. + /// + /// The name of the platform where the API was obsoleted. + /// The message that explains the obsolescence. public ObsoletedOSPlatformAttribute(string platformName, string? message) : base(platformName) { Message = message; } + + /// + /// Gets the message that explains the obsolescence. + /// public string? Message { get; } + + /// + /// Gets or sets the URL that provides more information about the obsolescence. + /// public string? Url { get; set; } } diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/DataContractJsonSerializer.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/DataContractJsonSerializer.cs index 5072642b0087b2..d966ffd6143e7c 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/DataContractJsonSerializer.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/DataContractJsonSerializer.cs @@ -206,11 +206,20 @@ private XmlDictionaryString RootName // These Get/Set methods mirror the extensions that were added to DCS in the early days of Core, which allowed // using a slimmed-down surrogate on both NetFx and Core via type-forwarding mechanisms. That's why these are // a pair of methods instead of making the property itself public. + + /// + /// Gets the current serialization surrogate provider. + /// + /// The current instance, or if no provider is set. public ISerializationSurrogateProvider? GetSerializationSurrogateProvider() { return SerializationSurrogateProvider; } + /// + /// Sets the serialization surrogate provider. + /// + /// The to use for serialization, or to remove the current provider. public void SetSerializationSurrogateProvider(ISerializationSurrogateProvider? provider) { SerializationSurrogateProvider = provider; diff --git a/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/Ecma335/Encoding/BlobEncoders.cs b/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/Ecma335/Encoding/BlobEncoders.cs index 3ed78ab777a1bc..01bc51b0bd1f70 100644 --- a/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/Ecma335/Encoding/BlobEncoders.cs +++ b/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/Ecma335/Encoding/BlobEncoders.cs @@ -424,6 +424,10 @@ public FieldTypeEncoder(BlobBuilder builder) Builder = builder; } + /// + /// Encodes custom modifiers for the field type. + /// + /// A instance that can be used to encode custom modifiers. public CustomModifiersEncoder CustomModifiers() { return new CustomModifiersEncoder(Builder); diff --git a/src/libraries/System.Security.Cryptography.Cose/src/System/Security/Cryptography/Cose/CoseHeaderMap.cs b/src/libraries/System.Security.Cryptography.Cose/src/System/Security/Cryptography/Cose/CoseHeaderMap.cs index 73d858e6619f8d..25c38ffed3a602 100644 --- a/src/libraries/System.Security.Cryptography.Cose/src/System/Security/Cryptography/Cose/CoseHeaderMap.cs +++ b/src/libraries/System.Security.Cryptography.Cose/src/System/Security/Cryptography/Cose/CoseHeaderMap.cs @@ -181,7 +181,12 @@ public void Add(CoseHeaderLabel key, CoseHeaderValue value) /// public bool ContainsKey(CoseHeaderLabel key) => _headerParameters.ContainsKey(key); - /// + /// + /// Attempts to get the value associated with the specified header label. + /// + /// The header label to search for. + /// When this method returns, contains the value associated with the specified key, if found; otherwise, the default value for the type of the value parameter. + /// if the header map contains an element with the specified key; otherwise, . public bool TryGetValue(CoseHeaderLabel key, out CoseHeaderValue value) => _headerParameters.TryGetValue(key, out value); /// From 3b115eaa5f1e04b34ced696fb111f7961ad32b85 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 16 Jul 2025 07:22:42 +0000 Subject: [PATCH 04/12] Add documentation for System.Security.Cryptography.X509Certificates.X509SubjectAlternativeNameExtension and System.Runtime.Serialization.DataContracts.DataContract APIs Co-authored-by: jeffhandley <1031940+jeffhandley@users.noreply.github.com> --- .../Runtime/Serialization/DataContract.cs | 18 ++++++++++++ .../X509SubjectAlternativeNameExtension.cs | 28 +++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContract.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContract.cs index 371dd171255648..c26e583e7ed8bc 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContract.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContract.cs @@ -21,6 +21,9 @@ namespace System.Runtime.Serialization.DataContracts { + /// + /// Represents a data contract that defines serialization and deserialization behavior for types. + /// public abstract class DataContract { internal const string SerializerTrimmerWarning = "Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the " + @@ -46,6 +49,9 @@ internal DataContract(DataContractCriticalHelper helper) _ns = helper.Namespace; } + /// + /// Gets the contract type name for this data contract. + /// public virtual string? ContractType => null; internal MethodInfo? ParseMethod => _helper.ParseMethod; @@ -190,24 +196,36 @@ internal virtual object ReadXmlElement(XmlReaderDelegator xmlReader, XmlObjectSe throw new InvalidDataContractException(SR.Format(SR.UnexpectedContractType, DataContract.GetClrTypeFullName(GetType()), DataContract.GetClrTypeFullName(UnderlyingType))); } + /// + /// Gets or sets a value indicating whether the data contract represents a value type. + /// public virtual bool IsValueType { get => _helper.IsValueType; internal set => _helper.IsValueType = value; } + /// + /// Gets or sets a value indicating whether the data contract is serialized by reference. + /// public virtual bool IsReference { get => _helper.IsReference; internal set => _helper.IsReference = value; } + /// + /// Gets or sets the XML qualified name for the data contract. + /// public virtual XmlQualifiedName XmlName { get => _helper.XmlName; internal set => _helper.XmlName = value; } + /// + /// Gets the base data contract for this data contract. + /// public virtual DataContract? BaseContract { [RequiresDynamicCode(DataContract.SerializerAOTWarning)] diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509SubjectAlternativeNameExtension.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509SubjectAlternativeNameExtension.cs index c6781214acc9c9..cea5a4d3a2d248 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509SubjectAlternativeNameExtension.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509SubjectAlternativeNameExtension.cs @@ -9,33 +9,57 @@ namespace System.Security.Cryptography.X509Certificates { + /// + /// Represents an X.509 Subject Alternative Name extension. + /// public sealed class X509SubjectAlternativeNameExtension : X509Extension { private List? _decoded; + /// + /// Initializes a new instance of the class. + /// public X509SubjectAlternativeNameExtension() : base(Oids.SubjectAltNameOid) { _decoded = new List(0); } + /// + /// Initializes a new instance of the class using encoded extension data. + /// + /// The encoded extension data. + /// A value indicating whether the extension is critical. public X509SubjectAlternativeNameExtension(byte[] rawData, bool critical = false) : base(Oids.SubjectAltNameOid, rawData, critical) { _decoded = Decode(RawData); } + /// + /// Initializes a new instance of the class using encoded extension data. + /// + /// The encoded extension data. + /// A value indicating whether the extension is critical. public X509SubjectAlternativeNameExtension(ReadOnlySpan rawData, bool critical = false) : base(Oids.SubjectAltNameOid, rawData, critical) { _decoded = Decode(RawData); } + /// + /// Copies the extension properties from the specified object. + /// + /// The object to copy from. public override void CopyFrom(AsnEncodedData asnEncodedData) { base.CopyFrom(asnEncodedData); _decoded = null; } + /// + /// Enumerates the DNS names contained in the Subject Alternative Name extension. + /// + /// An enumerable collection of DNS names. public IEnumerable EnumerateDnsNames() { List decoded = (_decoded ??= Decode(RawData)); @@ -54,6 +78,10 @@ private static IEnumerable EnumerateDnsNames(List decode } } + /// + /// Enumerates the IP addresses contained in the Subject Alternative Name extension. + /// + /// An enumerable collection of IP addresses. public IEnumerable EnumerateIPAddresses() { List decoded = (_decoded ??= Decode(RawData)); From 791f86879e1dcc5be6b6070e34d05e614b5cadff Mon Sep 17 00:00:00 2001 From: Jeff Handley Date: Sun, 20 Jul 2025 16:02:49 -0700 Subject: [PATCH 05/12] Use tags and remove trailing whitespace --- .../src/System/Data/SQLTypes/SQLBinary.cs | 2 +- .../src/System/Data/SQLTypes/SQLDecimal.cs | 6 +++--- .../src/System/Data/SQLTypes/SQLMoney.cs | 10 +++++----- .../Diagnostics/InitializingTraceSourceEventArgs.cs | 1 - 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLBinary.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLBinary.cs index cf05f7076f04aa..4371cad7ea1840 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLBinary.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLBinary.cs @@ -464,7 +464,7 @@ public static XmlQualifiedName GetXsdType(XmlSchemaSet schemaSet) /// Wraps a byte array in a SqlBinary without copying the data. /// /// The byte array to wrap. - /// A SqlBinary that wraps the provided byte array. + /// A that wraps the provided byte array. public static SqlBinary WrapBytes(byte[] bytes) { return new SqlBinary(bytes, copy: false); diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDecimal.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDecimal.cs index 96d838ec677df5..27941b713b84f7 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDecimal.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDecimal.cs @@ -1155,11 +1155,11 @@ private decimal ToDecimal() } /// - /// Writes the TDS representation of this SqlDecimal to the specified destination. + /// Writes the TDS representation of this to the specified destination. /// /// The destination span to write the TDS value to. Must be at least 4 elements long. - /// The number of uint values written to the destination. - /// Thrown when the SqlDecimal is null. + /// The number of values written to the destination. + /// Thrown when the is . /// Thrown when the destination span is too small. [CLSCompliant(false)] public int WriteTdsValue(Span destination) diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLMoney.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLMoney.cs index 63ea49e14f3ed4..874f7c5538d646 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLMoney.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLMoney.cs @@ -209,10 +209,10 @@ public override string ToString() } /// - /// Gets the TDS (Tabular Data Stream) representation of this SqlMoney value. + /// Gets the TDS (Tabular Data Stream) representation of this value. /// /// A long value representing the TDS representation. - /// Thrown when the SqlMoney is null. + /// Thrown when the is . public long GetTdsValue() { if (IsNull) @@ -255,10 +255,10 @@ public static SqlMoney Parse(string s) } /// - /// Creates a SqlMoney from a TDS (Tabular Data Stream) value. + /// Creates a from a TDS (Tabular Data Stream) value. /// - /// The TDS value to convert to SqlMoney. - /// A SqlMoney representing the TDS value. + /// The TDS value to convert to . + /// A representing the TDS value. public static SqlMoney FromTdsValue(long value) { return new SqlMoney(value, 0); diff --git a/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/InitializingTraceSourceEventArgs.cs b/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/InitializingTraceSourceEventArgs.cs index 7a00114c5e26f2..c9311f0cd70275 100644 --- a/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/InitializingTraceSourceEventArgs.cs +++ b/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/InitializingTraceSourceEventArgs.cs @@ -21,7 +21,6 @@ public InitializingTraceSourceEventArgs(TraceSource traceSource) /// Gets the trace source that is being initialized. /// public TraceSource TraceSource { get; } - /// /// Gets or sets a value indicating whether the trace source was initialized from configuration. /// From 109cd249309fa0fbeefa8788dfc5732dbbb1755a Mon Sep 17 00:00:00 2001 From: Jeff Handley Date: Sun, 20 Jul 2025 16:23:58 -0700 Subject: [PATCH 06/12] Remove trailing whitespace --- .../Runtime/Serialization/Json/DataContractJsonSerializer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/DataContractJsonSerializer.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/DataContractJsonSerializer.cs index d966ffd6143e7c..8c86f0a3713e01 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/DataContractJsonSerializer.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/DataContractJsonSerializer.cs @@ -206,7 +206,7 @@ private XmlDictionaryString RootName // These Get/Set methods mirror the extensions that were added to DCS in the early days of Core, which allowed // using a slimmed-down surrogate on both NetFx and Core via type-forwarding mechanisms. That's why these are // a pair of methods instead of making the property itself public. - + /// /// Gets the current serialization surrogate provider. /// From a4fb873247a848f5accd20b21f7c73afadd33f5a Mon Sep 17 00:00:00 2001 From: Jeff Handley Date: Mon, 21 Jul 2025 10:53:05 -0700 Subject: [PATCH 07/12] Add missing tag --- .../System.Data.Common/src/System/Data/SQLTypes/SQLBinary.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLBinary.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLBinary.cs index 4371cad7ea1840..5771769ba908b0 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLBinary.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLBinary.cs @@ -461,7 +461,7 @@ public static XmlQualifiedName GetXsdType(XmlSchemaSet schemaSet) } /// - /// Wraps a byte array in a SqlBinary without copying the data. + /// Wraps a byte array in a without copying the data. /// /// The byte array to wrap. /// A that wraps the provided byte array. From fc46024e1b8452aa0fb5ca5b5604f8e3f792ff80 Mon Sep 17 00:00:00 2001 From: Jeff Handley Date: Mon, 21 Jul 2025 22:50:03 -0700 Subject: [PATCH 08/12] Revert to using where it already existed --- .../src/System/Security/Cryptography/Cose/CoseHeaderMap.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/libraries/System.Security.Cryptography.Cose/src/System/Security/Cryptography/Cose/CoseHeaderMap.cs b/src/libraries/System.Security.Cryptography.Cose/src/System/Security/Cryptography/Cose/CoseHeaderMap.cs index 25c38ffed3a602..73d858e6619f8d 100644 --- a/src/libraries/System.Security.Cryptography.Cose/src/System/Security/Cryptography/Cose/CoseHeaderMap.cs +++ b/src/libraries/System.Security.Cryptography.Cose/src/System/Security/Cryptography/Cose/CoseHeaderMap.cs @@ -181,12 +181,7 @@ public void Add(CoseHeaderLabel key, CoseHeaderValue value) /// public bool ContainsKey(CoseHeaderLabel key) => _headerParameters.ContainsKey(key); - /// - /// Attempts to get the value associated with the specified header label. - /// - /// The header label to search for. - /// When this method returns, contains the value associated with the specified key, if found; otherwise, the default value for the type of the value parameter. - /// if the header map contains an element with the specified key; otherwise, . + /// public bool TryGetValue(CoseHeaderLabel key, out CoseHeaderValue value) => _headerParameters.TryGetValue(key, out value); /// From bde0dfc957cda7034bec45a1b911d5249ee19e86 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 22 Jul 2025 08:02:09 +0000 Subject: [PATCH 09/12] Remove redundant X509SubjectAlternativeNameExtension documentation Co-authored-by: PranavSenthilnathan <12225508+PranavSenthilnathan@users.noreply.github.com> --- .../X509SubjectAlternativeNameExtension.cs | 28 ------------------- 1 file changed, 28 deletions(-) diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509SubjectAlternativeNameExtension.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509SubjectAlternativeNameExtension.cs index cea5a4d3a2d248..c6781214acc9c9 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509SubjectAlternativeNameExtension.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509SubjectAlternativeNameExtension.cs @@ -9,57 +9,33 @@ namespace System.Security.Cryptography.X509Certificates { - /// - /// Represents an X.509 Subject Alternative Name extension. - /// public sealed class X509SubjectAlternativeNameExtension : X509Extension { private List? _decoded; - /// - /// Initializes a new instance of the class. - /// public X509SubjectAlternativeNameExtension() : base(Oids.SubjectAltNameOid) { _decoded = new List(0); } - /// - /// Initializes a new instance of the class using encoded extension data. - /// - /// The encoded extension data. - /// A value indicating whether the extension is critical. public X509SubjectAlternativeNameExtension(byte[] rawData, bool critical = false) : base(Oids.SubjectAltNameOid, rawData, critical) { _decoded = Decode(RawData); } - /// - /// Initializes a new instance of the class using encoded extension data. - /// - /// The encoded extension data. - /// A value indicating whether the extension is critical. public X509SubjectAlternativeNameExtension(ReadOnlySpan rawData, bool critical = false) : base(Oids.SubjectAltNameOid, rawData, critical) { _decoded = Decode(RawData); } - /// - /// Copies the extension properties from the specified object. - /// - /// The object to copy from. public override void CopyFrom(AsnEncodedData asnEncodedData) { base.CopyFrom(asnEncodedData); _decoded = null; } - /// - /// Enumerates the DNS names contained in the Subject Alternative Name extension. - /// - /// An enumerable collection of DNS names. public IEnumerable EnumerateDnsNames() { List decoded = (_decoded ??= Decode(RawData)); @@ -78,10 +54,6 @@ private static IEnumerable EnumerateDnsNames(List decode } } - /// - /// Enumerates the IP addresses contained in the Subject Alternative Name extension. - /// - /// An enumerable collection of IP addresses. public IEnumerable EnumerateIPAddresses() { List decoded = (_decoded ??= Decode(RawData)); From dce3b99e687b3d8e8aae33581543083cb7316cff Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 22 Jul 2025 15:34:38 +0000 Subject: [PATCH 10/12] Update TraceConfiguration summary to reference TraceSource with proper XML doc tags Co-authored-by: tarekgh <10833894+tarekgh@users.noreply.github.com> --- .../src/System/Diagnostics/TraceConfiguration.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System/Diagnostics/TraceConfiguration.cs b/src/libraries/System.Configuration.ConfigurationManager/src/System/Diagnostics/TraceConfiguration.cs index 042171f3824b71..27fa11cc8e7808 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System/Diagnostics/TraceConfiguration.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System/Diagnostics/TraceConfiguration.cs @@ -4,7 +4,7 @@ namespace System.Diagnostics { /// - /// Provides methods to register and configure tracing settings from configuration files. + /// Provides methods to register and configure tracing settings from configuration files to and related classes. /// public static class TraceConfiguration { From f327ce822d93cb1e446d7f72c684ccecc91c033c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 22 Jul 2025 16:06:56 +0000 Subject: [PATCH 11/12] Apply XML documentation feedback: improve cref tags, fix whitespace, and restore X509SubjectAlternativeNameExtension docs Co-authored-by: tarekgh <10833894+tarekgh@users.noreply.github.com> --- .../src/System/Data/SQLTypes/SQLDecimal.cs | 4 +-- .../src/System/Data/SQLTypes/SQLMoney.cs | 2 +- .../InitializingSwitchEventArgs.cs | 2 +- .../InitializingTraceSourceEventArgs.cs | 1 + .../Runtime/Serialization/DataContract.cs | 6 ++-- .../X509SubjectAlternativeNameExtension.cs | 28 +++++++++++++++++++ 6 files changed, 36 insertions(+), 7 deletions(-) diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDecimal.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDecimal.cs index 27941b713b84f7..b985e7ce88a186 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDecimal.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDecimal.cs @@ -1155,9 +1155,9 @@ private decimal ToDecimal() } /// - /// Writes the TDS representation of this to the specified destination. + /// Writes the TDS (Tabular Data Stream) representation of this to the specified destination. /// - /// The destination span to write the TDS value to. Must be at least 4 elements long. + /// The destination span to write the TDS (Tabular Data Stream) value to. Must be at least 4 elements long. /// The number of values written to the destination. /// Thrown when the is . /// Thrown when the destination span is too small. diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLMoney.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLMoney.cs index 874f7c5538d646..216769c6ea1abe 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLMoney.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLMoney.cs @@ -211,7 +211,7 @@ public override string ToString() /// /// Gets the TDS (Tabular Data Stream) representation of this value. /// - /// A long value representing the TDS representation. + /// A long value representing the TDS (Tabular Data Stream) representation. /// Thrown when the is . public long GetTdsValue() { diff --git a/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/InitializingSwitchEventArgs.cs b/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/InitializingSwitchEventArgs.cs index 970d3297eb209e..f277ea680e4e19 100644 --- a/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/InitializingSwitchEventArgs.cs +++ b/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/InitializingSwitchEventArgs.cs @@ -18,7 +18,7 @@ public InitializingSwitchEventArgs(Switch @switch) } /// - /// Gets the switch that is being initialized. + /// Gets the that is being initialized. /// public Switch Switch { get; } } diff --git a/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/InitializingTraceSourceEventArgs.cs b/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/InitializingTraceSourceEventArgs.cs index c9311f0cd70275..873234cc72d06e 100644 --- a/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/InitializingTraceSourceEventArgs.cs +++ b/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/InitializingTraceSourceEventArgs.cs @@ -21,6 +21,7 @@ public InitializingTraceSourceEventArgs(TraceSource traceSource) /// Gets the trace source that is being initialized. /// public TraceSource TraceSource { get; } + /// /// Gets or sets a value indicating whether the trace source was initialized from configuration. /// diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContract.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContract.cs index cf2ae22cf026e3..9f41125199f554 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContract.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContract.cs @@ -197,7 +197,7 @@ internal virtual object ReadXmlElement(XmlReaderDelegator xmlReader, XmlObjectSe } /// - /// Gets or sets a value indicating whether the data contract represents a value type. + /// Gets a value indicating whether the data contract represents a value type. /// public virtual bool IsValueType { @@ -206,7 +206,7 @@ public virtual bool IsValueType } /// - /// Gets or sets a value indicating whether the data contract is serialized by reference. + /// Gets a value indicating whether the data contract is serialized by reference. /// public virtual bool IsReference { @@ -215,7 +215,7 @@ public virtual bool IsReference } /// - /// Gets or sets the XML qualified name for the data contract. + /// Gets the XML qualified name for the data contract. /// public virtual XmlQualifiedName XmlName { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509SubjectAlternativeNameExtension.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509SubjectAlternativeNameExtension.cs index c6781214acc9c9..61dd5c2a8ed252 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509SubjectAlternativeNameExtension.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509SubjectAlternativeNameExtension.cs @@ -9,33 +9,57 @@ namespace System.Security.Cryptography.X509Certificates { + /// + /// Represents the Subject Alternative Name X.509 Extension (2.5.29.17). + /// public sealed class X509SubjectAlternativeNameExtension : X509Extension { private List? _decoded; + /// + /// Initializes a new instance of the class. + /// public X509SubjectAlternativeNameExtension() : base(Oids.SubjectAltNameOid) { _decoded = new List(0); } + /// + /// Initializes a new instance of the class from an encoded representation of the extension and an optional critical marker. + /// + /// The encoded data to use to create the extension. + /// if the extension is critical; otherwise, . The default is . public X509SubjectAlternativeNameExtension(byte[] rawData, bool critical = false) : base(Oids.SubjectAltNameOid, rawData, critical) { _decoded = Decode(RawData); } + /// + /// Initializes a new instance of the class from an encoded representation of the extension and an optional critical marker. + /// + /// The encoded data to use to create the extension. + /// if the extension is critical; otherwise, . The default is . public X509SubjectAlternativeNameExtension(ReadOnlySpan rawData, bool critical = false) : base(Oids.SubjectAltNameOid, rawData, critical) { _decoded = Decode(RawData); } + /// + /// Copies the extension properties of the specified object. + /// + /// The object whose extension properties to copy. public override void CopyFrom(AsnEncodedData asnEncodedData) { base.CopyFrom(asnEncodedData); _decoded = null; } + /// + /// Enumerates the alternative name entries with a DNS Name type identifier. + /// + /// An enumerable collection of alternative names with DNS Name type identifiers. public IEnumerable EnumerateDnsNames() { List decoded = (_decoded ??= Decode(RawData)); @@ -54,6 +78,10 @@ private static IEnumerable EnumerateDnsNames(List decode } } + /// + /// Enumerates the alternative name entries with an IP Address type identifier. + /// + /// An enumerable collection of alternative names with IP Address type identifiers. public IEnumerable EnumerateIPAddresses() { List decoded = (_decoded ??= Decode(RawData)); From 7590657894ca3b05e73f2004dfcf1a89739cd3ca Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 22 Jul 2025 16:31:47 +0000 Subject: [PATCH 12/12] Apply feedback from code review: update FieldTypeEncoder.CustomModifiers documentation Co-authored-by: tarekgh <10833894+tarekgh@users.noreply.github.com> --- .../System/Reflection/Metadata/Ecma335/Encoding/BlobEncoders.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/Ecma335/Encoding/BlobEncoders.cs b/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/Ecma335/Encoding/BlobEncoders.cs index 01bc51b0bd1f70..aeb6eae3bfb0df 100644 --- a/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/Ecma335/Encoding/BlobEncoders.cs +++ b/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/Ecma335/Encoding/BlobEncoders.cs @@ -425,7 +425,7 @@ public FieldTypeEncoder(BlobBuilder builder) } /// - /// Encodes custom modifiers for the field type. + /// Creates object that can be used to encode custom modifiers. /// /// A instance that can be used to encode custom modifiers. public CustomModifiersEncoder CustomModifiers()