Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
/MvcPublic archive

Commit1f6bbf9

Browse files
committed
Add doc comments forpublic attributes
-#4641
1 parenta2feeab commit1f6bbf9

File tree

21 files changed

+115
-7
lines changed

21 files changed

+115
-7
lines changed

‎src/Microsoft.AspNetCore.Mvc.Core/ActionNameAttribute.cs‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,24 @@
55

66
namespaceMicrosoft.AspNetCore.Mvc
77
{
8+
/// <summary>
9+
/// Specifies the name of an action.
10+
/// </summary>
811
[AttributeUsage(AttributeTargets.Method,AllowMultiple=false,Inherited=true)]
912
publicsealedclassActionNameAttribute:Attribute
1013
{
14+
/// <summary>
15+
/// Initializes a new <see cref="ActionNameAttribute"/> instance.
16+
/// </summary>
17+
/// <param name="name">The name of the action.</param>
1118
publicActionNameAttribute(stringname)
1219
{
1320
Name=name;
1421
}
1522

23+
/// <summary>
24+
/// Gets the name of the action.
25+
/// </summary>
1626
publicstringName{get;privateset;}
1727
}
1828
}

‎src/Microsoft.AspNetCore.Mvc.Core/AreaAttribute.cs‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,16 @@
66

77
namespaceMicrosoft.AspNetCore.Mvc
88
{
9+
/// <summary>
10+
/// Specifies the area containing a controller or action.
11+
/// </summary>
912
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method,AllowMultiple=false,Inherited=true)]
1013
publicclassAreaAttribute:RouteValueAttribute
1114
{
15+
/// <summary>
16+
/// Initializes a new <see cref="AreaAttribute"/> instance.
17+
/// </summary>
18+
/// <param name="areaName">The area containing the controller or action.</param>
1219
publicAreaAttribute(stringareaName)
1320
:base("area",areaName)
1421
{

‎src/Microsoft.AspNetCore.Mvc.Core/FromServicesAttribute.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace Microsoft.AspNetCore.Mvc
1212
/// <example>
1313
/// In this example an implementation of IProductModelRequestService is registered as a service.
1414
/// Then in the GetProduct action, the parameter is bound to an instance of IProductModelRequestService
15-
/// which is resolved from thetherequest services.
15+
/// which is resolved from the request services.
1616
///
1717
/// <code>
1818
/// [HttpGet]
@@ -21,7 +21,7 @@ namespace Microsoft.AspNetCore.Mvc
2121
/// return productModelReqest.Value;
2222
/// }
2323
/// </code>
24-
/// </example>
24+
/// </example>
2525
[AttributeUsage(AttributeTargets.Parameter,AllowMultiple=false,Inherited=true)]
2626
publicclassFromServicesAttribute:Attribute,IBindingSourceMetadata
2727
{

‎src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/BindNeverAttribute.cs‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,15 @@
55

66
namespaceMicrosoft.AspNetCore.Mvc.ModelBinding
77
{
8+
/// <summary>
9+
/// Indicates that the property should be excluded from model binding.
10+
/// </summary>
811
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Property,AllowMultiple=false,Inherited=true)]
912
publicsealedclassBindNeverAttribute:BindingBehaviorAttribute
1013
{
14+
/// <summary>
15+
/// Initializes a new <see cref="BindNeverAttribute"/> instance.
16+
/// </summary>
1117
publicBindNeverAttribute()
1218
:base(BindingBehavior.Never)
1319
{

‎src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/BindRequiredAttribute.cs‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,15 @@
55

66
namespaceMicrosoft.AspNetCore.Mvc.ModelBinding
77
{
8+
/// <summary>
9+
/// Indicates that the property is required for model binding.
10+
/// </summary>
811
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Property,AllowMultiple=false,Inherited=true)]
912
publicsealedclassBindRequiredAttribute:BindingBehaviorAttribute
1013
{
14+
/// <summary>
15+
/// Initializes a new <see cref="BindRequiredAttribute"/> instance.
16+
/// </summary>
1117
publicBindRequiredAttribute()
1218
:base(BindingBehavior.Required)
1319
{

‎src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/BindingBehavior.cs‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,24 @@
33

44
namespaceMicrosoft.AspNetCore.Mvc.ModelBinding
55
{
6+
/// <summary>
7+
/// Enumerates behavior options of the model binding system.
8+
/// </summary>
69
publicenumBindingBehavior
710
{
11+
/// <summary>
12+
/// The property should be model bound if a value is available from the value provider.
13+
/// </summary>
814
Optional=0,
15+
16+
/// <summary>
17+
/// The property should be excluded from model binding.
18+
/// </summary>
919
Never,
20+
21+
/// <summary>
22+
/// The property is required for model binding.
23+
/// </summary>
1024
Required
1125
}
1226
}

‎src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/BindingBehaviorAttribute.cs‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,24 @@
55

66
namespaceMicrosoft.AspNetCore.Mvc.ModelBinding
77
{
8+
/// <summary>
9+
/// Specifies the <see cref="BindingBehavior"/> that should be applied.
10+
/// </summary>
811
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Property,AllowMultiple=false,Inherited=true)]
912
publicclassBindingBehaviorAttribute:Attribute
1013
{
14+
/// <summary>
15+
/// Initializes a new <see cref="BindingBehaviorAttribute"/> instance.
16+
/// </summary>
17+
/// <param name="behavior">The <see cref="BindingBehavior"/> to apply.</param>
1118
publicBindingBehaviorAttribute(BindingBehaviorbehavior)
1219
{
1320
Behavior=behavior;
1421
}
1522

23+
/// <summary>
24+
/// Gets the <see cref="BindingBehavior"/> to apply.
25+
/// </summary>
1626
publicBindingBehaviorBehavior{get;privateset;}
1727
}
1828
}

‎src/Microsoft.AspNetCore.Mvc.Core/NonActionAttribute.cs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55

66
namespaceMicrosoft.AspNetCore.Mvc
77
{
8+
/// <summary>
9+
/// Indicates that a controller method is not an action method.
10+
/// </summary>
811
[AttributeUsage(AttributeTargets.Method,AllowMultiple=false,Inherited=true)]
912
publicsealedclassNonActionAttribute:Attribute
1013
{

‎src/Microsoft.AspNetCore.Mvc.Core/Routing/RouteValueAttribute.cs‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,18 @@
66
namespaceMicrosoft.AspNetCore.Mvc.Routing
77
{
88
/// <summary>
9+
/// <para>
910
/// An attribute which specifies a required route value for an action or controller.
10-
///
11+
/// </para>
12+
/// <para>
1113
/// When placed on an action, the route data of a request must match the expectations of the route
1214
/// constraint in order for the action to be selected. See <see cref="IRouteValueProvider"/> for
1315
/// the expectations that must be satisfied by the route data.
14-
///
16+
/// </para>
17+
/// <para>
1518
/// When placed on a controller, unless overridden by the action, the constraint applies to all
1619
/// actions defined by the controller.
20+
/// </para>
1721
/// </summary>
1822
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method,AllowMultiple=true,Inherited=true)]
1923
publicabstractclassRouteValueAttribute:Attribute,IRouteValueProvider

‎src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewComponentAttribute.cs‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,15 @@
55

66
namespaceMicrosoft.AspNetCore.Mvc
77
{
8+
/// <summary>
9+
/// Indicates the class is a view component and optionally specifies the component's name.
10+
/// </summary>
811
[AttributeUsage(AttributeTargets.Class,AllowMultiple=false,Inherited=true)]
912
publicclassViewComponentAttribute:Attribute
1013
{
14+
/// <summary>
15+
/// Gets or sets the name of the view component.
16+
/// </summary>
1117
publicstringName{get;set;}
1218
}
1319
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp