From 0c449b6fe4120994fa8edf3240b728e667eada1d Mon Sep 17 00:00:00 2001 From: Bill Wagner Date: Fri, 30 May 2025 09:04:19 -0400 Subject: [PATCH] The actual output is different than proposed This PR updates the sample code and text output to match the current compiler output. --- .../extensions/Extension-API-docs.md | 71 ++++++++++--------- 1 file changed, 39 insertions(+), 32 deletions(-) diff --git a/meetings/working-groups/extensions/Extension-API-docs.md b/meetings/working-groups/extensions/Extension-API-docs.md index deaaed0295..690cbe2b36 100644 --- a/meetings/working-groups/extensions/Extension-API-docs.md +++ b/meetings/working-groups/extensions/Extension-API-docs.md @@ -155,23 +155,32 @@ The unspeakable skeleton provides the prototypes for the extension members and t See the following code and XML for an example of extension members and the resulting XML output. ```csharp -/// Summary for E -static class E -{ - /// Summary for extension block - /// Description for T - /// Description for t - extension(T t) + public static class E { - /// Summary for M - /// Description for U - /// Description for u - public void M(U u) => throw null!; - - /// Summary for P - public int P => 0; + /// + /// Represents a sequence of integers with additional operations. + /// + extension(IEnumerable sequence) + { + /// + /// Adds a value to each element in the sequence. + /// + /// + /// + public IEnumerable AddValue(int operand) + { + foreach (var item in sequence) + { + yield return item + operand; + } + } + + /// + /// Calculates the median value of the sequence. + /// + public int Median => 0; + } } -} ``` produces the following XML output: @@ -183,27 +192,25 @@ produces the following XML output: Test - + Summary for E - - Summary for extension block - Description for T - Description for t - - - Summary for M - Description for U - Description for u - - - Summary for P + + + Represents a sequence of integers with additional operations. + - - + + + Adds a value to each element in the sequence. + + + - - + + + Calculates the median value of the sequence. +