Add comments and remove default values in the contructor

This commit is contained in:
Fabien Lavocat 2018-02-05 10:54:55 -08:00
parent 88e14a0bfe
commit a2420688ff
1 changed files with 24 additions and 3 deletions

View File

@ -10,14 +10,35 @@ namespace Microsoft.AspNetCore.Mvc.Rendering
/// </summary>
public class SelectListItem
{
/// <summary>
/// Initializes a new instance of <see cref="SelectListItem"/>.
/// </summary>
public SelectListItem() { }
public SelectListItem(string text, string value, bool selected = false, bool disabled = false)
/// <summary>
/// Initializes a new instance of <see cref="SelectListItem"/>.
/// </summary>
/// <param name="text">The display text of this <see cref="SelectListItem"/>.</param>
/// <param name="value">The value of this <see cref="SelectListItem"/>.</param>
public SelectListItem(string text, string value)
: this()
{
Text = text;
Value = value;
}
/// <summary>
/// Initializes a new instance of <see cref="SelectListItem"/>.
/// </summary>
/// <param name="text">The display text of this <see cref="SelectListItem"/>.</param>
/// <param name="value">The value of this <see cref="SelectListItem"/>.</param>
/// <param name="selected">Value that indicates whether this <see cref="SelectListItem"/> is selected.</param>
/// <param name="disabled">Value that indicates whether this <see cref="SelectListItem"/> is disabled.</param>
public SelectListItem(string text, string value, bool selected, bool disabled)
: this(text, value)
{
Disabled = disabled;
Selected = selected;
Text = text;
Value = value;
}
/// <summary>