Skip to content

Commit 16c2374

Browse files
authored
Fix minor issues in [Typed]Results docs (#55747)
* Fix repeated "the the" in `TypedResults` docs * Remove misleading comment from `TypedResults.Stream` As pointed out in #47557, the comment does not match the actual behavior. * Fix repeated "the the" in `Results` docs * Remove misleading comment from `Results.Stream`
1 parent 35e82e6 commit 16c2374

File tree

2 files changed

+9
-17
lines changed

2 files changed

+9
-17
lines changed

src/Http/Http.Results/src/Results.cs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ public static IResult Bytes(
359359
/// </summary>
360360
/// <param name="fileStream">The <see cref="System.IO.Stream"/> with the contents of the file.</param>
361361
/// <param name="contentType">The Content-Type of the file.</param>
362-
/// <param name="fileDownloadName">The the file name to be used in the <c>Content-Disposition</c> header.</param>
362+
/// <param name="fileDownloadName">The file name to be used in the <c>Content-Disposition</c> header.</param>
363363
/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.
364364
/// Used to configure the <c>Last-Modified</c> response header and perform conditional range requests.</param>
365365
/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> to be configure the <c>ETag</c> response header
@@ -390,7 +390,7 @@ public static IResult File(
390390
/// </summary>
391391
/// <param name="stream">The <see cref="System.IO.Stream"/> to write to the response.</param>
392392
/// <param name="contentType">The <c>Content-Type</c> of the response. Defaults to <c>application/octet-stream</c>.</param>
393-
/// <param name="fileDownloadName">The the file name to be used in the <c>Content-Disposition</c> header.</param>
393+
/// <param name="fileDownloadName">The file name to be used in the <c>Content-Disposition</c> header.</param>
394394
/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.
395395
/// Used to configure the <c>Last-Modified</c> response header and perform conditional range requests.</param>
396396
/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> to be configure the <c>ETag</c> response header
@@ -418,7 +418,7 @@ public static IResult Stream(
418418
/// </summary>
419419
/// <param name="pipeReader">The <see cref="System.IO.Pipelines.PipeReader"/> to write to the response.</param>
420420
/// <param name="contentType">The <c>Content-Type</c> of the response. Defaults to <c>application/octet-stream</c>.</param>
421-
/// <param name="fileDownloadName">The the file name to be used in the <c>Content-Disposition</c> header.</param>
421+
/// <param name="fileDownloadName">The file name to be used in the <c>Content-Disposition</c> header.</param>
422422
/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.
423423
/// Used to configure the <c>Last-Modified</c> response header and perform conditional range requests.</param>
424424
/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> to be configure the <c>ETag</c> response header
@@ -439,14 +439,10 @@ public static IResult Stream(
439439

440440
/// <summary>
441441
/// Allows writing directly to the response body.
442-
/// <para>
443-
/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or
444-
/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable).
445-
/// </para>
446442
/// </summary>
447443
/// <param name="streamWriterCallback">The callback that allows users to write directly to the response body.</param>
448444
/// <param name="contentType">The <c>Content-Type</c> of the response. Defaults to <c>application/octet-stream</c>.</param>
449-
/// <param name="fileDownloadName">The the file name to be used in the <c>Content-Disposition</c> header.</param>
445+
/// <param name="fileDownloadName">The file name to be used in the <c>Content-Disposition</c> header.</param>
450446
/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.
451447
/// Used to configure the <c>Last-Modified</c> response header and perform conditional range requests.</param>
452448
/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> to be configure the <c>ETag</c> response header
@@ -782,7 +778,7 @@ private static void CopyExtensions(IDictionary<string, object?>? extensions, Htt
782778

783779
/// <summary>
784780
/// Produces a <see cref="StatusCodes.Status201Created"/> response.
785-
/// </summary>
781+
/// </summary>
786782
/// <returns>The created <see cref="IResult"/> for the response.</returns>
787783
public static IResult Created()
788784
=> TypedResults.Created();

src/Http/Http.Results/src/TypedResults.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ public static FileContentHttpResult Bytes(
352352
/// </remarks>
353353
/// <param name="fileStream">The <see cref="System.IO.Stream"/> with the contents of the file.</param>
354354
/// <param name="contentType">The Content-Type of the file.</param>
355-
/// <param name="fileDownloadName">The the file name to be used in the <c>Content-Disposition</c> header.</param>
355+
/// <param name="fileDownloadName">The file name to be used in the <c>Content-Disposition</c> header.</param>
356356
/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.
357357
/// Used to configure the <c>Last-Modified</c> response header and perform conditional range requests.</param>
358358
/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> to be configure the <c>ETag</c> response header
@@ -393,7 +393,7 @@ public static FileStreamHttpResult File(
393393
/// </remarks>
394394
/// <param name="stream">The <see cref="System.IO.Stream"/> to write to the response.</param>
395395
/// <param name="contentType">The <c>Content-Type</c> of the response. Defaults to <c>application/octet-stream</c>.</param>
396-
/// <param name="fileDownloadName">The the file name to be used in the <c>Content-Disposition</c> header.</param>
396+
/// <param name="fileDownloadName">The file name to be used in the <c>Content-Disposition</c> header.</param>
397397
/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.
398398
/// Used to configure the <c>Last-Modified</c> response header and perform conditional range requests.</param>
399399
/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> to be configure the <c>ETag</c> response header
@@ -431,7 +431,7 @@ public static FileStreamHttpResult Stream(
431431
/// </remarks>
432432
/// <param name="pipeReader">The <see cref="System.IO.Pipelines.PipeReader"/> to write to the response.</param>
433433
/// <param name="contentType">The <c>Content-Type</c> of the response. Defaults to <c>application/octet-stream</c>.</param>
434-
/// <param name="fileDownloadName">The the file name to be used in the <c>Content-Disposition</c> header.</param>
434+
/// <param name="fileDownloadName">The file name to be used in the <c>Content-Disposition</c> header.</param>
435435
/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.
436436
/// Used to configure the <c>Last-Modified</c> response header and perform conditional range requests.</param>
437437
/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> to be configure the <c>ETag</c> response header
@@ -459,14 +459,10 @@ public static FileStreamHttpResult Stream(
459459

460460
/// <summary>
461461
/// Allows writing directly to the response body.
462-
/// <para>
463-
/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or
464-
/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable).
465-
/// </para>
466462
/// </summary>
467463
/// <param name="streamWriterCallback">The callback that allows users to write directly to the response body.</param>
468464
/// <param name="contentType">The <c>Content-Type</c> of the response. Defaults to <c>application/octet-stream</c>.</param>
469-
/// <param name="fileDownloadName">The the file name to be used in the <c>Content-Disposition</c> header.</param>
465+
/// <param name="fileDownloadName">The file name to be used in the <c>Content-Disposition</c> header.</param>
470466
/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.
471467
/// Used to configure the <c>Last-Modified</c> response header and perform conditional range requests.</param>
472468
/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> to be configure the <c>ETag</c> response header

0 commit comments

Comments
 (0)