Add Http Response Codes to doc comments (#5867)

This commit is contained in:
Ryan Brandenburg 2017-03-06 10:00:07 -08:00 committed by GitHub
parent 00c38fca59
commit de1d0919e5
1 changed files with 152 additions and 108 deletions

View File

@ -258,7 +258,8 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates a <see cref="ContentResult"/> object by specifying a <paramref name="content"/> string.
/// Creates a <see cref="ContentResult"/> object with <see cref="StatusCodes.Status200OK"/> by specifying a
/// <paramref name="content"/> string.
/// </summary>
/// <param name="content">The content to write to the response.</param>
/// <returns>The created <see cref="ContentResult"/> object for the response.</returns>
@ -269,8 +270,8 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates a <see cref="ContentResult"/> object by specifying a <paramref name="content"/> string
/// and a content type.
/// Creates a <see cref="ContentResult"/> object with <see cref="StatusCodes.Status200OK"/> by specifying a
/// <paramref name="content"/> string and a content type.
/// </summary>
/// <param name="content">The content to write to the response.</param>
/// <param name="contentType">The content type (MIME type).</param>
@ -282,8 +283,8 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates a <see cref="ContentResult"/> object by specifying a <paramref name="content"/> string,
/// a <paramref name="contentType"/>, and <paramref name="contentEncoding"/>.
/// Creates a <see cref="ContentResult"/> object with <see cref="StatusCodes.Status200OK"/> by specifying a
/// <paramref name="content"/> string, a <paramref name="contentType"/>, and <paramref name="contentEncoding"/>.
/// </summary>
/// <param name="content">The content to write to the response.</param>
/// <param name="contentType">The content type (MIME type).</param>
@ -302,8 +303,8 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates a <see cref="ContentResult"/> object by specifying a <paramref name="content"/>
/// string and a <paramref name="contentType"/>.
/// Creates a <see cref="ContentResult"/> object with <see cref="StatusCodes.Status200OK"/> by specifying a
/// <paramref name="content"/> string and a <paramref name="contentType"/>.
/// </summary>
/// <param name="content">The content to write to the response.</param>
/// <param name="contentType">The content type (MIME type).</param>
@ -321,17 +322,18 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates a <see cref="NoContentResult"/> object that produces an empty No Content (204) response.
/// Creates a <see cref="NoContentResult"/> object that produces an empty
/// <see cref="StatusCodes.Status204NoContent"/> response.
/// </summary>
/// <returns>The created <see cref="NoContentResult"/> object for the response.</returns>
[NonAction]
public virtual NoContentResult NoContent()
{
{
return new NoContentResult();
}
/// <summary>
/// Creates a <see cref="OkResult"/> object that produces an empty OK (200) response.
/// Creates a <see cref="OkResult"/> object that produces an empty <see cref="StatusCodes.Status200OK"/> response.
/// </summary>
/// <returns>The created <see cref="OkResult"/> for the response.</returns>
[NonAction]
@ -341,7 +343,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates an <see cref="OkObjectResult"/> object that produces an OK (200) response.
/// Creates an <see cref="OkObjectResult"/> object that produces an <see cref="StatusCodes.Status200OK"/> response.
/// </summary>
/// <param name="value">The content value to format in the entity body.</param>
/// <returns>The created <see cref="OkObjectResult"/> for the response.</returns>
@ -352,7 +354,8 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates a <see cref="RedirectResult"/> object that redirects to the specified <paramref name="url"/>.
/// Creates a <see cref="RedirectResult"/> object that redirects (<see cref="StatusCodes.Status302Found"/>)
/// to the specified <paramref name="url"/>.
/// </summary>
/// <param name="url">The URL to redirect to.</param>
/// <returns>The created <see cref="RedirectResult"/> for the response.</returns>
@ -369,7 +372,7 @@ namespace Microsoft.AspNetCore.Mvc
/// <summary>
/// Creates a <see cref="RedirectResult"/> object with <see cref="RedirectResult.Permanent"/> set to true
/// using the specified <paramref name="url"/>.
/// (<see cref="StatusCodes.Status301MovedPermanently"/>) using the specified <paramref name="url"/>.
/// </summary>
/// <param name="url">The URL to redirect to.</param>
/// <returns>The created <see cref="RedirectResult"/> for the response.</returns>
@ -385,8 +388,8 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates a <see cref="LocalRedirectResult"/> object that redirects to
/// the specified local <paramref name="localUrl"/>.
/// Creates a <see cref="LocalRedirectResult"/> object that redirects
/// (<see cref="StatusCodes.Status302Found"/>) to the specified local <paramref name="localUrl"/>.
/// </summary>
/// <param name="localUrl">The local URL to redirect to.</param>
/// <returns>The created <see cref="LocalRedirectResult"/> for the response.</returns>
@ -402,8 +405,8 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates a <see cref="LocalRedirectResult"/> object with <see cref="LocalRedirectResult.Permanent"/>
/// set to true using the specified <paramref name="localUrl"/>.
/// Creates a <see cref="LocalRedirectResult"/> object with <see cref="LocalRedirectResult.Permanent"/> set to
/// true (<see cref="StatusCodes.Status301MovedPermanently"/>) using the specified <paramref name="localUrl"/>.
/// </summary>
/// <param name="localUrl">The local URL to redirect to.</param>
/// <returns>The created <see cref="LocalRedirectResult"/> for the response.</returns>
@ -419,7 +422,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Redirects to the specified action using the <paramref name="actionName"/>.
/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified action using the <paramref name="actionName"/>.
/// </summary>
/// <param name="actionName">The name of the action.</param>
/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns>
@ -430,8 +433,8 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Redirects to the specified action using the <paramref name="actionName"/>
/// and <paramref name="routeValues"/>.
/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified action using the
/// <paramref name="actionName"/> and <paramref name="routeValues"/>.
/// </summary>
/// <param name="actionName">The name of the action.</param>
/// <param name="routeValues">The parameters for a route.</param>
@ -443,8 +446,8 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Redirects to the specified action using the <paramref name="actionName"/>
/// and the <paramref name="controllerName"/>.
/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified action using the
/// <paramref name="actionName"/> and the <paramref name="controllerName"/>.
/// </summary>
/// <param name="actionName">The name of the action.</param>
/// <param name="controllerName">The name of the controller.</param>
@ -456,8 +459,8 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Redirects to the specified action using the specified <paramref name="actionName"/>,
/// <paramref name="controllerName"/>, and <paramref name="routeValues"/>.
/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified action using the specified
/// <paramref name="actionName"/>, <paramref name="controllerName"/>, and <paramref name="routeValues"/>.
/// </summary>
/// <param name="actionName">The name of the action.</param>
/// <param name="controllerName">The name of the controller.</param>
@ -473,8 +476,8 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Redirects to the specified action using the specified <paramref name="actionName"/>,
/// <paramref name="controllerName"/>, and <paramref name="fragment"/>.
/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified action using the specified
/// <paramref name="actionName"/>, <paramref name="controllerName"/>, and <paramref name="fragment"/>.
/// </summary>
/// <param name="actionName">The name of the action.</param>
/// <param name="controllerName">The name of the controller.</param>
@ -490,9 +493,8 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Redirects to the specified action using the specified <paramref name="actionName"/>,
/// <paramref name="controllerName"/>, <paramref name="routeValues"/>,
/// and <paramref name="fragment"/>.
/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified action using the specified <paramref name="actionName"/>,
/// <paramref name="controllerName"/>, <paramref name="routeValues"/>, and <paramref name="fragment"/>.
/// </summary>
/// <param name="actionName">The name of the action.</param>
/// <param name="controllerName">The name of the controller.</param>
@ -513,8 +515,8 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Redirects to the specified action with <see cref="RedirectToActionResult.Permanent"/> set to true
/// using the specified <paramref name="actionName"/>.
/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified action with
/// <see cref="RedirectToActionResult.Permanent"/> set to true using the specified <paramref name="actionName"/>.
/// </summary>
/// <param name="actionName">The name of the action.</param>
/// <returns>The created <see cref="RedirectToActionResult"/> for the response.</returns>
@ -525,8 +527,9 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Redirects to the specified action with <see cref="RedirectToActionResult.Permanent"/> set to true
/// using the specified <paramref name="actionName"/> and <paramref name="routeValues"/>.
/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified action with
/// <see cref="RedirectToActionResult.Permanent"/> set to true using the specified <paramref name="actionName"/>
/// and <paramref name="routeValues"/>.
/// </summary>
/// <param name="actionName">The name of the action.</param>
/// <param name="routeValues">The parameters for a route.</param>
@ -538,8 +541,9 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Redirects to the specified action with <see cref="RedirectToActionResult.Permanent"/> set to true
/// using the specified <paramref name="actionName"/> and <paramref name="controllerName"/>.
/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified action with
/// <see cref="RedirectToActionResult.Permanent"/> set to true using the specified <paramref name="actionName"/>
/// and <paramref name="controllerName"/>.
/// </summary>
/// <param name="actionName">The name of the action.</param>
/// <param name="controllerName">The name of the controller.</param>
@ -551,8 +555,8 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Redirects to the specified action with <see cref="RedirectToActionResult.Permanent"/> set to true
/// using the specified <paramref name="actionName"/>,
/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified action with
/// <see cref="RedirectToActionResult.Permanent"/> set to true using the specified <paramref name="actionName"/>,
/// <paramref name="controllerName"/>, and <paramref name="fragment"/>.
/// </summary>
/// <param name="actionName">The name of the action.</param>
@ -569,9 +573,9 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Redirects to the specified action with <see cref="RedirectToActionResult.Permanent"/> set to true
/// using the specified <paramref name="actionName"/>, <paramref name="controllerName"/>,
/// and <paramref name="routeValues"/>.
/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified action with
/// <see cref="RedirectToActionResult.Permanent"/> set to true using the specified <paramref name="actionName"/>,
/// <paramref name="controllerName"/>, and <paramref name="routeValues"/>.
/// </summary>
/// <param name="actionName">The name of the action.</param>
/// <param name="controllerName">The name of the controller.</param>
@ -587,9 +591,9 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Redirects to the specified action with <see cref="RedirectToActionResult.Permanent"/> set to true
/// using the specified <paramref name="actionName"/>, <paramref name="controllerName"/>,
/// <paramref name="routeValues"/>, and <paramref name="fragment"/>.
/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified action with
/// <see cref="RedirectToActionResult.Permanent"/> set to true using the specified <paramref name="actionName"/>,
/// <paramref name="controllerName"/>, <paramref name="routeValues"/>, and <paramref name="fragment"/>.
/// </summary>
/// <param name="actionName">The name of the action.</param>
/// <param name="controllerName">The name of the controller.</param>
@ -615,7 +619,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Redirects to the specified route using the specified <paramref name="routeName"/>.
/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified route using the specified <paramref name="routeName"/>.
/// </summary>
/// <param name="routeName">The name of the route.</param>
/// <returns>The created <see cref="RedirectToRouteResult"/> for the response.</returns>
@ -626,7 +630,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Redirects to the specified route using the specified <paramref name="routeValues"/>.
/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified route using the specified <paramref name="routeValues"/>.
/// </summary>
/// <param name="routeValues">The parameters for a route.</param>
/// <returns>The created <see cref="RedirectToRouteResult"/> for the response.</returns>
@ -637,8 +641,8 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Redirects to the specified route using the specified <paramref name="routeName"/>
/// and <paramref name="routeValues"/>.
/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified route using the specified
/// <paramref name="routeName"/> and <paramref name="routeValues"/>.
/// </summary>
/// <param name="routeName">The name of the route.</param>
/// <param name="routeValues">The parameters for a route.</param>
@ -650,8 +654,8 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Redirects to the specified route using the specified <paramref name="routeName"/>
/// and <paramref name="fragment"/>.
/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified route using the specified
/// <paramref name="routeName"/> and <paramref name="fragment"/>.
/// </summary>
/// <param name="routeName">The name of the route.</param>
/// <param name="fragment">The fragment to add to the URL.</param>
@ -663,8 +667,8 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Redirects to the specified route using the specified <paramref name="routeName"/>,
/// <paramref name="routeValues"/>, and <paramref name="fragment"/>.
/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified route using the specified
/// <paramref name="routeName"/>, <paramref name="routeValues"/>, and <paramref name="fragment"/>.
/// </summary>
/// <param name="routeName">The name of the route.</param>
/// <param name="routeValues">The parameters for a route.</param>
@ -683,8 +687,8 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Redirects to the specified route with <see cref="RedirectToRouteResult.Permanent"/> set to true
/// using the specified <paramref name="routeName"/>.
/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified route with
/// <see cref="RedirectToRouteResult.Permanent"/> set to true using the specified <paramref name="routeName"/>.
/// </summary>
/// <param name="routeName">The name of the route.</param>
/// <returns>The created <see cref="RedirectToRouteResult"/> for the response.</returns>
@ -695,8 +699,8 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Redirects to the specified route with <see cref="RedirectToRouteResult.Permanent"/> set to true
/// using the specified <paramref name="routeValues"/>.
/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified route with
/// <see cref="RedirectToRouteResult.Permanent"/> set to true using the specified <paramref name="routeValues"/>.
/// </summary>
/// <param name="routeValues">The parameters for a route.</param>
/// <returns>The created <see cref="RedirectToRouteResult"/> for the response.</returns>
@ -707,8 +711,9 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Redirects to the specified route with <see cref="RedirectToRouteResult.Permanent"/> set to true
/// using the specified <paramref name="routeName"/> and <paramref name="routeValues"/>.
/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified route with
/// <see cref="RedirectToRouteResult.Permanent"/> set to true using the specified <paramref name="routeName"/>
/// and <paramref name="routeValues"/>.
/// </summary>
/// <param name="routeName">The name of the route.</param>
/// <param name="routeValues">The parameters for a route.</param>
@ -720,8 +725,9 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Redirects to the specified route with <see cref="RedirectToRouteResult.Permanent"/> set to true
/// using the specified <paramref name="routeName"/> and <paramref name="fragment"/>.
/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified route with
/// <see cref="RedirectToRouteResult.Permanent"/> set to true using the specified <paramref name="routeName"/>
/// and <paramref name="fragment"/>.
/// </summary>
/// <param name="routeName">The name of the route.</param>
/// <param name="fragment">The fragment to add to the URL.</param>
@ -733,9 +739,9 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Redirects to the specified route with <see cref="RedirectToRouteResult.Permanent"/> set to true
/// using the specified <paramref name="routeName"/>, <paramref name="routeValues"/>,
/// and <paramref name="fragment"/>.
/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified route with
/// <see cref="RedirectToRouteResult.Permanent"/> set to true using the specified <paramref name="routeName"/>,
/// <paramref name="routeValues"/>, and <paramref name="fragment"/>.
/// </summary>
/// <param name="routeName">The name of the route.</param>
/// <param name="routeValues">The parameters for a route.</param>
@ -754,8 +760,8 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Returns a file with the specified <paramref name="fileContents" /> as content and the
/// specified <paramref name="contentType" /> as the Content-Type.
/// Returns a file with the specified <paramref name="fileContents" /> as content
/// (<see cref="StatusCodes.Status200OK"/>) and the specified <paramref name="contentType" /> as the Content-Type.
/// </summary>
/// <param name="fileContents">The file contents.</param>
/// <param name="contentType">The Content-Type of the file.</param>
@ -767,7 +773,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Returns a file with the specified <paramref name="fileContents" /> as content, the
/// Returns a file with the specified <paramref name="fileContents" /> as content (<see cref="StatusCodes.Status200OK"/>), the
/// specified <paramref name="contentType" /> as the Content-Type and the
/// specified <paramref name="fileDownloadName" /> as the suggested file name.
/// </summary>
@ -782,8 +788,8 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Returns a file in the specified <paramref name="fileStream" /> with the
/// specified <paramref name="contentType" /> as the Content-Type.
/// Returns a file in the specified <paramref name="fileStream" /> (<see cref="StatusCodes.Status200OK"/>)
/// with the specified <paramref name="contentType" /> as the Content-Type.
/// </summary>
/// <param name="fileStream">The <see cref="Stream"/> with the contents of the file.</param>
/// <param name="contentType">The Content-Type of the file.</param>
@ -795,7 +801,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Returns a file in the specified <paramref name="fileStream" /> with the
/// Returns a file in the specified <paramref name="fileStream" /> (<see cref="StatusCodes.Status200OK"/>) with the
/// specified <paramref name="contentType" /> as the Content-Type and the
/// specified <paramref name="fileDownloadName" /> as the suggested file name.
/// </summary>
@ -810,7 +816,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Returns the file specified by <paramref name="virtualPath" /> with the
/// Returns the file specified by <paramref name="virtualPath" /> (<see cref="StatusCodes.Status200OK"/>) with the
/// specified <paramref name="contentType" /> as the Content-Type.
/// </summary>
/// <param name="virtualPath">The virtual path of the file to be returned.</param>
@ -823,7 +829,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Returns the file specified by <paramref name="virtualPath" /> with the
/// Returns the file specified by <paramref name="virtualPath" /> (<see cref="StatusCodes.Status200OK"/>) with the
/// specified <paramref name="contentType" /> as the Content-Type and the
/// specified <paramref name="fileDownloadName" /> as the suggested file name.
/// </summary>
@ -838,7 +844,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Returns the file specified by <paramref name="physicalPath" /> with the
/// Returns the file specified by <paramref name="physicalPath" /> (<see cref="StatusCodes.Status200OK"/>) with the
/// specified <paramref name="contentType" /> as the Content-Type.
/// </summary>
/// <param name="physicalPath">The physical path of the file to be returned.</param>
@ -851,7 +857,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Returns the file specified by <paramref name="physicalPath" /> with the
/// Returns the file specified by <paramref name="physicalPath" /> (<see cref="StatusCodes.Status200OK"/>) with the
/// specified <paramref name="contentType" /> as the Content-Type and the
/// specified <paramref name="fileDownloadName" /> as the suggested file name.
/// </summary>
@ -869,7 +875,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates an <see cref="UnauthorizedResult"/> that produces an Unauthorized (401) response.
/// Creates an <see cref="UnauthorizedResult"/> that produces an <see cref="StatusCodes.Status401Unauthorized"/> response.
/// </summary>
/// <returns>The created <see cref="UnauthorizedResult"/> for the response.</returns>
[NonAction]
@ -879,7 +885,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates an <see cref="NotFoundResult"/> that produces a Not Found (404) response.
/// Creates an <see cref="NotFoundResult"/> that produces a <see cref="StatusCodes.Status404NotFound"/> response.
/// </summary>
/// <returns>The created <see cref="NotFoundResult"/> for the response.</returns>
[NonAction]
@ -889,7 +895,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates an <see cref="NotFoundObjectResult"/> that produces a Not Found (404) response.
/// Creates an <see cref="NotFoundObjectResult"/> that produces a <see cref="StatusCodes.Status404NotFound"/> response.
/// </summary>
/// <returns>The created <see cref="NotFoundObjectResult"/> for the response.</returns>
[NonAction]
@ -899,7 +905,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates an <see cref="BadRequestResult"/> that produces a Bad Request (400) response.
/// Creates an <see cref="BadRequestResult"/> that produces a <see cref="StatusCodes.Status400BadRequest"/> response.
/// </summary>
/// <returns>The created <see cref="BadRequestResult"/> for the response.</returns>
[NonAction]
@ -909,7 +915,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates an <see cref="BadRequestObjectResult"/> that produces a Bad Request (400) response.
/// Creates an <see cref="BadRequestObjectResult"/> that produces a <see cref="StatusCodes.Status400BadRequest"/> response.
/// </summary>
/// <returns>The created <see cref="BadRequestObjectResult"/> for the response.</returns>
[NonAction]
@ -919,7 +925,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates an <see cref="BadRequestObjectResult"/> that produces a Bad Request (400) response.
/// Creates an <see cref="BadRequestObjectResult"/> that produces a <see cref="StatusCodes.Status400BadRequest"/> response.
/// </summary>
/// <returns>The created <see cref="BadRequestObjectResult"/> for the response.</returns>
[NonAction]
@ -934,7 +940,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates a <see cref="CreatedResult"/> object that produces a Created (201) response.
/// Creates a <see cref="CreatedResult"/> object that produces a <see cref="StatusCodes.Status201Created"/> response.
/// </summary>
/// <param name="uri">The URI at which the content has been created.</param>
/// <param name="value">The content value to format in the entity body.</param>
@ -951,7 +957,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates a <see cref="CreatedResult"/> object that produces a Created (201) response.
/// Creates a <see cref="CreatedResult"/> object that produces a <see cref="StatusCodes.Status201Created"/> response.
/// </summary>
/// <param name="uri">The URI at which the content has been created.</param>
/// <param name="value">The content value to format in the entity body.</param>
@ -968,7 +974,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates a <see cref="CreatedAtActionResult"/> object that produces a Created (201) response.
/// Creates a <see cref="CreatedAtActionResult"/> object that produces a <see cref="StatusCodes.Status201Created"/> response.
/// </summary>
/// <param name="actionName">The name of the action to use for generating the URL.</param>
/// <param name="value">The content value to format in the entity body.</param>
@ -980,7 +986,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates a <see cref="CreatedAtActionResult"/> object that produces a Created (201) response.
/// Creates a <see cref="CreatedAtActionResult"/> object that produces a <see cref="StatusCodes.Status201Created"/> response.
/// </summary>
/// <param name="actionName">The name of the action to use for generating the URL.</param>
/// <param name="routeValues">The route data to use for generating the URL.</param>
@ -993,7 +999,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates a <see cref="CreatedAtActionResult"/> object that produces a Created (201) response.
/// Creates a <see cref="CreatedAtActionResult"/> object that produces a <see cref="StatusCodes.Status201Created"/> response.
/// </summary>
/// <param name="actionName">The name of the action to use for generating the URL.</param>
/// <param name="controllerName">The name of the controller to use for generating the URL.</param>
@ -1011,7 +1017,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates a <see cref="CreatedAtRouteResult"/> object that produces a Created (201) response.
/// Creates a <see cref="CreatedAtRouteResult"/> object that produces a <see cref="StatusCodes.Status201Created"/> response.
/// </summary>
/// <param name="routeName">The name of the route to use for generating the URL.</param>
/// <param name="value">The content value to format in the entity body.</param>
@ -1023,7 +1029,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates a <see cref="CreatedAtRouteResult"/> object that produces a Created (201) response.
/// Creates a <see cref="CreatedAtRouteResult"/> object that produces a <see cref="StatusCodes.Status201Created"/> response.
/// </summary>
/// <param name="routeValues">The route data to use for generating the URL.</param>
/// <param name="value">The content value to format in the entity body.</param>
@ -1035,7 +1041,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates a <see cref="CreatedAtRouteResult"/> object that produces a Created (201) response.
/// Creates a <see cref="CreatedAtRouteResult"/> object that produces a <see cref="StatusCodes.Status201Created"/> response.
/// </summary>
/// <param name="routeName">The name of the route to use for generating the URL.</param>
/// <param name="routeValues">The route data to use for generating the URL.</param>
@ -1048,7 +1054,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates a <see cref="AcceptedResult"/> object that produces an Accepted (202) response.
/// Creates a <see cref="AcceptedResult"/> object that produces an <see cref="StatusCodes.Status202Accepted"/> response.
/// </summary>
/// <returns>The created <see cref="AcceptedResult"/> for the response.</returns>
[NonAction]
@ -1058,7 +1064,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates a <see cref="AcceptedResult"/> object that produces an Accepted (202) response.
/// Creates a <see cref="AcceptedResult"/> object that produces an <see cref="StatusCodes.Status202Accepted"/> response.
/// </summary>
/// <param name="value">The optional content value to format in the entity body; may be null.</param>
/// <returns>The created <see cref="AcceptedResult"/> for the response.</returns>
@ -1069,7 +1075,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates a <see cref="AcceptedResult"/> object that produces an Accepted (202) response.
/// Creates a <see cref="AcceptedResult"/> object that produces an <see cref="StatusCodes.Status202Accepted"/> response.
/// </summary>
/// <param name="uri">The optional URI with the location at which the status of requested content can be monitored.
/// May be null.</param>
@ -1086,7 +1092,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates a <see cref="AcceptedResult"/> object that produces an Accepted (202) response.
/// Creates a <see cref="AcceptedResult"/> object that produces an <see cref="StatusCodes.Status202Accepted"/> response.
/// </summary>
/// <param name="uri">The optional URI with the location at which the status of requested content can be monitored.
/// May be null.</param>
@ -1098,7 +1104,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates a <see cref="AcceptedResult"/> object that produces an Accepted (202) response.
/// Creates a <see cref="AcceptedResult"/> object that produces an <see cref="StatusCodes.Status202Accepted"/> response.
/// </summary>
/// <param name="uri">The URI with the location at which the status of requested content can be monitored.</param>
/// <param name="value">The optional content value to format in the entity body; may be null.</param>
@ -1110,7 +1116,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates a <see cref="AcceptedResult"/> object that produces an Accepted (202) response.
/// Creates a <see cref="AcceptedResult"/> object that produces an <see cref="StatusCodes.Status202Accepted"/> response.
/// </summary>
/// <param name="uri">The URI with the location at which the status of requested content can be monitored.</param>
/// <param name="value">The optional content value to format in the entity body; may be null.</param>
@ -1127,7 +1133,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates a <see cref="AcceptedAtActionResult"/> object that produces an Accepted (202) response.
/// Creates a <see cref="AcceptedAtActionResult"/> object that produces an <see cref="StatusCodes.Status202Accepted"/> response.
/// </summary>
/// <param name="actionName">The name of the action to use for generating the URL.</param>
/// <returns>The created <see cref="AcceptedAtActionResult"/> for the response.</returns>
@ -1138,7 +1144,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates a <see cref="AcceptedAtActionResult"/> object that produces an Accepted (202) response.
/// Creates a <see cref="AcceptedAtActionResult"/> object that produces an <see cref="StatusCodes.Status202Accepted"/> response.
/// </summary>
/// <param name="actionName">The name of the action to use for generating the URL.</param>
/// <param name="controllerName">The name of the controller to use for generating the URL.</param>
@ -1150,7 +1156,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates a <see cref="AcceptedAtActionResult"/> object that produces an Accepted (202) response.
/// Creates a <see cref="AcceptedAtActionResult"/> object that produces an <see cref="StatusCodes.Status202Accepted"/> response.
/// </summary>
/// <param name="actionName">The name of the action to use for generating the URL.</param>
/// <param name="value">The optional content value to format in the entity body; may be null.</param>
@ -1162,7 +1168,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates a <see cref="AcceptedAtActionResult"/> object that produces an Accepted (202) response.
/// Creates a <see cref="AcceptedAtActionResult"/> object that produces an <see cref="StatusCodes.Status202Accepted"/> response.
/// </summary>
/// <param name="actionName">The name of the action to use for generating the URL.</param>
/// <param name="controllerName">The name of the controller to use for generating the URL.</param>
@ -1175,7 +1181,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates a <see cref="AcceptedAtActionResult"/> object that produces an Accepted (202) response.
/// Creates a <see cref="AcceptedAtActionResult"/> object that produces an <see cref="StatusCodes.Status202Accepted"/> response.
/// </summary>
/// <param name="actionName">The name of the action to use for generating the URL.</param>
/// <param name="routeValues">The route data to use for generating the URL.</param>
@ -1188,7 +1194,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates a <see cref="AcceptedAtActionResult"/> object that produces an Accepted (202) response.
/// Creates a <see cref="AcceptedAtActionResult"/> object that produces an <see cref="StatusCodes.Status202Accepted"/> response.
/// </summary>
/// <param name="actionName">The name of the action to use for generating the URL.</param>
/// <param name="controllerName">The name of the controller to use for generating the URL.</param>
@ -1206,7 +1212,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates a <see cref="AcceptedAtRouteResult"/> object that produces an Accepted (202) response.
/// Creates a <see cref="AcceptedAtRouteResult"/> object that produces an <see cref="StatusCodes.Status202Accepted"/> response.
/// </summary>
/// <param name="routeValues">The route data to use for generating the URL.</param>
/// <returns>The created <see cref="AcceptedAtRouteResult"/> for the response.</returns>
@ -1217,7 +1223,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates a <see cref="AcceptedAtRouteResult"/> object that produces an Accepted (202) response.
/// Creates a <see cref="AcceptedAtRouteResult"/> object that produces an <see cref="StatusCodes.Status202Accepted"/> response.
/// </summary>
/// <param name="routeName">The name of the route to use for generating the URL.</param>
/// <returns>The created <see cref="AcceptedAtRouteResult"/> for the response.</returns>
@ -1228,7 +1234,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates a <see cref="AcceptedAtRouteResult"/> object that produces an Accepted (202) response.
/// Creates a <see cref="AcceptedAtRouteResult"/> object that produces an <see cref="StatusCodes.Status202Accepted"/> response.
/// </summary>
/// <param name="routeName">The name of the route to use for generating the URL.</param>
///<param name="routeValues">The route data to use for generating the URL.</param>
@ -1240,7 +1246,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates a <see cref="AcceptedAtRouteResult"/> object that produces an Accepted (202) response.
/// Creates a <see cref="AcceptedAtRouteResult"/> object that produces an <see cref="StatusCodes.Status202Accepted"/> response.
/// </summary>
/// <param name="routeValues">The route data to use for generating the URL.</param>
/// <param name="value">The optional content value to format in the entity body; may be null.</param>
@ -1252,7 +1258,7 @@ namespace Microsoft.AspNetCore.Mvc
}
/// <summary>
/// Creates a <see cref="AcceptedAtRouteResult"/> object that produces an Accepted (202) response.
/// Creates a <see cref="AcceptedAtRouteResult"/> object that produces an <see cref="StatusCodes.Status202Accepted"/> response.
/// </summary>
/// <param name="routeName">The name of the route to use for generating the URL.</param>
/// <param name="routeValues">The route data to use for generating the URL.</param>
@ -1268,6 +1274,11 @@ namespace Microsoft.AspNetCore.Mvc
/// Creates a <see cref="ChallengeResult"/>.
/// </summary>
/// <returns>The created <see cref="ChallengeResult"/> for the response.</returns>
/// <remarks>
/// The behavior of this method depends on the <see cref="AuthenticationManager"/> in use.
/// <see cref="StatusCodes.Status401Unauthorized"/> and <see cref="StatusCodes.Status403Forbidden"/>
/// are among likely status results.
/// </remarks>
[NonAction]
public virtual ChallengeResult Challenge()
=> new ChallengeResult();
@ -1277,6 +1288,11 @@ namespace Microsoft.AspNetCore.Mvc
/// </summary>
/// <param name="authenticationSchemes">The authentication schemes to challenge.</param>
/// <returns>The created <see cref="ChallengeResult"/> for the response.</returns>
/// <remarks>
/// The behavior of this method depends on the <see cref="AuthenticationManager"/> in use.
/// <see cref="StatusCodes.Status401Unauthorized"/> and <see cref="StatusCodes.Status403Forbidden"/>
/// are among likely status results.
/// </remarks>
[NonAction]
public virtual ChallengeResult Challenge(params string[] authenticationSchemes)
=> new ChallengeResult(authenticationSchemes);
@ -1287,6 +1303,11 @@ namespace Microsoft.AspNetCore.Mvc
/// <param name="properties"><see cref="AuthenticationProperties"/> used to perform the authentication
/// challenge.</param>
/// <returns>The created <see cref="ChallengeResult"/> for the response.</returns>
/// <remarks>
/// The behavior of this method depends on the <see cref="AuthenticationManager"/> in use.
/// <see cref="StatusCodes.Status401Unauthorized"/> and <see cref="StatusCodes.Status403Forbidden"/>
/// are among likely status results.
/// </remarks>
[NonAction]
public virtual ChallengeResult Challenge(AuthenticationProperties properties)
=> new ChallengeResult(properties);
@ -1299,6 +1320,11 @@ namespace Microsoft.AspNetCore.Mvc
/// challenge.</param>
/// <param name="authenticationSchemes">The authentication schemes to challenge.</param>
/// <returns>The created <see cref="ChallengeResult"/> for the response.</returns>
/// <remarks>
/// The behavior of this method depends on the <see cref="AuthenticationManager"/> in use.
/// <see cref="StatusCodes.Status401Unauthorized"/> and <see cref="StatusCodes.Status403Forbidden"/>
/// are among likely status results.
/// </remarks>
[NonAction]
public virtual ChallengeResult Challenge(
AuthenticationProperties properties,
@ -1306,40 +1332,58 @@ namespace Microsoft.AspNetCore.Mvc
=> new ChallengeResult(authenticationSchemes, properties);
/// <summary>
/// Creates a <see cref="ForbidResult"/>.
/// Creates a <see cref="ForbidResult"/> (<see cref="StatusCodes.Status403Forbidden"/> by default).
/// </summary>
/// <returns>The created <see cref="ForbidResult"/> for the response.</returns>
/// <remarks>
/// Some authentication schemes, such as cookies, will convert <see cref="StatusCodes.Status403Forbidden"/> to
/// a redirect to show a login page.
/// </remarks>
[NonAction]
public virtual ForbidResult Forbid()
=> new ForbidResult();
/// <summary>
/// Creates a <see cref="ForbidResult"/> with the specified authentication schemes.
/// Creates a <see cref="ForbidResult"/> (<see cref="StatusCodes.Status403Forbidden"/> by default) with the
/// specified authentication schemes.
/// </summary>
/// <param name="authenticationSchemes">The authentication schemes to challenge.</param>
/// <returns>The created <see cref="ForbidResult"/> for the response.</returns>
/// <remarks>
/// Some authentication schemes, such as cookies, will convert <see cref="StatusCodes.Status403Forbidden"/> to
/// a redirect to show a login page.
/// </remarks>
[NonAction]
public virtual ForbidResult Forbid(params string[] authenticationSchemes)
=> new ForbidResult(authenticationSchemes);
/// <summary>
/// Creates a <see cref="ForbidResult"/> with the specified <paramref name="properties" />.
/// Creates a <see cref="ForbidResult"/> (<see cref="StatusCodes.Status403Forbidden"/> by default) with the
/// specified <paramref name="properties" />.
/// </summary>
/// <param name="properties"><see cref="AuthenticationProperties"/> used to perform the authentication
/// challenge.</param>
/// <returns>The created <see cref="ForbidResult"/> for the response.</returns>
/// <remarks>
/// Some authentication schemes, such as cookies, will convert <see cref="StatusCodes.Status403Forbidden"/> to
/// a redirect to show a login page.
/// </remarks>
[NonAction]
public virtual ForbidResult Forbid(AuthenticationProperties properties)
=> new ForbidResult(properties);
/// <summary>
/// Creates a <see cref="ForbidResult"/> with the specified specified authentication schemes and
/// <paramref name="properties" />.
/// Creates a <see cref="ForbidResult"/> (<see cref="StatusCodes.Status403Forbidden"/> by default) with the
/// specified specified authentication schemes and <paramref name="properties" />.
/// </summary>
/// <param name="properties"><see cref="AuthenticationProperties"/> used to perform the authentication
/// challenge.</param>
/// <param name="authenticationSchemes">The authentication schemes to challenge.</param>
/// <returns>The created <see cref="ForbidResult"/> for the response.</returns>
/// <remarks>
/// Some authentication schemes, such as cookies, will convert <see cref="StatusCodes.Status403Forbidden"/> to
/// a redirect to show a login page.
/// </remarks>
[NonAction]
public virtual ForbidResult Forbid(AuthenticationProperties properties, params string[] authenticationSchemes)
=> new ForbidResult(authenticationSchemes, properties);