Update the remarks section for ViewData

This commit is contained in:
Pranav K 2018-02-14 11:44:57 -08:00
parent d40c60d15b
commit 8770751a97
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
/// on 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