From 2576558d4a7d3eb81853e609e46cec22abc9666a Mon Sep 17 00:00:00 2001 From: Carlos Sanchez Lopez <1175054+carlossanlop@users.noreply.github.com> Date: Thu, 26 Sep 2019 10:28:25 -0700 Subject: [PATCH 1/4] Document System.Version (#3232) * Document System.Version * edits --- xml/System/Version.xml | 131 +++++++++++++++++++++++++++++------------ 1 file changed, 92 insertions(+), 39 deletions(-) diff --git a/xml/System/Version.xml b/xml/System/Version.xml index f4a9680c412..fdfdc663069 100644 --- a/xml/System/Version.xml +++ b/xml/System/Version.xml @@ -1418,10 +1418,26 @@ - To be added. - To be added. - To be added. - To be added. + A read-only span of characters that contains a version number to convert. + Converts the specified read-only span of characters that represents a version number to an equivalent object. + An object that is equivalent to the version number specified in the parameter. + + + + has fewer than two or more than four version components. + At least one component in is less than zero. + At least one component in is not an integer. + At least one component in represents a number that is greater than . @@ -1467,12 +1483,9 @@ ## Remarks The `input` parameter must have the following format: -``` +`major.minor[.build[.revision]]` -major.minor[.build[.revision]] -``` - - where *major*, *minor*, *build*, and *revision* are the string representations of the version number's four components: major version number, minor version number, build number, and revision number. Optional components are shown in square brackets ([ and ]). The components must appear in the specified order, and must be separated by periods. + where `major`, `minor`, `build`, and `revision` are the string representations of the version number's four components: major version number, minor version number, build number, and revision number, respectively. Optional components are shown in square brackets ([ and ]). The components must appear in the specified order and must be separated by periods. > [!IMPORTANT] > Because the string representation of a version number must conform to a recognized pattern, applications should always use exception handling when calling the method to parse user input. Alternatively, you can call the method to parse the string representation of a version number and return a value that indicates whether the parse operation succeeded. @@ -1489,10 +1502,8 @@ major.minor[.build[.revision]] ]]> - - is . - - has fewer than two or more than four version components. + is . + has fewer than two or more than four version components. At least one component in is less than zero. At least one component in is not an integer. At least one component in represents a number that is greater than . @@ -1584,10 +1595,41 @@ major.minor[.build[.revision]] - To be added. - To be added. - To be added. - To be added. + An object to compare, or . + Compares the current object to a specified object and returns an indication of their relative values. + A signed integer that indicates the relative values of the two objects, as shown in the following table: + + + Return value + Meaning + + + Less than zero + The current object is a version before . + + + Zero + The current object is the same version as . + + + Greater than zero + The current object is a version subsequent to . + +-or- + + is . + + + + + + @@ -1749,10 +1791,10 @@ major.minor[.build[.revision]] - To be added. - To be added. - To be added. - To be added. + When this method returns, the formatted version in the span of characters. + When this method returns, the number of chars that were written in . + Tries to format this version instance into a span of characters. + if the formatting was successful; otherwise, . To be added. @@ -1784,11 +1826,11 @@ major.minor[.build[.revision]] - To be added. - To be added. - To be added. - To be added. - To be added. + When this method returns, the formatted version in the span of characters. + The number of components to return. This value ranges from 0 to 4. + When this method returns, the number of chars that were written in . + Tries to format this version instance into a span of characters. + if the formatting was successful; otherwise, . To be added. @@ -1819,11 +1861,26 @@ major.minor[.build[.revision]] - To be added. - To be added. - To be added. - To be added. - To be added. + A read-only span of characters that contains a version number to convert. + When this method returns, the equivalent of the number that is contained in , if the conversion succeeded. If is , , or if the conversion fails, is when the method returns. + Tries to convert the specified read-only span of characters representing a version number to an equivalent object, and returns a value that indicates whether the conversion succeeded. + if the parameter was converted successfully; otherwise, . + + + method, except that it doesn't throw an exception if the conversion fails. Instead, it returns `false` if `input` is `null`, has fewer than two or more than four components, has at least one component that is not an integer, has at least one component that is less than zero, or has at least one component that is greater than . + +For the parse operation to succeed, the `input` parameter must be in the following format: + +`major.minor[.build[.revision]]` + +where `major`, `minor`, `build`, and `revision` are the string representations of the version number's four components: major version number, minor version number, build number, and revision number, respectively. Optional components are shown in square brackets ([ and ]). The components must appear in order and must be separated by periods. + + ]]> + @@ -1864,22 +1921,18 @@ major.minor[.build[.revision]] A string that contains a version number to convert. When this method returns, contains the equivalent of the number that is contained in , if the conversion succeeded. If is , , or if the conversion fails, is when the method returns. Tries to convert the string representation of a version number to an equivalent object, and returns a value that indicates whether the conversion succeeded. - - if the parameter was converted successfully; otherwise, . + if the parameter was converted successfully; otherwise, . method is similar to the method, except that it does not throw an exception if the conversion fails. Instead, it returns `false` if `input` is null, has fewer than two or more than four components, has at least one component that is not an integer, has at least one component that is less than zero, or has at least one component that is greater than . + The `TryParse` method is similar to the method, except that it doesn't throw an exception if the conversion fails. Instead, it returns `false` if `input` is `null`, has fewer than two or more than four components, has at least one component that is not an integer, has at least one component that is less than zero, or has at least one component that is greater than . For the parse operation to succeed, the `input` parameter must be in the following format: -``` - -major.minor[.build[.revision]] -``` +`major.minor[.build[.revision]]` - where *major*, *minor*, *build*, and *revision* are the string representations of the version number's four components: major version number, minor version number, build number, and revision number. Optional components are shown in square brackets ([ and ]). The components must appear in order, and must be separated by periods. + where `major`, `minor`, `build`, and `revision` are the string representations of the version number's four components: major version number, minor version number, build number, and revision number, respectively. Optional components are shown in square brackets ([ and ]). The components must appear in order and must be separated by periods. From 4f9dbb8474e1972f342b252a8d207e1155f41479 Mon Sep 17 00:00:00 2001 From: Mauricio de los Santos Date: Thu, 26 Sep 2019 14:32:07 -0300 Subject: [PATCH 2/4] L124989: Fixing CDATA formatting (#3243) --- xml/System.Reflection/AssemblyHashAlgorithm.xml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/xml/System.Reflection/AssemblyHashAlgorithm.xml b/xml/System.Reflection/AssemblyHashAlgorithm.xml index 03beafc99ce..6e2bf199710 100644 --- a/xml/System.Reflection/AssemblyHashAlgorithm.xml +++ b/xml/System.Reflection/AssemblyHashAlgorithm.xml @@ -46,8 +46,7 @@ Retrieves the MD5 message-digest algorithm. - - A mask indicating that there is no hash algorithm. - - Date: Thu, 26 Sep 2019 14:47:12 -0500 Subject: [PATCH 3/4] Correct JsonNamingPolicy docs (#3244) This removes the incorrect docs about JsonNamingPolicy being an enum and indicates the behavior if the property is null, as described in aspnet/AspNetCore#10156. --- xml/System.Text.Json/JsonSerializerOptions.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xml/System.Text.Json/JsonSerializerOptions.xml b/xml/System.Text.Json/JsonSerializerOptions.xml index 398d30b7c3b..00541713ae9 100644 --- a/xml/System.Text.Json/JsonSerializerOptions.xml +++ b/xml/System.Text.Json/JsonSerializerOptions.xml @@ -338,8 +338,8 @@ There is a performance cost associated with case-insensitie comparison (that is, System.Text.Json.JsonNamingPolicy - Gets or sets a value that specifies the policy used to convert a property's name on an object to another format, such as camel-casing. - One of the enum values from . + Gets or sets a value that specifies the policy used to convert a property's name on an object to another format, such as camel-casing, or to leave property names unchanged. + A property naming policy, or to leave property names unchanged. Date: Thu, 26 Sep 2019 22:49:50 -0700 Subject: [PATCH 4/4] Document namespace System.Threading.Tasks.Sources (#3231) --- xml/ns-System.Threading.Tasks.Sources.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/ns-System.Threading.Tasks.Sources.xml b/xml/ns-System.Threading.Tasks.Sources.xml index 9b1ab9bd0ab..53e9aa03317 100644 --- a/xml/ns-System.Threading.Tasks.Sources.xml +++ b/xml/ns-System.Threading.Tasks.Sources.xml @@ -1,6 +1,6 @@ - To be added. + Provides types for creating and optimized to minimize allocations. The and interfaces can be implemented on objects used to provide the backing implementations for and , and can be used to implement the core logic necessary to support the task lifecycle. These are advanced types and need only be used in specialized situations where performance is paramount. To be added.