7 instantiations of SelectListItem
Microsoft.AspNetCore.Mvc.ViewFeatures (7)
DefaultDisplayTemplates.cs (3)
66
new
SelectListItem
(Resources.Common_TriState_NotSet, string.Empty, !value.HasValue),
67
new
SelectListItem
(Resources.Common_TriState_True, "true", (value == true)),
68
new
SelectListItem
(Resources.Common_TriState_False, "false", (value == false)),
DefaultHtmlGenerator.cs (1)
1581
new
SelectListItem
()
HtmlHelper.cs (1)
1385
var selectListItem = new
SelectListItem
Rendering\MultiSelectList.cs (2)
164
var newListItem = new
SelectListItem
189
var newListItem = new
SelectListItem
152 references to SelectListItem
Microsoft.AspNetCore.Mvc.TagHelpers (3)
SelectTagHelper.cs (3)
57
/// A collection of <see cref="
SelectListItem
"/> objects used to populate the <select> element with
61
public IEnumerable<
SelectListItem
> Items { get; set; }
124
var items = Items ?? Enumerable.Empty<
SelectListItem
>();
Microsoft.AspNetCore.Mvc.ViewFeatures (149)
DefaultDisplayTemplates.cs (3)
53
foreach (
var
item in TriStateValues(value))
62
internal static List<
SelectListItem
> TriStateValues(bool? value)
64
return new List<
SelectListItem
>
DefaultHtmlGenerator.cs (15)
510
IEnumerable<
SelectListItem
> selectList,
534
IEnumerable<
SelectListItem
> selectList,
919
if (rawValue is IEnumerable<
SelectListItem
>)
1036
internal static TagBuilder GenerateOption(
SelectListItem
item, string text)
1041
internal static TagBuilder GenerateOption(
SelectListItem
item, string text, bool selected)
1485
private static IEnumerable<
SelectListItem
> GetSelectListItems(
1500
$"IEnumerable<{nameof(
SelectListItem
)}>",
1505
if (!(value is IEnumerable<
SelectListItem
> selectList))
1510
$"IEnumerable<{nameof(
SelectListItem
)}>"));
1548
public IHtmlContent GenerateGroupsAndOptions(string optionLabel, IEnumerable<
SelectListItem
> selectList)
1555
IEnumerable<
SelectListItem
> selectList,
1558
if (!(selectList is IList<
SelectListItem
> itemsList))
1598
var
item = itemsList[i];
1617
var
groupItem = itemsList[j];
1640
private static IHtmlContent GenerateOption(
SelectListItem
item, ICollection<string> currentValues)
HtmlHelper.cs (10)
337
IEnumerable<
SelectListItem
> selectList,
366
public IEnumerable<
SelectListItem
> GetEnumSelectList<TEnum>() where TEnum : struct
383
public IEnumerable<
SelectListItem
> GetEnumSelectList(Type enumType)
429
public IHtmlContent ListBox(string expression, IEnumerable<
SelectListItem
> selectList, object htmlAttributes)
819
IEnumerable<
SelectListItem
> selectList,
1085
/// <param name="selectList">An enumeration of <see cref="
SelectListItem
"/>.</param>
1094
IEnumerable<
SelectListItem
> selectList,
1368
protected virtual IEnumerable<
SelectListItem
> GetEnumSelectList(ModelMetadata metadata)
1381
var selectList = new List<
SelectListItem
>();
1385
var
selectListItem = new SelectListItem
HtmlHelperOfT.cs (2)
108
IEnumerable<
SelectListItem
> selectList,
226
IEnumerable<
SelectListItem
> selectList,
IHtmlGenerator.cs (7)
368
/// A collection of <see cref="
SelectListItem
"/> objects used to populate the <select> element with
396
IEnumerable<
SelectListItem
> selectList,
411
/// A collection of <see cref="
SelectListItem
"/> objects used to populate the <select> element with
417
/// <c>null</c>, selects <option> elements based on <see cref="
SelectListItem
.Selected"/> values in
445
IEnumerable<
SelectListItem
> selectList,
455
/// A collection of <see cref="
SelectListItem
"/> objects used to generate <optgroup> and <option>
461
IHtmlContent GenerateGroupsAndOptions(string optionLabel, IEnumerable<
SelectListItem
> selectList);
Rendering\HtmlHelperSelectExtensions.cs (49)
17
/// "selected" attribute to an <option> if its <see cref="
SelectListItem
.Value"/> (if non-<c>null</c>) or
18
/// <see cref="
SelectListItem
.Text"/> matches the first non-<c>null</c> value found in:
34
/// <see cref="
SelectListItem
"/> objects.
48
/// <see cref="
SelectListItem
.Value"/> (if non-<c>null</c>) or <see cref="
SelectListItem
.Text"/> matches the
68
/// <see cref="
SelectListItem
"/> objects.
88
/// <option> if its <see cref="
SelectListItem
.Value"/> (if non-<c>null</c>) or
89
/// <see cref="
SelectListItem
.Text"/> matches the first non-<c>null</c> value found in:
99
/// A collection of <see cref="
SelectListItem
"/> objects used to populate the <select> element with
101
/// entry with full name and that entry must be a collection of <see cref="
SelectListItem
"/> objects.
112
IEnumerable<
SelectListItem
> selectList)
122
/// <option> if its <see cref="
SelectListItem
.Value"/> (if non-<c>null</c>) or
123
/// <see cref="
SelectListItem
.Text"/> matches the first non-<c>null</c> value found in:
133
/// A collection of <see cref="
SelectListItem
"/> objects used to populate the <select> element with
135
/// entry with full name and that entry must be a collection of <see cref="
SelectListItem
"/> objects.
150
IEnumerable<
SelectListItem
> selectList,
161
/// "selected" attribute to an <option> if its <see cref="
SelectListItem
.Value"/> (if non-<c>null</c>) or
162
/// <see cref="
SelectListItem
.Text"/> matches the first non-<c>null</c> value found in:
172
/// A collection of <see cref="
SelectListItem
"/> objects used to populate the <select> element with
174
/// entry with full name and that entry must be a collection of <see cref="
SelectListItem
"/> objects.
188
IEnumerable<
SelectListItem
> selectList,
199
/// <option> if its <see cref="
SelectListItem
.Value"/> (if non-<c>null</c>) or
200
/// <see cref="
SelectListItem
.Text"/> matches the first non-<c>null</c> value found in:
208
/// A collection of <see cref="
SelectListItem
"/> objects used to populate the <select> element with
210
/// entry with full name and that entry must be a collection of <see cref="
SelectListItem
"/> objects.
223
IEnumerable<
SelectListItem
> selectList)
234
/// <option> if its <see cref="
SelectListItem
.Value"/> (if non-<c>null</c>) or
235
/// <see cref="
SelectListItem
.Text"/> matches the first non-<c>null</c> value found in:
243
/// A collection of <see cref="
SelectListItem
"/> objects used to populate the <select> element with
245
/// entry with full name and that entry must be a collection of <see cref="
SelectListItem
"/> objects.
262
IEnumerable<
SelectListItem
> selectList,
278
/// "selected" attribute to an <option> if its <see cref="
SelectListItem
.Value"/> (if non-<c>null</c>) or
279
/// <see cref="
SelectListItem
.Text"/> matches the first non-<c>null</c> value found in:
287
/// A collection of <see cref="
SelectListItem
"/> objects used to populate the <select> element with
289
/// entry with full name and that entry must be a collection of <see cref="
SelectListItem
"/> objects.
305
IEnumerable<
SelectListItem
> selectList,
317
/// "selected" attribute to an <option> if its <see cref="
SelectListItem
.Value"/> (if non-<c>null</c>) or
318
/// <see cref="
SelectListItem
.Text"/> matches the first non-<c>null</c> value found in:
334
/// <see cref="
SelectListItem
"/> objects.
347
/// <option> if its <see cref="
SelectListItem
.Value"/> (if non-<c>null</c>) or
348
/// <see cref="
SelectListItem
.Text"/> matches the first non-<c>null</c> value found in:
358
/// A collection of <see cref="
SelectListItem
"/> objects used to populate the <select> element with
360
/// entry with full name and that entry must be a collection of <see cref="
SelectListItem
"/> objects.
371
IEnumerable<
SelectListItem
> selectList)
381
/// <option> if its <see cref="
SelectListItem
.Value"/> (if non-<c>null</c>) or
382
/// <see cref="
SelectListItem
.Text"/> matches the first non-<c>null</c> value found in:
390
/// A collection of <see cref="
SelectListItem
"/> objects used to populate the <select> element with
392
/// entry with full name and that entry must be a collection of <see cref="
SelectListItem
"/> objects.
405
IEnumerable<
SelectListItem
> selectList)
Rendering\IHtmlHelper.cs (14)
254
/// "selected" attribute to an <option> if its <see cref="
SelectListItem
.Value"/> (if non-<c>null</c>) or
255
/// <see cref="
SelectListItem
.Text"/> matches the first non-<c>null</c> value found in:
263
/// A collection of <see cref="
SelectListItem
"/> objects used to populate the <select> element with
265
/// full name and that entry must be a collection of <see cref="
SelectListItem
"/> objects.
282
IEnumerable<
SelectListItem
> selectList,
376
/// with a decimal representation of the ordinal as <see cref="
SelectListItem
.Value"/>
377
/// and the display name as <see cref="
SelectListItem
.Text"/>.
383
IEnumerable<
SelectListItem
> GetEnumSelectList<TEnum>() where TEnum : struct;
397
IEnumerable<
SelectListItem
> GetEnumSelectList(Type enumType);
445
/// <option> if its <see cref="
SelectListItem
.Value"/> (if non-<c>null</c>) or
446
/// <see cref="
SelectListItem
.Text"/> matches an entry in the first non-<c>null</c> collection found in:
454
/// A collection of <see cref="
SelectListItem
"/> objects used to populate the <select> element with
455
/// <optgroup> and <option> elements. If <c>null</c>, finds the <see cref="
SelectListItem
"/>
468
IHtmlContent ListBox(string expression, IEnumerable<
SelectListItem
> selectList, object htmlAttributes);
Rendering\IHtmlHelperOfT.cs (10)
116
/// "selected" attribute to an <option> if its <see cref="
SelectListItem
.Value"/> (if non-<c>null</c>) or
117
/// <see cref="
SelectListItem
.Text"/> matches the first non-<c>null</c> value found in:
124
/// A collection of <see cref="
SelectListItem
"/> objects used to populate the <select> element with
126
/// full name and that entry must be a collection of <see cref="
SelectListItem
"/> objects.
144
IEnumerable<
SelectListItem
> selectList,
238
/// <option> if its <see cref="
SelectListItem
.Value"/> (if non-<c>null</c>) or
239
/// <see cref="
SelectListItem
.Text"/> matches an entry in the first non-<c>null</c> collection found in:
246
/// A collection of <see cref="
SelectListItem
"/> objects used to populate the <select> element with
247
/// <optgroup> and <option> elements. If <c>null</c>, finds the <see cref="
SelectListItem
"/>
263
IEnumerable<
SelectListItem
> selectList,
Rendering\MultiSelectList.cs (16)
14
/// of <see cref="
SelectListItem
"/> objects.
16
public class MultiSelectList : IEnumerable<
SelectListItem
>
19
private IList<
SelectListItem
> _selectListItems;
75
/// <param name="items">The items used to build each <see cref="
SelectListItem
"/> of the list.</param>
77
/// <see cref="
SelectListItem
"/>.</param>
79
/// <see cref="
SelectListItem
"/>.</param>
81
/// corresponding <see cref="
SelectListItem
"/>.</param>
83
/// <see cref="
SelectListItem
"/>.</param>
131
public virtual IEnumerator<
SelectListItem
> GetEnumerator()
141
private IList<
SelectListItem
> GetListItems()
148
private IList<
SelectListItem
> GetListItemsWithValueField()
160
var listItems = new List<
SelectListItem
>();
164
var
newListItem = new SelectListItem
178
private IList<
SelectListItem
> GetListItemsWithoutValueField()
186
var listItems = new List<
SelectListItem
>();
189
var
newListItem = new SelectListItem
Rendering\SelectList.cs (6)
11
/// of <see cref="
SelectListItem
"/> objects.
71
/// <param name="items">The items used to build each <see cref="
SelectListItem
"/> of the list.</param>
73
/// <see cref="
SelectListItem
"/>.</param>
75
/// <see cref="
SelectListItem
"/>.</param>
77
/// <see cref="
SelectListItem
"/>.</param>
79
/// <see cref="
SelectListItem
"/>.</param>
Rendering\SelectListItem.cs (17)
14
/// Initializes a new instance of <see cref="
SelectListItem
"/>.
19
/// Initializes a new instance of <see cref="
SelectListItem
"/>.
21
/// <param name="text">The display text of this <see cref="
SelectListItem
"/>.</param>
22
/// <param name="value">The value of this <see cref="
SelectListItem
"/>.</param>
31
/// Initializes a new instance of <see cref="
SelectListItem
"/>.
33
/// <param name="text">The display text of this <see cref="
SelectListItem
"/>.</param>
34
/// <param name="value">The value of this <see cref="
SelectListItem
"/>.</param>
35
/// <param name="selected">Value that indicates whether this <see cref="
SelectListItem
"/> is selected.</param>
43
/// Initializes a new instance of <see cref="
SelectListItem
"/>.
45
/// <param name="text">The display text of this <see cref="
SelectListItem
"/>.</param>
46
/// <param name="value">The value of this <see cref="
SelectListItem
"/>.</param>
47
/// <param name="selected">Value that indicates whether this <see cref="
SelectListItem
"/> is selected.</param>
48
/// <param name="disabled">Value that indicates whether this <see cref="
SelectListItem
"/> is disabled.</param>
56
/// Gets or sets a value that indicates whether this <see cref="
SelectListItem
"/> is disabled.
70
/// Gets or sets a value that indicates whether this <see cref="
SelectListItem
"/> is selected.
77
/// Gets or sets a value that indicates the display text of this <see cref="
SelectListItem
"/>.
83
/// Gets or sets a value that indicates the value of this <see cref="
SelectListItem
"/>.