Update the remarks section for ViewData (#7371)

* Update the remarks section for ViewData
Fixes #7279
This commit is contained in:
Pranav K 2018-02-16 10:18:31 -08:00 committed by GitHub
commit 1c451a7ff4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 3 deletions

View File

@ -25,9 +25,16 @@ namespace Microsoft.AspNetCore.Mvc
/// Gets or sets <see cref="ViewDataDictionary"/> used by <see cref="ViewResult"/> and <see cref="ViewBag"/>.
/// </summary>
/// <remarks>
/// By default, this property is activated when <see cref="Controllers.IControllerActivator"/> activates
/// controllers. However, when controllers are directly instantiated in user code, this property is
/// initialized with <see cref="EmptyModelMetadataProvider"/>.
/// By default, this property is intiailized when <see cref="Controllers.IControllerActivator"/> activates
/// controllers.
/// <para>
/// This property can be accessed after the controller has been activated, for example, in a controller action
/// or by overriding <see cref="OnActionExecuting(ActionExecutingContext)"/>.
/// </para>
/// <para>
/// This property can be also accessed from within a unit test where it is initialized with
/// <see cref="EmptyModelMetadataProvider"/>.
/// </para>
/// </remarks>
[ViewDataDictionary]
public ViewDataDictionary ViewData