2 interfaces inheriting from IHtmlContent
Microsoft.AspNetCore.Html.Abstractions (2)
IHtmlAsyncContent.cs (1)
9
public interface IHtmlAsyncContent :
IHtmlContent
IHtmlContentContainer.cs (1)
10
public interface IHtmlContentContainer :
IHtmlContent
20 implementations of IHtmlContent
Microsoft.AspNetCore.Components.Endpoints (1)
Rendering\EndpointHtmlRenderer.PrerenderingState.cs (1)
201
internal sealed class ComponentStateHtmlContent :
IHtmlContent
Microsoft.AspNetCore.Html.Abstractions (2)
HtmlFormattableString.cs (1)
17
public class HtmlFormattableString :
IHtmlContent
HtmlString.cs (1)
11
public class HtmlString :
IHtmlContent
Microsoft.AspNetCore.Html.Abstractions.Tests (4)
HtmlContentBuilderExtensionsTest.cs (3)
412
private class EncodedString :
IHtmlContent
427
private class UnencodedString :
IHtmlContent
442
private class OtherHtmlContent :
IHtmlContent
HtmlContentBuilderTest.cs (1)
232
private class TestHtmlContent :
IHtmlContent
, IEquatable<TestHtmlContent>
Microsoft.AspNetCore.Mvc.Localization (1)
LocalizedHtmlString.cs (1)
12
public class LocalizedHtmlString :
IHtmlContent
Microsoft.AspNetCore.Mvc.Razor (2)
HelperResult.cs (1)
12
public class HelperResult :
IHtmlContent
TagHelpers\UrlResolutionTagHelper.cs (1)
343
private sealed class EncodeFirstSegmentContent :
IHtmlContent
Microsoft.AspNetCore.Mvc.TagHelpers (2)
CacheTagHelper.cs (1)
242
private sealed class CharBufferHtmlContent :
IHtmlContent
TagHelperOutputExtensions.cs (1)
340
private sealed class ClassAttributeHtmlContent :
IHtmlContent
Microsoft.AspNetCore.Mvc.ViewFeatures (5)
AntiforgeryExtensions.cs (1)
40
private sealed class InputContent :
IHtmlContent
Buffers\ViewBuffer.cs (1)
368
private sealed class EncodingWrapper :
IHtmlContent
Rendering\TagBuilder.cs (2)
21
public class TagBuilder :
IHtmlContent
399
private sealed class RenderTagHtmlContent :
IHtmlContent
StringHtmlContent.cs (1)
16
public class StringHtmlContent :
IHtmlContent
Microsoft.AspNetCore.Razor.Test (2)
TagHelpers\DefaultTagHelperContentTest.cs (2)
805
private class CharByCharWhiteSpaceHtmlContent :
IHtmlContent
819
private class CharByCharNonWhiteSpaceHtmlContent :
IHtmlContent
TagHelpersWebSite (1)
MyHtmlContent.cs (1)
10
public class MyHtmlContent :
IHtmlContent
1044 references to IHtmlContent
Microsoft.AspNetCore.Components.Endpoints (4)
DependencyInjection\IComponentPrerenderer.cs (1)
36
ValueTask<
IHtmlContent
> PrerenderPersistedStateAsync(
RazorComponentEndpointInvoker.cs (1)
150
var
componentStateHtmlContent = await _renderer.PrerenderPersistedStateAsync(context);
Rendering\EndpointHtmlRenderer.PrerenderingState.cs (2)
19
public async ValueTask<
IHtmlContent
> PrerenderPersistedStateAsync(HttpContext httpContext)
111
public async ValueTask<
IHtmlContent
> PrerenderPersistedStateAsync(HttpContext httpContext, PersistedStateSerializationMode serializationMode)
Microsoft.AspNetCore.Html.Abstractions (17)
HtmlContentBuilder.cs (4)
71
public IHtmlContentBuilder AppendHtml(
IHtmlContent
? htmlContent)
122
destination.AppendHtml((
IHtmlContent
)entry);
149
destination.AppendHtml((
IHtmlContent
)entry);
175
((
IHtmlContent
)entry).WriteTo(writer, encoder);
HtmlContentBuilderExtensions.cs (6)
99
/// Appends an <see cref="Environment.NewLine"/> after appending the <see cref="
IHtmlContent
"/> value.
102
/// <param name="content">The <see cref="
IHtmlContent
"/> to append.</param>
104
public static IHtmlContentBuilder AppendLine(this IHtmlContentBuilder builder,
IHtmlContent
content)
146
/// Sets the content to the <see cref="
IHtmlContent
"/> value.
149
/// <param name="content">The <see cref="
IHtmlContent
"/> value that replaces the content.</param>
151
public static IHtmlContentBuilder SetHtmlContent(this IHtmlContentBuilder builder,
IHtmlContent
content)
HtmlFormattableString.cs (2)
12
/// An <see cref="
IHtmlContent
"/> implementation of composite string formatting
105
if (arg is
IHtmlContent
htmlContent)
HtmlString.cs (1)
9
/// An <see cref="
IHtmlContent
"/> implementation that wraps an HTML encoded <see cref="string"/>.
IHtmlContentBuilder.cs (3)
12
/// Appends an <see cref="
IHtmlContent
"/> instance.
14
/// <param name="content">The <see cref="
IHtmlContent
"/> to append.</param>
16
IHtmlContentBuilder AppendHtml(
IHtmlContent
content);
IHtmlContentContainer.cs (1)
7
/// Defines a contract for <see cref="
IHtmlContent
"/> instances made up of several components which
Microsoft.AspNetCore.Html.Abstractions.Tests (7)
HtmlContentBuilderExtensionsTest.cs (6)
354
private static string HtmlContentToString(
IHtmlContent
content)
363
public List<
IHtmlContent
> Entries { get; } = new List<
IHtmlContent
>();
371
public IHtmlContentBuilder AppendHtml(
IHtmlContent
content)
391
foreach (
var
entry in Entries)
405
foreach (
var
entry in Entries)
HtmlFormattableStringTest.cs (1)
205
private static string HtmlContentToString(
IHtmlContent
content)
Microsoft.AspNetCore.Mvc.Localization (1)
LocalizedHtmlString.cs (1)
10
/// An <see cref="
IHtmlContent
"/> with localized content.
Microsoft.AspNetCore.Mvc.NewtonsoftJson (5)
JsonHelperExtensions.cs (2)
24
/// <returns>A new <see cref="
IHtmlContent
"/> containing the serialized JSON.</returns>
29
public static
IHtmlContent
Serialize(
NewtonsoftJsonHelper.cs (3)
39
public
IHtmlContent
Serialize(object value)
44
public
IHtmlContent
Serialize(object value, JsonSerializerSettings serializerSettings)
52
private
IHtmlContent
Serialize(object value, JsonSerializer jsonSerializer)
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (9)
NewtonsoftJsonHelperTest.cs (3)
34
var
result = helper.Serialize(obj);
62
var
result = helper.Serialize(obj, serializerSettings);
81
var
result = helper.Serialize(obj);
src\Mvc\Mvc.ViewFeatures\test\Rendering\JsonHelperTestBase.cs (6)
24
var
result = helper.Serialize(obj);
39
var
result = helper.Serialize(value: null);
58
var
result = helper.Serialize(obj);
77
var
result = helper.Serialize(obj);
96
var
result = helper.Serialize(obj);
115
var
result = helper.Serialize(obj);
Microsoft.AspNetCore.Mvc.Razor (16)
IRazorPage.cs (1)
22
IHtmlContent
? BodyContent { get; set; }
RazorPage.cs (5)
29
protected virtual
IHtmlContent
RenderBody()
84
/// <returns>An empty <see cref="
IHtmlContent
"/>.</returns>
100
/// <returns>An empty <see cref="
IHtmlContent
"/>.</returns>
119
/// A <see cref="Task{HtmlString}"/> that on completion returns an empty <see cref="
IHtmlContent
"/>.
138
/// A <see cref="Task{HtmlString}"/> that on completion returns an empty <see cref="
IHtmlContent
"/>.
RazorPageBase.cs (7)
40
private
IHtmlContent
? _bodyContent;
94
public
IHtmlContent
? BodyContent
121
/// handles non-<see cref="
IHtmlContent
"/> C# expressions.
212
/// non-<see cref="
IHtmlContent
"/> C# expressions. If <c>null</c>, does not change <see cref="HtmlEncoder"/>.
405
if (value is
IHtmlContent
htmlContent)
676
/// completion returns an empty <see cref="
IHtmlContent
"/>.</returns>
708
/// <returns>An empty <see cref="
IHtmlContent
"/>.</returns>
TagHelpers\UrlResolutionTagHelper.cs (3)
174
if (attribute.Value is
IHtmlContent
htmlContent)
191
if (TryResolveUrl(stringValue, resolvedUrl: out
IHtmlContent
? resolvedUrl))
243
protected bool TryResolveUrl([StringSyntax(StringSyntaxAttribute.Uri, UriKind.Relative)] string url, [NotNullWhen(true)] out
IHtmlContent
? resolvedUrl)
Microsoft.AspNetCore.Mvc.Razor.Test (14)
RazorPageTest.cs (10)
998
var
htmlContent = Assert.IsAssignableFrom<
IHtmlContent
>(htmlAttribute.Value);
1005
htmlContent = Assert.IsAssignableFrom<
IHtmlContent
>(allAttribute.Value);
1043
var
htmlContent = Assert.IsAssignableFrom<
IHtmlContent
>(htmlAttribute.Value);
1050
htmlContent = Assert.IsAssignableFrom<
IHtmlContent
>(allAttribute.Value);
1089
var
htmlContent = Assert.IsAssignableFrom<
IHtmlContent
>(htmlAttribute.Value);
1096
htmlContent = Assert.IsAssignableFrom<
IHtmlContent
>(allAttribute.Value);
1457
public
IHtmlContent
RenderBodyPublic()
src\Shared\Razor\CaseSensitiveBoundAttributeComparer.cs (2)
42
var
htmlContent = value as
IHtmlContent
;
TagHelpers\UrlResolutionTagHelperTest.cs (2)
191
var
htmlContent = Assert.IsAssignableFrom<
IHtmlContent
>(attribute.Value);
Microsoft.AspNetCore.Mvc.RazorPages (1)
Infrastructure\RazorPageAdapter.cs (1)
39
public
IHtmlContent
? BodyContent
Microsoft.AspNetCore.Mvc.TagHelpers (20)
Cache\DistributedCacheTagHelperService.cs (5)
37
private readonly ConcurrentDictionary<CacheTagKey, Task<
IHtmlContent
>> _workers;
61
_workers = new ConcurrentDictionary<CacheTagKey, Task<
IHtmlContent
>>();
65
public async Task<
IHtmlContent
> ProcessContentAsync(TagHelperOutput output, CacheTagKey key, DistributedCacheEntryOptions options)
67
IHtmlContent
content = null;
77
var tcs = new TaskCompletionSource<
IHtmlContent
>(creationOptions: TaskCreationOptions.RunContinuationsAsynchronously);
Cache\IDistributedCacheTagHelperService.cs (1)
23
Task<
IHtmlContent
> ProcessContentAsync(TagHelperOutput output, CacheTagKey key, DistributedCacheEntryOptions options);
CacheTagHelper.cs (7)
66
IHtmlContent
content;
70
if (MemoryCache.TryGetValue(cacheKey, out Task<
IHtmlContent
> cachedResult))
90
private async Task<
IHtmlContent
> CreateCacheEntry(CacheTagKey cacheKey, TagHelperOutput output)
97
var tcs = new TaskCompletionSource<
IHtmlContent
>(creationOptions: TaskCreationOptions.RunContinuationsAsynchronously);
104
IHtmlContent
content;
152
private long GetSize(
IHtmlContent
content)
204
private async Task<
IHtmlContent
> ProcessContentAsync(TagHelperOutput output)
DistributedCacheTagHelper.cs (1)
58
IHtmlContent
content;
FormTagHelper.cs (1)
313
var
antiforgeryTag = Generator.GenerateAntiforgery(ViewContext);
LinkTagHelper.cs (1)
413
if (attributeValue is
IHtmlContent
contentValue)
PersistComponentStateTagHelper.cs (1)
55
var
content = await componentPrerenderer.PrerenderPersistedStateAsync(ViewContext.HttpContext, serializationMode);
SelectTagHelper.cs (1)
128
var
options = Generator.GenerateGroupsAndOptions(optionLabel: null, selectList: items);
TagHelperOutputExtensions.cs (2)
270
case
IHtmlContent
htmlContent:
360
if (_left is
IHtmlContent
htmlContent)
Microsoft.AspNetCore.Mvc.TagHelpers.Test (4)
CacheTagHelperTest.cs (1)
522
var result = cache.TryGetValue(cacheTagKey, out Task<
IHtmlContent
> cachedValue);
src\Shared\Razor\CaseSensitiveBoundAttributeComparer.cs (2)
42
var
htmlContent = value as
IHtmlContent
;
TestableHtmlGenerator.cs (1)
94
public override
IHtmlContent
GenerateAntiforgery(ViewContext viewContext)
Microsoft.AspNetCore.Mvc.ViewFeatures (494)
AntiforgeryExtensions.cs (2)
24
/// A <see cref="
IHtmlContent
"/> containing an <input type="hidden"> element. This element should be put
31
public static
IHtmlContent
GetHtml(this IAntiforgery antiforgery, HttpContext httpContext)
Buffers\ViewBuffer.cs (5)
100
public IHtmlContentBuilder AppendHtml(
IHtmlContent
content)
196
if (value.Value is
IHtmlContent
valueAsHtmlContent)
242
if (value.Value is
IHtmlContent
valueAsHtmlContent)
277
destination.AppendHtml((
IHtmlContent
)value.Value);
314
destination.AppendHtml((
IHtmlContent
)value.Value);
Buffers\ViewBufferTextWriter.cs (5)
114
else if (value is
IHtmlContent
htmlContent)
125
/// Writes an <see cref="
IHtmlContent
"/> value.
127
/// <param name="value">The <see cref="
IHtmlContent
"/> value.</param>
128
public void Write(
IHtmlContent
value)
165
else if (value is
IHtmlContent
htmlContent)
Buffers\ViewBufferValue.cs (5)
11
/// Encapsulates a string or <see cref="
IHtmlContent
"/> value.
26
/// Initializes a new instance of <see cref="ViewBufferValue"/> with a <see cref="
IHtmlContent
"/> value.
28
/// <param name="content">The <see cref="
IHtmlContent
"/>.</param>
29
public ViewBufferValue(
IHtmlContent
content)
49
if (Value is
IHtmlContent
valueAsContent)
DefaultDisplayTemplates.cs (13)
18
public static
IHtmlContent
BooleanTemplate(IHtmlHelper htmlHelper)
31
private static
IHtmlContent
BooleanTemplateCheckbox(bool value)
46
private static
IHtmlContent
BooleanTemplateDropDownList(bool? value)
72
public static
IHtmlContent
CollectionTemplate(IHtmlHelper htmlHelper)
148
public static
IHtmlContent
DecimalTemplate(IHtmlHelper htmlHelper)
159
public static
IHtmlContent
EmailAddressTemplate(IHtmlHelper htmlHelper)
171
public static
IHtmlContent
HiddenInputTemplate(IHtmlHelper htmlHelper)
181
public static
IHtmlContent
HtmlTemplate(IHtmlHelper htmlHelper)
186
public static
IHtmlContent
ObjectTemplate(IHtmlHelper htmlHelper)
232
var
templateBuilderResult = templateBuilder.Build();
266
public static
IHtmlContent
StringTemplate(IHtmlHelper htmlHelper)
277
public static
IHtmlContent
UrlTemplate(IHtmlHelper htmlHelper)
288
private static
IHtmlContent
HyperlinkTemplate(string uriString, string linkedText)
DefaultEditorTemplates.cs (29)
23
public static
IHtmlContent
BooleanTemplate(IHtmlHelper htmlHelper)
36
private static
IHtmlContent
BooleanTemplateCheckbox(IHtmlHelper htmlHelper, bool value)
44
private static
IHtmlContent
BooleanTemplateDropDownList(IHtmlHelper htmlHelper, bool? value)
53
public static
IHtmlContent
CollectionTemplate(IHtmlHelper htmlHelper)
130
public static
IHtmlContent
DecimalTemplate(IHtmlHelper htmlHelper)
141
public static
IHtmlContent
HiddenInputTemplate(IHtmlHelper htmlHelper)
146
IHtmlContent
display;
157
var
hidden = htmlHelper.Hidden(expression: null, value: model, htmlAttributes: htmlAttributesObject);
218
public static
IHtmlContent
MultilineTemplate(IHtmlHelper htmlHelper)
228
public static
IHtmlContent
ObjectTemplate(IHtmlHelper htmlHelper)
274
var
templateBuilderResult = templateBuilder.Build();
277
var
label = htmlHelper.Label(propertyMetadata.PropertyName, labelText: null, htmlAttributes: null);
312
public static
IHtmlContent
PasswordTemplate(IHtmlHelper htmlHelper)
334
public static
IHtmlContent
StringTemplate(IHtmlHelper htmlHelper)
339
public static
IHtmlContent
PhoneNumberInputTemplate(IHtmlHelper htmlHelper)
344
public static
IHtmlContent
UrlInputTemplate(IHtmlHelper htmlHelper)
349
public static
IHtmlContent
EmailAddressInputTemplate(IHtmlHelper htmlHelper)
354
public static
IHtmlContent
DateTimeOffsetTemplate(IHtmlHelper htmlHelper)
360
public static
IHtmlContent
DateTimeLocalInputTemplate(IHtmlHelper htmlHelper)
366
public static
IHtmlContent
DateInputTemplate(IHtmlHelper htmlHelper)
372
public static
IHtmlContent
TimeInputTemplate(IHtmlHelper htmlHelper)
378
public static
IHtmlContent
MonthInputTemplate(IHtmlHelper htmlHelper)
386
public static
IHtmlContent
WeekInputTemplate(IHtmlHelper htmlHelper)
391
public static
IHtmlContent
NumberInputTemplate(IHtmlHelper htmlHelper)
396
public static
IHtmlContent
FileInputTemplate(IHtmlHelper htmlHelper)
403
public static
IHtmlContent
FileCollectionInputTemplate(IHtmlHelper htmlHelper)
435
private static
IHtmlContent
GenerateTextBox(IHtmlHelper htmlHelper, string inputType = null)
440
private static
IHtmlContent
GenerateTextBox(IHtmlHelper htmlHelper, string inputType, object value)
448
private static
IHtmlContent
GenerateTextBox(IHtmlHelper htmlHelper, object value, object htmlAttributes)
DefaultHtmlGenerator.cs (5)
165
public virtual
IHtmlContent
GenerateAntiforgery(ViewContext viewContext)
565
var
listItemBuilder = GenerateGroupsAndOptions(optionLabel, selectList, currentValues);
1548
public
IHtmlContent
GenerateGroupsAndOptions(string optionLabel, IEnumerable<SelectListItem> selectList)
1553
private static
IHtmlContent
GenerateGroupsAndOptions(
1640
private static
IHtmlContent
GenerateOption(SelectListItem item, ICollection<string> currentValues)
FormContext.cs (4)
23
private IList<
IHtmlContent
> _endOfFormContent;
69
/// Gets an <see cref="
IHtmlContent
"/> collection that should be rendered just prior to the next </form>
72
public IList<
IHtmlContent
> EndOfFormContent
78
_endOfFormContent = new List<
IHtmlContent
>();
HtmlHelper.cs (45)
189
public
IHtmlContent
ActionLink(
220
public
IHtmlContent
AntiForgeryToken()
222
var
html = _htmlGenerator.GenerateAntiforgery(ViewContext);
269
public
IHtmlContent
CheckBox(string expression, bool? isChecked, object htmlAttributes)
305
public
IHtmlContent
Display(
335
public
IHtmlContent
DropDownList(
350
public
IHtmlContent
Editor(
401
public
IHtmlContent
Hidden(string expression, object value, object htmlAttributes)
418
public
IHtmlContent
Label(string expression, string labelText, object htmlAttributes)
429
public
IHtmlContent
ListBox(string expression, IEnumerable<SelectListItem> selectList, object htmlAttributes)
445
public async Task<
IHtmlContent
> PartialAsync(
475
/// <returns><see cref="
IHtmlContent
"/>.</returns>
476
protected virtual
IHtmlContent
GenerateDisplay(
554
public
IHtmlContent
Password(string expression, object value, object htmlAttributes)
564
public
IHtmlContent
RadioButton(string expression, object value, bool? isChecked, object htmlAttributes)
575
public
IHtmlContent
Raw(string value)
581
public
IHtmlContent
Raw(object value)
587
public
IHtmlContent
RouteLink(
616
public
IHtmlContent
ValidationMessage(string expression, string message, object htmlAttributes, string tag)
627
public
IHtmlContent
ValidationSummary(
655
public
IHtmlContent
TextArea(string expression, string value, int rows, int columns, object htmlAttributes)
677
public
IHtmlContent
TextBox(string expression, object value, string format, object htmlAttributes)
714
protected virtual
IHtmlContent
GenerateCheckBox(
815
/// <returns>The <see cref="
IHtmlContent
"/>.</returns>
816
protected
IHtmlContent
GenerateDropDown(
846
/// <returns>The <see cref="
IHtmlContent
"/>.</returns>
847
protected virtual
IHtmlContent
GenerateEditor(
993
/// <returns>The <see cref="
IHtmlContent
"/>.</returns>
994
protected virtual
IHtmlContent
GenerateHidden(
1038
/// <returns>The <see cref="
IHtmlContent
"/>.</returns>
1039
protected virtual
IHtmlContent
GenerateLabel(
1090
/// <returns>The <see cref="
IHtmlContent
"/>.</returns>
1091
protected
IHtmlContent
GenerateListBox(
1134
/// <returns>The <see cref="
IHtmlContent
"/>.</returns>
1135
protected virtual
IHtmlContent
GeneratePassword(
1166
/// <returns>The <see cref="
IHtmlContent
"/>.</returns>
1167
protected virtual
IHtmlContent
GenerateRadioButton(
1200
/// <returns>The <see cref="
IHtmlContent
"/>.</returns>
1201
protected virtual
IHtmlContent
GenerateTextArea(
1234
/// <returns>The <see cref="
IHtmlContent
"/>.</returns>
1235
protected virtual
IHtmlContent
GenerateTextBox(
1268
/// <returns>The <see cref="
IHtmlContent
"/>.</returns>
1269
protected virtual
IHtmlContent
GenerateValidationMessage(
1301
/// <returns>The <see cref="
IHtmlContent
"/>.</returns>
1302
protected virtual
IHtmlContent
GenerateValidationSummary(
HtmlHelperOfT.cs (12)
91
public
IHtmlContent
CheckBoxFor(
106
public
IHtmlContent
DropDownListFor<TResult>(
124
public
IHtmlContent
DisplayFor<TResult>(
171
public
IHtmlContent
EditorFor<TResult>(
188
public
IHtmlContent
HiddenFor<TResult>(
212
public
IHtmlContent
LabelFor<TResult>(
224
public
IHtmlContent
ListBoxFor<TResult>(
247
public
IHtmlContent
PasswordFor<TResult>(
262
public
IHtmlContent
RadioButtonFor<TResult>(
280
public
IHtmlContent
TextAreaFor<TResult>(
293
public
IHtmlContent
TextBoxFor<TResult>(
341
public
IHtmlContent
ValidationMessageFor<TResult>(
IHtmlGenerator.cs (4)
114
/// An <see cref="
IHtmlContent
"/> instance for the <input type="hidden".../> element. Intended to be used
117
IHtmlContent
GenerateAntiforgery(ViewContext viewContext);
459
/// An <see cref="
IHtmlContent
"/> instance for <optgroup> and <option> elements.
461
IHtmlContent
GenerateGroupsAndOptions(string optionLabel, IEnumerable<SelectListItem> selectList);
IViewComponentHelper.cs (4)
24
/// <returns>A <see cref="Task"/> that on completion returns the rendered <see cref="
IHtmlContent
" />.
26
Task<
IHtmlContent
> InvokeAsync(string name, object? arguments);
37
/// <returns>A <see cref="Task"/> that on completion returns the rendered <see cref="
IHtmlContent
" />.
39
Task<
IHtmlContent
> InvokeAsync(Type componentType, object? arguments);
Rendering\HtmlHelperComponentExtensions.cs (3)
24
public static Task<
IHtmlContent
> RenderComponentAsync<TComponent>(this IHtmlHelper htmlHelper, RenderMode renderMode) where TComponent : IComponent
35
public static Task<
IHtmlContent
> RenderComponentAsync<TComponent>(
49
public static async Task<
IHtmlContent
> RenderComponentAsync(
Rendering\HtmlHelperDisplayExtensions.cs (32)
23
/// <returns>A new <see cref="
IHtmlContent
"/> containing the created HTML.</returns>
38
public static
IHtmlContent
Display(this IHtmlHelper htmlHelper, string expression)
60
/// <returns>A new <see cref="
IHtmlContent
"/> containing the created HTML.</returns>
75
public static
IHtmlContent
Display(
100
/// <returns>A new <see cref="
IHtmlContent
"/> containing the created HTML.</returns>
115
public static
IHtmlContent
Display(
141
/// <returns>A new <see cref="
IHtmlContent
"/> containing the created HTML.</returns>
156
public static
IHtmlContent
Display(
186
/// <returns>A new <see cref="
IHtmlContent
"/> containing the created HTML.</returns>
201
public static
IHtmlContent
Display(
220
/// <returns>A new <see cref="
IHtmlContent
"/> containing the created HTML.</returns>
231
public static
IHtmlContent
DisplayFor<TModel, TResult>(
259
/// <returns>A new <see cref="
IHtmlContent
"/> containing the created HTML.</returns>
270
public static
IHtmlContent
DisplayFor<TModel, TResult>(
295
/// <returns>A new <see cref="
IHtmlContent
"/> containing the created HTML.</returns>
306
public static
IHtmlContent
DisplayFor<TModel, TResult>(
336
/// <returns>A new <see cref="
IHtmlContent
"/> containing the created HTML.</returns>
347
public static
IHtmlContent
DisplayFor<TModel, TResult>(
377
/// <returns>A new <see cref="
IHtmlContent
"/> containing the created HTML.</returns>
388
public static
IHtmlContent
DisplayFor<TModel, TResult>(
409
/// <returns>A new <see cref="
IHtmlContent
"/> containing the created HTML.</returns>
420
public static
IHtmlContent
DisplayForModel(this IHtmlHelper htmlHelper)
441
/// <returns>A new <see cref="
IHtmlContent
"/> containing the created HTML.</returns>
452
public static
IHtmlContent
DisplayForModel(this IHtmlHelper htmlHelper, object additionalViewData)
469
/// <returns>A new <see cref="
IHtmlContent
"/> containing the created HTML.</returns>
480
public static
IHtmlContent
DisplayForModel(this IHtmlHelper htmlHelper, string templateName)
503
/// <returns>A new <see cref="
IHtmlContent
"/> containing the created HTML.</returns>
514
public static
IHtmlContent
DisplayForModel(
539
/// <returns>A new <see cref="
IHtmlContent
"/> containing the created HTML.</returns>
550
public static
IHtmlContent
DisplayForModel(
580
/// <returns>A new <see cref="
IHtmlContent
"/> containing the created HTML.</returns>
591
public static
IHtmlContent
DisplayForModel(
Rendering\HtmlHelperEditorExtensions.cs (32)
23
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element(s).</returns>
38
public static
IHtmlContent
Editor(this IHtmlHelper htmlHelper, string expression)
60
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element(s).</returns>
75
public static
IHtmlContent
Editor(
100
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element(s).</returns>
115
public static
IHtmlContent
Editor(this IHtmlHelper htmlHelper, string expression, string templateName)
138
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element(s).</returns>
153
public static
IHtmlContent
Editor(
183
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element(s).</returns>
198
public static
IHtmlContent
Editor(
217
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element(s).</returns>
228
public static
IHtmlContent
EditorFor<TModel, TResult>(
252
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element(s).</returns>
263
public static
IHtmlContent
EditorFor<TModel, TResult>(
288
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element(s).</returns>
299
public static
IHtmlContent
EditorFor<TModel, TResult>(
325
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element(s).</returns>
336
public static
IHtmlContent
EditorFor<TModel, TResult>(
366
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element(s).</returns>
377
public static
IHtmlContent
EditorFor<TModel, TResult>(
394
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element(s).</returns>
405
public static
IHtmlContent
EditorForModel(this IHtmlHelper htmlHelper)
426
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element(s).</returns>
437
public static
IHtmlContent
EditorForModel(this IHtmlHelper htmlHelper, object additionalViewData)
454
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element(s).</returns>
465
public static
IHtmlContent
EditorForModel(this IHtmlHelper htmlHelper, string templateName)
488
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element(s).</returns>
499
public static
IHtmlContent
EditorForModel(
524
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element(s).</returns>
535
public static
IHtmlContent
EditorForModel(
565
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element(s).</returns>
576
public static
IHtmlContent
EditorForModel(
Rendering\HtmlHelperInputExtensions.cs (54)
25
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> elements.</returns>
31
public static
IHtmlContent
CheckBox(this IHtmlHelper htmlHelper, string expression)
51
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> elements.</returns>
57
public static
IHtmlContent
CheckBox(
84
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> elements.</returns>
90
public static
IHtmlContent
CheckBox(
110
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> elements.</returns>
116
public static
IHtmlContent
CheckBoxFor<TModel>(
136
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element.</returns>
142
public static
IHtmlContent
Hidden(this IHtmlHelper htmlHelper, string expression)
161
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element.</returns>
167
public static
IHtmlContent
Hidden(
188
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element.</returns>
194
public static
IHtmlContent
HiddenFor<TModel, TResult>(
210
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element.</returns>
216
public static
IHtmlContent
Password(this IHtmlHelper htmlHelper, string expression)
230
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element.</returns>
236
public static
IHtmlContent
Password(
254
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element.</returns>
260
public static
IHtmlContent
PasswordFor<TModel, TResult>(
284
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element.</returns>
290
public static
IHtmlContent
RadioButton(
324
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element.</returns>
330
public static
IHtmlContent
RadioButton(
363
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element.</returns>
369
public static
IHtmlContent
RadioButton(
394
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element.</returns>
401
public static
IHtmlContent
RadioButtonFor<TModel, TResult>(
423
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element.</returns>
429
public static
IHtmlContent
TextBox(this IHtmlHelper htmlHelper, string expression)
448
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element.</returns>
454
public static
IHtmlContent
TextBox(
480
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element.</returns>
486
public static
IHtmlContent
TextBox(
515
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element.</returns>
521
public static
IHtmlContent
TextBox(
543
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element.</returns>
549
public static
IHtmlContent
TextBoxFor<TModel, TResult>(
574
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element.</returns>
580
public static
IHtmlContent
TextBoxFor<TModel, TResult>(
608
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element.</returns>
614
public static
IHtmlContent
TextBoxFor<TModel, TResult>(
635
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <textarea> element.</returns>
641
public static
IHtmlContent
TextArea(
665
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <textarea> element.</returns>
671
public static
IHtmlContent
TextArea(
693
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <textarea> element.</returns>
699
public static
IHtmlContent
TextArea(
726
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <textarea> element.</returns>
732
public static
IHtmlContent
TextArea(
754
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <textarea> element.</returns>
760
public static
IHtmlContent
TextAreaFor<TModel, TResult>(
786
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <textarea> element.</returns>
792
public static
IHtmlContent
TextAreaFor<TModel, TResult>(
Rendering\HtmlHelperLabelExtensions.cs (18)
19
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <label> element.</returns>
20
public static
IHtmlContent
Label(this IHtmlHelper htmlHelper, string expression)
33
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <label> element.</returns>
34
public static
IHtmlContent
Label(this IHtmlHelper htmlHelper, string expression, string labelText)
48
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <label> element.</returns>
49
public static
IHtmlContent
LabelFor<TModel, TResult>(
67
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <label> element.</returns>
68
public static
IHtmlContent
LabelFor<TModel, TResult>(
91
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <label> element.</returns>
92
public static
IHtmlContent
LabelFor<TModel, TResult>(
107
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <label> element.</returns>
108
public static
IHtmlContent
LabelForModel(this IHtmlHelper htmlHelper)
120
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <label> element.</returns>
121
public static
IHtmlContent
LabelForModel(this IHtmlHelper htmlHelper, string labelText)
137
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <label> element.</returns>
138
public static
IHtmlContent
LabelForModel(this IHtmlHelper htmlHelper, object htmlAttributes)
155
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <label> element.</returns>
156
public static
IHtmlContent
LabelForModel(
Rendering\HtmlHelperLinkExtensions.cs (22)
19
/// <returns>A new <see cref="
IHtmlContent
"/> containing the anchor element.</returns>
20
public static
IHtmlContent
ActionLink(
52
/// <returns>A new <see cref="
IHtmlContent
"/> containing the anchor element.</returns>
53
public static
IHtmlContent
ActionLink(
91
/// <returns>A new <see cref="
IHtmlContent
"/> containing the anchor element.</returns>
92
public static
IHtmlContent
ActionLink(
120
/// <returns>A new <see cref="
IHtmlContent
"/> containing the anchor element.</returns>
121
public static
IHtmlContent
ActionLink(
155
/// <returns>A new <see cref="
IHtmlContent
"/> containing the anchor element.</returns>
156
public static
IHtmlContent
ActionLink(
196
/// <returns>A new <see cref="
IHtmlContent
"/> containing the anchor element.</returns>
197
public static
IHtmlContent
ActionLink(
231
/// <returns>A new <see cref="
IHtmlContent
"/> containing the anchor element.</returns>
232
public static
IHtmlContent
RouteLink(
256
/// <returns>A new <see cref="
IHtmlContent
"/> containing the anchor element.</returns>
257
public static
IHtmlContent
RouteLink(
288
/// <returns>A new <see cref="
IHtmlContent
"/> containing the anchor element.</returns>
289
public static
IHtmlContent
RouteLink(
325
/// <returns>A new <see cref="
IHtmlContent
"/> containing the anchor element.</returns>
326
public static
IHtmlContent
RouteLink(
363
/// <returns>A new <see cref="
IHtmlContent
"/> containing the anchor element.</returns>
364
public static
IHtmlContent
RouteLink(
Rendering\HtmlHelperPartialExtensions.cs (14)
22
/// A <see cref="Task"/> that on completion returns a new <see cref="
IHtmlContent
"/> instance containing
25
public static Task<
IHtmlContent
> PartialAsync(
44
/// A <see cref="Task"/> that on completion returns a new <see cref="
IHtmlContent
"/> instance containing
47
public static Task<
IHtmlContent
> PartialAsync(
67
/// A <see cref="Task"/> that on completion returns a new <see cref="
IHtmlContent
"/> instance containing
70
public static Task<
IHtmlContent
> PartialAsync(
89
/// Returns a new <see cref="
IHtmlContent
"/> instance containing the created HTML.
95
public static
IHtmlContent
Partial(this IHtmlHelper htmlHelper, string partialViewName)
109
/// Returns a new <see cref="
IHtmlContent
"/> instance containing the created HTML.
115
public static
IHtmlContent
Partial(
132
/// Returns a new <see cref="
IHtmlContent
"/> instance containing the created HTML.
138
public static
IHtmlContent
Partial(this IHtmlHelper htmlHelper, string partialViewName, object model)
153
/// Returns a new <see cref="
IHtmlContent
"/> instance containing the created HTML.
159
public static
IHtmlContent
Partial(
Rendering\HtmlHelperSelectExtensions.cs (22)
25
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <select> element.</returns>
37
public static
IHtmlContent
DropDownList(this IHtmlHelper htmlHelper, string expression)
59
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <select> element.</returns>
71
public static
IHtmlContent
DropDownList(
103
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <select> element.</returns>
109
public static
IHtmlContent
DropDownList(
141
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <select> element.</returns>
147
public static
IHtmlContent
DropDownList(
179
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <select> element.</returns>
185
public static
IHtmlContent
DropDownList(
214
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <select> element.</returns>
220
public static
IHtmlContent
DropDownListFor<TModel, TResult>(
253
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <select> element.</returns>
259
public static
IHtmlContent
DropDownListFor<TModel, TResult>(
296
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <select> element.</returns>
302
public static
IHtmlContent
DropDownListFor<TModel, TResult>(
325
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <select> element.</returns>
337
public static
IHtmlContent
ListBox(this IHtmlHelper htmlHelper, string expression)
362
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <select> element.</returns>
368
public static
IHtmlContent
ListBox(
396
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <select> element.</returns>
402
public static
IHtmlContent
ListBoxFor<TModel, TResult>(
Rendering\HtmlHelperValidationExtensions.cs (54)
21
/// A new <see cref="
IHtmlContent
"/> containing a <see cref="ViewContext.ValidationMessageElement"/> element.
22
/// An empty <see cref="
IHtmlContent
"/> if the <paramref name="expression"/> is valid and client-side
29
public static
IHtmlContent
ValidationMessage(
50
/// A new <see cref="
IHtmlContent
"/> containing a <see cref="ViewContext.ValidationMessageElement"/> element.
51
/// An empty <see cref="
IHtmlContent
"/> if the <paramref name="expression"/> is valid and client-side
54
public static
IHtmlContent
ValidationMessage(
77
/// A new <see cref="
IHtmlContent
"/> containing a <see cref="ViewContext.ValidationMessageElement"/> element.
78
/// An empty <see cref="
IHtmlContent
"/> if the <paramref name="expression"/> is valid and client-side
85
public static
IHtmlContent
ValidationMessage(
111
/// A new <see cref="
IHtmlContent
"/> containing a <paramref name="tag"/> element. An empty
112
/// <see cref="
IHtmlContent
"/> if the <paramref name="expression"/> is valid and client-side validation is
115
public static
IHtmlContent
ValidationMessage(
144
/// A new <see cref="
IHtmlContent
"/> containing a <see cref="ViewContext.ValidationMessageElement"/> element.
145
/// An empty <see cref="
IHtmlContent
"/> if the <paramref name="expression"/> is valid and client-side
148
public static
IHtmlContent
ValidationMessage(
168
/// A new <see cref="
IHtmlContent
"/> containing a <see cref="ViewContext.ValidationMessageElement"/> element.
169
/// An empty <see cref="
IHtmlContent
"/> if the <paramref name="expression"/> is valid and client-side
176
public static
IHtmlContent
ValidationMessageFor<TModel, TResult>(
200
/// A new <see cref="
IHtmlContent
"/> containing a <see cref="ViewContext.ValidationMessageElement"/> element.
201
/// An empty <see cref="
IHtmlContent
"/> if the <paramref name="expression"/> is valid and client-side
204
public static
IHtmlContent
ValidationMessageFor<TModel, TResult>(
235
/// A new <see cref="
IHtmlContent
"/> containing a <see cref="ViewContext.ValidationMessageElement"/> element.
236
/// An empty <see cref="
IHtmlContent
"/> if the <paramref name="expression"/> is valid and client-side
239
public static
IHtmlContent
ValidationMessageFor<TModel, TResult>(
269
/// A new <see cref="
IHtmlContent
"/> containing the <paramref name="tag"/> element. An empty
270
/// <see cref="
IHtmlContent
"/> if the <paramref name="expression"/> is valid and client-side validation is
273
public static
IHtmlContent
ValidationMessageFor<TModel, TResult>(
291
/// New <see cref="
IHtmlContent
"/> containing a <div> element wrapping the <ul> element.
292
/// An empty <see cref="
IHtmlContent
"/> if the current model is valid and client-side validation is disabled.
294
public static
IHtmlContent
ValidationSummary(this IHtmlHelper htmlHelper)
314
/// New <see cref="
IHtmlContent
"/> containing a <div> element wrapping the <ul> element.
315
/// An empty <see cref="
IHtmlContent
"/> if the current model is valid and client-side validation is disabled.
317
public static
IHtmlContent
ValidationSummary(this IHtmlHelper htmlHelper, bool excludePropertyErrors)
335
/// New <see cref="
IHtmlContent
"/> containing a <div> element wrapping the
337
/// <paramref name="message"/>) and the <ul> element. An empty <see cref="
IHtmlContent
"/> if the current
340
public static
IHtmlContent
ValidationSummary(this IHtmlHelper htmlHelper, string message)
362
/// New <see cref="
IHtmlContent
"/> containing a <div> element wrapping the <paramref name="tag"/> element
363
/// and the <ul> element. An empty <see cref="
IHtmlContent
"/> if the current model is valid and
366
public static
IHtmlContent
ValidationSummary(this IHtmlHelper htmlHelper, string message, string tag)
387
/// New <see cref="
IHtmlContent
"/> containing a <div> element wrapping the
389
/// <paramref name="message"/>) and the <ul> element. An empty <see cref="
IHtmlContent
"/> if the current
392
public static
IHtmlContent
ValidationSummary(
418
/// New <see cref="
IHtmlContent
"/> containing a <div> element wrapping the
420
/// <paramref name="message"/>) and the <ul> element. An empty <see cref="
IHtmlContent
"/> if the current
423
public static
IHtmlContent
ValidationSummary(
453
/// New <see cref="
IHtmlContent
"/> containing a <div> element wrapping the <paramref name="tag"/> element
454
/// and the <ul> element. An empty <see cref="
IHtmlContent
"/> if the current model is valid and
457
public static
IHtmlContent
ValidationSummary(
486
/// New <see cref="
IHtmlContent
"/> containing a <div> element wrapping the <paramref name="tag"/> element
487
/// and the <ul> element. An empty <see cref="
IHtmlContent
"/> if the current model is valid and
490
public static
IHtmlContent
ValidationSummary(
520
/// New <see cref="
IHtmlContent
"/> containing a <div> element wrapping the
522
/// <paramref name="message"/>) and the <ul> element. An empty <see cref="
IHtmlContent
"/> if the current
525
public static
IHtmlContent
ValidationSummary(
Rendering\IHtmlHelper.cs (40)
77
/// <returns>A new <see cref="
IHtmlContent
"/> containing the anchor element.</returns>
78
IHtmlContent
ActionLink(
92
/// <returns><see cref="
IHtmlContent
"/> containing the <hidden> element.</returns>
93
IHtmlContent
AntiForgeryToken();
186
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> elements.</returns>
192
IHtmlContent
CheckBox(string expression, bool? isChecked, object htmlAttributes);
213
/// <returns>A new <see cref="
IHtmlContent
"/> containing the created HTML.</returns>
228
IHtmlContent
Display(
274
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <select> element.</returns>
280
IHtmlContent
DropDownList(
305
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element(s).</returns>
320
IHtmlContent
Editor(string expression, string templateName, string htmlFieldName, object additionalViewData);
415
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element.</returns>
421
IHtmlContent
Hidden(string expression, object value, object htmlAttributes);
439
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <label> element.</returns>
440
IHtmlContent
Label(string expression, string labelText, object htmlAttributes);
462
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <select> element.</returns>
468
IHtmlContent
ListBox(string expression, IEnumerable<SelectListItem> selectList, object htmlAttributes);
488
/// A <see cref="Task"/> that on completion returns a new <see cref="
IHtmlContent
"/> instance containing
491
Task<
IHtmlContent
> PartialAsync(string partialViewName, object model, ViewDataDictionary viewData);
505
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element.</returns>
511
IHtmlContent
Password(string expression, object value, object htmlAttributes);
544
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element.</returns>
550
IHtmlContent
RadioButton(string expression, object value, bool? isChecked, object htmlAttributes);
557
/// <returns>A new <see cref="
IHtmlContent
"/> containing the wrapped <see cref="string"/>.</returns>
558
IHtmlContent
Raw(string value);
565
/// <returns><see cref="
IHtmlContent
"/> containing the wrapped string representation.</returns>
566
IHtmlContent
Raw(object value);
600
/// <returns>A new <see cref="
IHtmlContent
"/> containing the anchor element.</returns>
601
IHtmlContent
RouteLink(
627
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <textarea> element.</returns>
633
IHtmlContent
TextArea(string expression, string value, int rows, int columns, object htmlAttributes);
655
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element.</returns>
661
IHtmlContent
TextBox(string expression, object value, string format, object htmlAttributes);
682
/// A new <see cref="
IHtmlContent
"/> containing a <paramref name="tag"/> element. An empty
683
/// <see cref="
IHtmlContent
"/> if the <paramref name="expression"/> is valid and client-side validation is
686
IHtmlContent
ValidationMessage(string expression, string message, object htmlAttributes, string tag);
705
/// New <see cref="
IHtmlContent
"/> containing a <div> element wrapping the <paramref name="tag"/> element
706
/// and the <ul> element. An empty <see cref="
IHtmlContent
"/> if the current model is valid and
709
IHtmlContent
ValidationSummary(
Rendering\IHtmlHelperOfT.cs (26)
38
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> elements.</returns>
44
IHtmlContent
CheckBoxFor(Expression<Func<TModel, bool>> expression, object htmlAttributes);
64
/// <returns>A new <see cref="
IHtmlContent
"/> containing the created HTML.</returns>
76
IHtmlContent
DisplayFor<TResult>(
136
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <select> element.</returns>
142
IHtmlContent
DropDownListFor<TResult>(
165
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element(s).</returns>
176
IHtmlContent
EditorFor<TResult>(
201
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element.</returns>
207
IHtmlContent
HiddenFor<TResult>(
229
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <label> element.</returns>
230
IHtmlContent
LabelFor<TResult>(
255
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <select> element.</returns>
261
IHtmlContent
ListBoxFor<TResult>(
287
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element.</returns>
293
IHtmlContent
PasswordFor<TResult>(
320
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element.</returns>
326
IHtmlContent
RadioButtonFor<TResult>(
332
new
IHtmlContent
Raw(object value);
335
new
IHtmlContent
Raw(string value);
352
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <textarea> element.</returns>
358
IHtmlContent
TextAreaFor<TResult>(
382
/// <returns>A new <see cref="
IHtmlContent
"/> containing the <input> element.</returns>
388
IHtmlContent
TextBoxFor<TResult>(
413
/// A new <see cref="
IHtmlContent
"/> containing the <paramref name="tag"/> element. <c>null</c> if the
416
IHtmlContent
ValidationMessageFor<TResult>(
Rendering\IJsonHelper.cs (2)
17
/// <returns>A new <see cref="
IHtmlContent
"/> containing the serialized JSON.</returns>
18
IHtmlContent
Serialize(object value);
Rendering\MvcForm.cs (2)
73
foreach (
var
content in formContext.EndOfFormContent)
80
foreach (
var
content in formContext.EndOfFormContent)
Rendering\SystemTextJsonHelper.cs (1)
21
public
IHtmlContent
Serialize(object value)
Rendering\TagBuilder.cs (12)
329
/// Returns an <see cref="
IHtmlContent
"/> that renders the body.
331
/// <returns>An <see cref="
IHtmlContent
"/> that renders the body.</returns>
332
public
IHtmlContent
? RenderBody() => _innerHtml;
335
/// Returns an <see cref="
IHtmlContent
"/> that renders the start tag.
337
/// <returns>An <see cref="
IHtmlContent
"/> that renders the start tag.</returns>
338
public
IHtmlContent
RenderStartTag() => new RenderTagHtmlContent(this, TagRenderMode.StartTag);
341
/// Returns an <see cref="
IHtmlContent
"/> that renders the end tag.
343
/// <returns>An <see cref="
IHtmlContent
"/> that renders the end tag.</returns>
344
public
IHtmlContent
RenderEndTag() => new RenderTagHtmlContent(this, TagRenderMode.EndTag);
347
/// Returns an <see cref="
IHtmlContent
"/> that renders the self-closing tag.
349
/// <returns>An <see cref="
IHtmlContent
"/> that renders the self-closing tag.</returns>
350
public
IHtmlContent
RenderSelfClosingTag() => new RenderTagHtmlContent(this, TagRenderMode.SelfClosing);
Rendering\ViewComponentHelperExtensions.cs (8)
20
/// <returns>A <see cref="Task"/> that on completion returns the rendered <see cref="
IHtmlContent
" />.
22
public static Task<
IHtmlContent
> InvokeAsync(this IViewComponentHelper helper, string name)
34
/// <returns>A <see cref="Task"/> that on completion returns the rendered <see cref="
IHtmlContent
" />.
36
public static Task<
IHtmlContent
> InvokeAsync(this IViewComponentHelper helper, Type componentType)
49
/// <returns>A <see cref="Task"/> that on completion returns the rendered <see cref="
IHtmlContent
" />.
51
public static Task<
IHtmlContent
> InvokeAsync<TComponent>(this IViewComponentHelper helper, object? arguments)
63
/// <returns>A <see cref="Task"/> that on completion returns the rendered <see cref="
IHtmlContent
" />.
65
public static Task<
IHtmlContent
> InvokeAsync<TComponent>(this IViewComponentHelper helper)
TemplateBuilder.cs (1)
59
public
IHtmlContent
Build()
TemplateRenderer.cs (6)
22
private static readonly Dictionary<string, Func<IHtmlHelper,
IHtmlContent
>> _defaultDisplayActions =
23
new Dictionary<string, Func<IHtmlHelper,
IHtmlContent
>>(StringComparer.OrdinalIgnoreCase)
37
private static readonly Dictionary<string, Func<IHtmlHelper,
IHtmlContent
>> _defaultEditorActions =
38
new Dictionary<string, Func<IHtmlHelper,
IHtmlContent
>>(StringComparer.OrdinalIgnoreCase)
99
public
IHtmlContent
Render()
140
private Dictionary<string, Func<IHtmlHelper,
IHtmlContent
>> GetDefaultActions()
ViewComponentResultExecutor.cs (2)
115
var
viewComponentResult = await GetViewComponentResult(viewComponentHelper, _logger, result);
142
private static Task<
IHtmlContent
> GetViewComponentResult(IViewComponentHelper viewComponentHelper, ILogger logger, ViewComponentResult result)
ViewComponents\DefaultViewComponentHelper.cs (3)
67
public Task<
IHtmlContent
> InvokeAsync(string name, object? arguments)
85
public Task<
IHtmlContent
> InvokeAsync(Type componentType, object? arguments)
129
private async Task<
IHtmlContent
> InvokeCoreAsync(ViewComponentDescriptor descriptor, object? arguments)
ViewComponents\DefaultViewComponentInvoker.cs (4)
125
else if (returnType == typeof(Task<
IHtmlContent
>))
133
resultAsObject = await (Task<
IHtmlContent
>)task;
187
if (value is
IHtmlContent
htmlContent)
194
typeof(
IHtmlContent
).Name,
ViewComponents\HtmlContentViewComponentResult.cs (3)
11
/// An <see cref="IViewComponentResult"/> which writes an <see cref="
IHtmlContent
"/> when executed.
22
public HtmlContentViewComponentResult(
IHtmlContent
encodedContent)
32
public
IHtmlContent
EncodedContent { get; }
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (419)
AntiforgeryExtensionsTest.cs (1)
26
var
inputElement = AntiforgeryExtensions.GetHtml(antiforgery.Object, new DefaultHttpContext());
Buffers\ViewBufferTest.cs (1)
25
Assert.IsAssignableFrom<
IHtmlContent
>(page.Buffer[0].Value);
DefaultDisplayTemplatesTest.cs (12)
59
var
result = DefaultDisplayTemplates.ObjectTemplate(html);
78
var
result = DefaultDisplayTemplates.ObjectTemplate(html);
108
var
result = DefaultDisplayTemplates.ObjectTemplate(html);
134
var
result = DefaultDisplayTemplates.ObjectTemplate(htmlHelper);
161
var
result = DefaultDisplayTemplates.ObjectTemplate(html);
203
var
result = DefaultDisplayTemplates.ObjectTemplate(html);
222
var
result = DefaultDisplayTemplates.HiddenInputTemplate(html);
248
var
result = DefaultDisplayTemplates.HiddenInputTemplate(html);
270
var
result = helper.Display("Property1");
292
var
result = helper.DisplayFor(m => m.Property1);
313
var
result = helper.Display("Property1");
337
var
result = helper.DisplayFor(m => m.Property1);
DefaultEditorTemplatesTest.cs (57)
91
public static TheoryData<
IHtmlContent
, string> ObjectTemplate_ChecksWriteTo_NotToStringData
96
var noopContentWithEmptyToString = new Mock<
IHtmlContent
>(MockBehavior.Strict);
103
var noopContentWithNonEmptyToString = new Mock<
IHtmlContent
>(MockBehavior.Strict);
110
var busyNoopContentWithNonEmptyToString = new Mock<
IHtmlContent
>(MockBehavior.Strict);
128
var writingContentWithEmptyToString = new Mock<
IHtmlContent
>(MockBehavior.Strict);
137
var writingContentWithNonEmptyToString = new Mock<
IHtmlContent
>(MockBehavior.Strict);
146
return new TheoryData<
IHtmlContent
, string>
196
var
result = DefaultEditorTemplates.ObjectTemplate(html);
233
var
result = DefaultEditorTemplates.ObjectTemplate(html);
241
public void ObjectTemplate_ChecksWriteTo_NotToString(
IHtmlContent
labelContent, string expectedLabel)
275
var
result = DefaultEditorTemplates.ObjectTemplate(helperMock.Object);
298
var
result = DefaultEditorTemplates.ObjectTemplate(html);
331
var
result = DefaultEditorTemplates.ObjectTemplate(html);
364
var
result = DefaultEditorTemplates.ObjectTemplate(htmlHelper);
394
var
result = DefaultEditorTemplates.ObjectTemplate(html);
438
var
result = DefaultEditorTemplates.ObjectTemplate(html);
460
var
result = DefaultEditorTemplates.HiddenInputTemplate(html);
487
var
result = DefaultEditorTemplates.HiddenInputTemplate(html);
511
var
result = DefaultEditorTemplates.MultilineTemplate(html);
539
var
result = DefaultEditorTemplates.PasswordTemplate(helper);
560
var
result = DefaultEditorTemplates.PasswordTemplate(helper);
589
var
result = helper.Editor(
621
var
result = helper.EditorFor(
664
var
result = helper.Editor(
706
var
result = helper.EditorFor(
749
var
result = helper.Editor(
791
var
result = helper.EditorFor(
817
var
result = helper.Editor("Property1");
862
var
result = helper.Editor(
934
var
result = helper.Editor(string.Empty);
1006
var
result = helper.Editor(string.Empty);
1075
var
result = helper.Editor(string.Empty);
1145
var
result = helper.Editor(string.Empty);
1212
var
result = helper.Editor(string.Empty);
1234
var
result = helper.EditorFor(m => m.Property1);
1257
var
result = helper.Editor("Property1");
1283
var
result = helper.EditorFor(m => m.Property1);
1409
public
IHtmlContent
ActionLink(
1422
public
IHtmlContent
AntiForgeryToken()
1448
public
IHtmlContent
CheckBox(string name, bool? isChecked, object htmlAttributes)
1453
public
IHtmlContent
Display(
1472
public
IHtmlContent
DropDownList(
1481
public
IHtmlContent
Editor(
1525
public
IHtmlContent
Hidden(string name, object value, object htmlAttributes)
1535
public
IHtmlContent
Label(string expression, string labelText, object htmlAttributes)
1540
public
IHtmlContent
ListBox(string name, IEnumerable<SelectListItem> selectList, object htmlAttributes)
1550
public Task<
IHtmlContent
> PartialAsync(
1558
public
IHtmlContent
Password(string name, object value, object htmlAttributes)
1563
public
IHtmlContent
RadioButton(string name, object value, bool? isChecked, object htmlAttributes)
1568
public
IHtmlContent
Raw(object value)
1573
public
IHtmlContent
Raw(string value)
1583
public
IHtmlContent
RouteLink(
1595
public
IHtmlContent
TextArea(string name, string value, int rows, int columns, object htmlAttributes)
1600
public
IHtmlContent
TextBox(string name, object value, string format, object htmlAttributes)
1605
public
IHtmlContent
ValidationMessage(string modelName, string message, object htmlAttributes, string tag)
1610
public
IHtmlContent
ValidationSummary(
1624
private
IHtmlContent
HelperName(string name, object htmlAttributes)
DefaultHtmlGeneratorTest.cs (2)
970
var
result = htmlGenerator.GenerateAntiforgery(viewContext);
994
var
result = htmlGenerator.GenerateAntiforgery(viewContext);
Rendering\HtmlHelperCheckboxTest.cs (40)
28
var
html = helper.CheckBox("Property3",
49
var
html = helper.CheckBox("Property3",
66
var
html = helper.CheckBox("foo",
120
var
html = helper.CheckBox(null, isChecked: false, htmlAttributes: attributes);
138
var
html = helper.CheckBox("Property1", isChecked: true, htmlAttributes: null);
157
var
html = helper.CheckBox("Property1", isChecked: true, htmlAttributes: null);
163
var
hiddenTag = Assert.Single(helper.ViewContext.FormContext.EndOfFormContent);
182
var
html = helper.CheckBox("Property1", isChecked: true, htmlAttributes: null);
203
var
html = helper.CheckBox("Property1", isChecked: true, htmlAttributes: null);
223
var
html = helper.CheckBox("Property1", isChecked: true, htmlAttributes: null);
229
var
hiddenTag = Assert.Single(helper.ViewContext.FormContext.EndOfFormContent);
249
var
html = helper.CheckBox("Property1", isChecked: true, htmlAttributes: null);
269
var
html = helper.CheckBox("Property1", isChecked: null, htmlAttributes: null);
288
var
html = helper.CheckBox("Property1", isChecked: null, htmlAttributes: null);
310
var
html = helper.CheckBox("Property1", isChecked: null, htmlAttributes: null);
331
var
html = helper.CheckBox("Prefix.Property1", isChecked: null, htmlAttributes: null);
353
var
html = helper.CheckBox("Property1", isChecked: null, htmlAttributes: null);
373
var
html = helper.CheckBox("Property1", isChecked: null, htmlAttributes: null);
394
var
html = helper.CheckBox("Property1", isChecked: null, htmlAttributes: null);
413
var
html = helper.CheckBox("Property1", isChecked: null, htmlAttributes: null);
433
var
html = helper.CheckBox("Property1", isChecked: null, htmlAttributes: null);
451
var
html = helper.CheckBox("Name", isChecked: null, htmlAttributes: null);
471
var
html = helper.CheckBox("Property1", isChecked: true, htmlAttributes: htmlAttributes);
489
var
html = helper.CheckBox("Property1", isChecked: false, htmlAttributes: dictionary);
509
var
html = helper.CheckBox("Property1", isChecked: false, htmlAttributes: dictionary);
535
var
html = helper.CheckBox(string.Empty, isChecked: false, htmlAttributes: attributes);
554
var
html = helper.CheckBox("ComplexProperty.Property1", isChecked: null, htmlAttributes: null);
574
var
html = helper.CheckBoxFor(m => m.Property1, htmlAttributes: null);
603
var
html = helper.CheckBoxFor(m => m.Property1, htmlAttributes: null);
622
var
html = helper.CheckBoxFor(m => m.Property3, new { @checked = "checked", value = "false" });
645
var
html = helper.CheckBoxFor(m => m.Name, htmlAttributes: null);
669
var
html = helper.CheckBoxFor(m => m.Property1, htmlAttributes: null);
689
var
html = helper.CheckBoxFor(m => m.Property1, htmlAttributes);
714
var
html = helper.CheckBoxFor(m => m.Property1, attributes);
735
var
html = helper.CheckBoxFor(m => m.Property1, attributes);
754
var
html = helper.CheckBoxFor(m => m.ComplexProperty.Property1, htmlAttributes: null);
767
var
checkboxResult = helper.CheckBox("Property1");
783
var
checkboxResult = helper.CheckBox("Property1", isChecked: true);
802
var
checkboxResult = helper.CheckBox("Property1", isChecked: false);
818
var
checkboxResult = helper.CheckBox("Property1", htmlAttributes: new { attr = "value" });
Rendering\HtmlHelperDisplayExtensionsTest.cs (20)
33
var
displayResult = helper.Display(expression: string.Empty);
34
var
displayNullResult = helper.Display(expression: null); // null is another alias for current model
35
var
displayForResult = helper.DisplayFor(m => m);
36
var
displayForModelResult = helper.DisplayForModel();
64
var
displayResult = helper.Display(expression: "SomeProperty", additionalViewData: new { SomeProperty = "ViewDataValue" });
86
var
displayResult = helper.Display(expression: "SomeProperty", templateName: "SomeTemplate");
148
var
displayResult = helper.DisplayFor(x => x.NonFormatProperty);
174
var
displayResult = helper.DisplayFor(x => x.FormatProperty);
199
var
displayResult = helper.Display(
227
var
displayResult = helper.Display(
255
var
displayResult = helper.DisplayFor(expression: m => m.SomeProperty, additionalViewData: new { SomeProperty = "ViewDataValue" });
277
var
displayResult = helper.DisplayFor(expression: m => m.SomeProperty, templateName: "SomeTemplate");
302
var
displayResult = helper.DisplayFor(
346
var
displayResult = helper.DisplayFor(m => m.Status);
374
var
displayResult = helper.DisplayFor(m => m.Status);
399
var
displayResult = helper.DisplayFor(
427
var
displayResult = helper.DisplayForModel(additionalViewData: new { SomeProperty = "ViewDataValue" });
449
var
displayResult = helper.DisplayForModel(templateName: "SomeTemplate");
474
var
displayResult = helper.DisplayForModel(
501
var
displayResult = helper.DisplayForModel(
Rendering\HtmlHelperDropDownListExtensionsTest.cs (9)
37
var
dropDownListResult = helper.DropDownList("Property1");
61
var
dropDownListResult = helper.DropDownList("Property1", "--select--");
86
var
dropDownListResult = helper.DropDownList("Property2", selectList);
112
var
dropDownListResult = helper.DropDownList("Property1", selectList, new { Key = "Value", name = "CustomName" });
138
var
dropDownListResult = helper.DropDownList("Property2", selectList, "--select--");
161
var
dropDownListForResult = helper.DropDownListFor(m => m.Property1, selectList: null);
187
var
dropDownListForResult = helper.DropDownListFor(m => m.Property2, selectList);
212
var
dropDownListForResult = helper.DropDownListFor(m => m.Property3[2], selectList, new { Key = "Value", name = "CustomName" });
238
var
dropDownListForResult = helper.DropDownListFor(m => m.Property2, selectList, "--select--");
Rendering\HtmlHelperEditorExtensionsTest.cs (2)
32
var
displayResult = helper.EditorFor(x => x.NonFormatProperty);
58
var
displayResult = helper.EditorFor(x => x.FormatProperty);
Rendering\HtmlHelperHiddenTest.cs (43)
55
var
result = helper.Hidden("ProductName", new byte[] { 23, 43, 53 }, htmlAttributes: null);
70
var
result = helper.Hidden("Property1", "test", attributes);
87
var
html = helper.Hidden("Prefix.Property1", value: null, htmlAttributes: null);
105
var
html = helper.Hidden("Property1", value: null, htmlAttributes: null);
122
var
html = helper.Hidden("Property1", value: null, htmlAttributes: null);
140
var
html = helper.Hidden("Property1", value: null, htmlAttributes: null);
156
var
result = helper.Hidden("Property1", "explicit-value", attributes);
172
var
result = helper.Hidden("Property1", "test", attributes);
188
var
result = helper.Hidden("Property1", "test", attributes);
203
var
result = helper.Hidden("Property1", value: "explicit-value", htmlAttributes: new { value = "attribute-value" });
219
var
result = helper.Hidden("Property1", value: "explicit-value", htmlAttributes: new { value = "attribute-value" });
235
var
result = helper.Hidden("Property1", value: null, htmlAttributes: new { value = "attribute-value" });
250
var
result = helper.Hidden("Property1", value: null, htmlAttributes: new { value = "attribute-value" });
267
var
html = helper.Hidden("Property1", value: null, htmlAttributes: new { value = "attribute-value" });
281
var
result = helper.Hidden("Property1", value: null, htmlAttributes: new { value = "attribute-value" });
297
var
html = helper.Hidden("Property1", value: null, htmlAttributes: new { value = "attribute-value" });
313
var
result = helper.Hidden("keyNotFound", value: null, htmlAttributes: attributes);
329
var
html = helper.Hidden("keyNotFound", value: null, htmlAttributes: null);
345
var
result = helper.Hidden("Property1", "PropValue", htmlAttributes: null);
360
var
result = helper.Hidden(string.Empty, "fooValue", htmlAttributes: null);
391
var
result = helper.Hidden("Property1", "explicit-value", htmlAttributes: null);
414
var
result = helper.Hidden("Property1", value: null, htmlAttributes: null);
454
var
result = helper.Hidden(expression: string.Empty, value: null, htmlAttributes: attributes);
474
var
result = helper.Hidden("Property1", value: null, htmlAttributes: attributes);
491
var
result = helper.Hidden("Property2", value: null, htmlAttributes: null);
537
var
result = helper.Hidden(expression, value: null, htmlAttributes: attributes);
576
var
result = helper.Hidden(expression, value: null, htmlAttributes: attributes);
591
var
result = helper.HiddenFor(m => m.Bytes, htmlAttributes: null);
606
var
result = helper.HiddenFor(m => m.Property1, htmlAttributes);
621
var
result = helper.HiddenFor(m => m.Property1, htmlAttributes: null);
637
var
result = helper.HiddenFor(m => m.Property1, htmlAttributes: null);
653
var
result = helper.HiddenFor(m => m.Property1, htmlAttributes: null);
668
var
result = helper.HiddenFor(m => m.Property1, attributes);
686
var
result = helper.HiddenFor(m => m.Property1, htmlAttributes: null);
718
var
result = helper.HiddenFor(m => m.Property1, htmlAttributes: null);
738
var
result = helper.HiddenFor(m => m.Property1, attributes);
755
var
result = helper.HiddenFor(m => m.Property2, htmlAttributes: null);
816
var
result = helper.HiddenFor(expression, attributes);
864
var
result = helper.HiddenFor(expression, attributes);
882
var
result = helper.HiddenFor(m => m.Property1, attributes);
898
var
hiddenResult = helper.Hidden("Property1");
916
var
hiddenForResult = helper.HiddenFor(m => m.Property1);
934
var
hiddenResult = helper.Hidden("Property1", value: "myvalue");
Rendering\HtmlHelperLabelExtensionsTest.cs (58)
22
var
labelResult = helper.Label(expression: string.Empty);
23
var
labelNullResult = helper.Label(expression: null); // null is another alias for current model
24
var
labelForResult = helper.LabelFor(m => m);
25
var
labelForModelResult = helper.LabelForModel();
42
var
labelResult = helper.Label(expression: string.Empty, labelText: "a label");
43
var
labelNullResult = helper.Label(expression: null, labelText: "a label");
44
var
labelForResult = helper.LabelFor(m => m, labelText: "a label");
45
var
labelForModelResult = helper.LabelForModel(labelText: "a label");
63
var
labelResult = helper.Label(expression: string.Empty, labelText: string.Empty);
64
var
labelNullResult = helper.Label(expression: null, labelText: string.Empty);
65
var
labelForResult = helper.LabelFor(m => m, labelText: string.Empty);
66
var
labelForModelResult = helper.LabelForModel(labelText: string.Empty);
83
var
labelResult = helper.Label("Property1");
84
var
labelForResult = helper.LabelFor(m => m.Property1);
99
var
labelResult = helper.Label("Inner.Id");
100
var
labelForResult = helper.LabelFor(m => m.Inner.Id);
123
var
labelResult = helper.Label(expression: string.Empty);
124
var
labelForResult = helper.LabelFor(m => m);
125
var
labelForModelResult = helper.LabelForModel();
142
var
labelResult = helper.Label(expression: "value");
162
var
labelResult = helper.Label(expression: string.Empty);
163
var
labelNullResult = helper.Label(expression: null); // null is another alias for current model
164
var
labelForResult = helper.LabelFor(m => m);
165
var
labelForModelResult = helper.LabelForModel();
191
var
labelResult = helper.Label(expression: string.Empty);
192
var
labelNullResult = helper.Label(expression: null); // null is another alias for current model
193
var
labelForResult = helper.LabelFor(m => m);
194
var
labelForModelResult = helper.LabelForModel();
216
var
labelResult = helper.Label(expression: string.Empty, labelText: "a label");
217
var
labelNullResult = helper.Label(expression: null, labelText: "a label");
218
var
labelForResult = helper.LabelFor(m => m, labelText: "a label");
219
var
labelForModelResult = helper.LabelForModel(labelText: "a label");
242
var
labelResult = helper.Label(expression: string.Empty, labelText: string.Empty);
243
var
labelNullResult = helper.Label(expression: null, labelText: string.Empty);
244
var
labelForResult = helper.LabelFor(m => m, labelText: string.Empty);
245
var
labelForModelResult = helper.LabelForModel(labelText: string.Empty);
268
var
labelResult = helper.Label(expression: string.Empty);
269
var
labelForResult = helper.LabelFor(m => m);
270
var
labelForModelResult = helper.LabelForModel();
298
var
labelResult = helper.Label(expression: string.Empty);
299
var
labelNullResult = helper.Label(expression: null); // null is another alias for current model
300
var
labelForResult = helper.LabelFor(m => m);
301
var
labelForModelResult = helper.LabelForModel();
324
var
labelResult = helper.Label(expression: nameof(DefaultTemplatesUtilities.ObjectTemplateModel.Property1));
325
var
labelForResult = helper.LabelFor(m => m.Property1);
345
var
labelResult = helper.Label(
348
var
labelForResult = helper.LabelFor(m => m.Property1, labelText: "a label");
369
var
labelResult = helper.Label(
372
var
labelForResult = helper.LabelFor(m => m.Property1, labelText: string.Empty);
393
var
labelResult = helper.Label("Property1");
394
var
labelForResult = helper.LabelFor(m => m.Property1);
415
var
result = helper.Label(expression);
444
var
result = helper.LabelFor(model => unknownKey);
457
var
labelResult = helper.Label("Property1", labelText: "Hello");
470
var
labelForResult = helper.LabelFor(m => m.Property1, labelText: "Hello");
483
var
labelForModelResult = helper.LabelForModel(labelText: "Hello");
496
var
labelForResult = helper.LabelFor(m => m.Property1, htmlAttributes: new { attr = "value" });
509
var
labelForModelResult = helper.LabelForModel(labelText: "Hello", htmlAttributes: new { attr = "value" });
Rendering\HtmlHelperLinkGenerationTest.cs (2)
76
var
actualLink = htmlHelper.ActionLink(
144
var
actualLink = htmlHelper.RouteLink(
Rendering\HtmlHelperListBoxExtensionsTest.cs (6)
37
var
listBoxResult = helper.ListBox("Property1");
62
var
listBoxResult = helper.ListBox("Property3", selectList);
87
var
listBoxResult = helper.ListBox("Property2", selectList, new { Key = "Value", name = "CustomName" });
109
var
listBoxForResult = helper.ListBoxFor(m => m.Property1, null);
134
var
listBoxForResult = helper.ListBoxFor(m => m.Property3, selectList);
159
var
listBoxForResult = helper.ListBoxFor(m => m.Property3, selectList, new { Key = "Value", name = "CustomName" });
Rendering\HtmlHelperPartialExtensionsTest.cs (28)
15
public static TheoryData<Func<IHtmlHelper,
IHtmlContent
>, object, ViewDataDictionary> PartialExtensionMethods
21
return new TheoryData<Func<IHtmlHelper,
IHtmlContent
>, object, ViewDataDictionary>
34
Func<IHtmlHelper,
IHtmlContent
> partialMethod,
39
var
htmlContent = Mock.Of<
IHtmlContent
>();
57
var
result = partialMethod(helper.Object);
67
Func<IHtmlHelper,
IHtmlContent
> partialMethod,
90
public static TheoryData<Func<IHtmlHelper, Task<
IHtmlContent
>>, object, ViewDataDictionary> PartialAsyncExtensionMethods
96
return new TheoryData<Func<IHtmlHelper, Task<
IHtmlContent
>>, object, ViewDataDictionary>
108
Func<IHtmlHelper, Task<
IHtmlContent
>> partialAsyncMethod,
113
var
htmlContent = Mock.Of<
IHtmlContent
>();
131
var
result = await partialAsyncMethod(helper.Object);
188
var
htmlContent = Mock.Of<
IHtmlContent
>();
236
var
htmlContent = Mock.Of<
IHtmlContent
>();
272
.Returns(Task.FromResult((
IHtmlContent
)expected))
278
var
actual = helper.Object.Partial("test");
293
.Returns(Task.FromResult((
IHtmlContent
)expected))
297
var
actual = helper.Object.Partial("test", model);
317
.Returns(Task.FromResult((
IHtmlContent
)expected))
323
var
actual = helper.Object.Partial("test", passedInViewData);
339
.Returns(Task.FromResult((
IHtmlContent
)expected))
343
var
actual = helper.Object.Partial("test", passedInModel, passedInViewData);
359
var
actual = helper.Partial("some-partial");
374
var
actual = helper.Partial("some-partial", model);
390
var
actual = helper.Partial("some-partial", viewData);
Rendering\HtmlHelperPasswordTest.cs (19)
68
var
result = helper.Password("Property1", value: null, htmlAttributes: attributes);
87
var
result = helper.Password("Property1", "explicit-value", attributes);
103
var
result = helper.Password("Property1", "explicit-value", htmlAttributes: null);
121
var
result = helper.Password("Property1", "explicit-value", htmlAttributes: null);
137
var
result = helper.Password(name, "explicit-value", htmlAttributes: null);
170
var
result = helper.Password(expression, value: null, htmlAttributes: htmlAttributes);
192
var
result = helper.Password("Property1", value: null, htmlAttributes: attributes);
209
var
result = helper.Password("Property2", value: null, htmlAttributes: null);
245
var
result = helper.Password(expression, value: null, htmlAttributes: attributes);
263
var
result = helper.PasswordFor(m => m.Property1, htmlAttributes);
278
var
result = helper.PasswordFor(m => m.Property1, htmlAttributes: null);
300
var
result = helper.PasswordFor(m => m.Property1, attributes);
317
var
result = helper.PasswordFor(m => m.Property2, htmlAttributes: null);
371
var
result = helper.PasswordFor(expression, attributes);
387
var
passwordResult = helper.Password("Property1");
405
var
passwordForResult = helper.PasswordFor(m => m.Property1);
423
var
passwordResult = helper.Password("Property1", value: "myvalue");
440
var
result = helper.PasswordFor(m => m.Property7, htmlAttributes: null);
520
var
result = helper.PasswordFor(expression);
Rendering\HtmlHelperRadioButtonExtensionsTest.cs (9)
23
var
radioButtonResult = helper.RadioButton("Property1", value: "myvalue");
38
var
radioButtonForResult = helper.RadioButtonFor(m => m.Property1, value: "myvalue");
58
var
radioButtonResult = helper.RadioButton("Property1", value: "myvalue");
78
var
radioButtonForResult = helper.RadioButtonFor(m => m.Property1, value: "myvalue");
93
var
radioButtonResult = helper.RadioButton("Property1", value: "myvalue", isChecked: true);
111
var
radioButtonResult = helper.RadioButton("Property2", value: "myvalue", isChecked: false);
131
var
radioButtonResult = helper.RadioButton("Property1", "myvalue", htmlAttributes);
152
var
radioButtonForResult = helper.RadioButtonFor(m => m.Property1, "myvalue", htmlAttributes);
194
var
radioButtonForResult = helper.RadioButtonFor(m => m, "myvalue", htmlAttributes);
Rendering\HtmlHelperSelectTest.cs (38)
334
var
html = helper.DropDownList("Property1", selectList, optionLabel: null, htmlAttributes: null);
358
var
html = helper.DropDownList("Property1", selectList: null, optionLabel: null, htmlAttributes: null);
398
var
html = helper.DropDownList("Property1", selectList, optionLabel: null, htmlAttributes: null);
434
var
html = helper.DropDownList("Property1", SourcesSelectList, optionLabel: null, htmlAttributes: null);
472
var
html = helper.DropDownList("Property1", SourcesSelectList, optionLabel: null, htmlAttributes: null);
497
var
html = helper.DropDownList("Property1", SourcesSelectList, optionLabel: null, htmlAttributes: null);
525
var
html = helper.DropDownList("Property1", SourcesSelectList, optionLabel: null, htmlAttributes: null);
552
var
html = helper.DropDownList("Property1", SourcesSelectList, optionLabel: null, htmlAttributes: null);
568
var
html = helper.DropDownList("Property1", SourcesSelectList, optionLabel: null, htmlAttributes: null);
585
var
html = helper.DropDownList("Property1", SourcesSelectList, optionLabel: null, htmlAttributes: null);
603
var
html = helper.DropDownListFor(
627
var
html = helper.DropDownListFor(
651
var
html = helper.DropDownListFor(
676
var
html = helper.DropDownListFor(
704
var
html = helper.DropDownListFor(
731
var
html = helper.DropDownListFor(value => unrelated, selectList, optionLabel: null, htmlAttributes: null);
755
var
html = helper.ListBox("Property1", selectList, htmlAttributes: null);
780
var
html = helper.ListBox("Property1", selectList, htmlAttributes: null);
801
var
html = helper.ListBox("Property1", selectList, htmlAttributes: null);
837
var
html = helper.ListBox("Property1", SourcesSelectList, htmlAttributes: null);
875
var
html = helper.ListBox("Property1", SourcesSelectList, htmlAttributes: null);
900
var
html = helper.ListBox("Property1", SourcesSelectList, htmlAttributes: null);
928
var
html = helper.ListBox("Property1", SourcesSelectList, htmlAttributes: null);
955
var
html = helper.ListBox("Property1", SourcesSelectList, htmlAttributes: null);
971
var
html = helper.ListBox("Property1", SourcesSelectList, htmlAttributes: null);
988
var
html = helper.ListBox("Property1", SourcesSelectList, htmlAttributes: null);
1007
var
html = helper.ListBoxFor(value => value.Property1, selectList, htmlAttributes: null);
1028
var
html = helper.ListBoxFor(value => value.Property1, selectList, htmlAttributes: null);
1052
var
html = helper.ListBoxFor(value => unrelated, selectList, htmlAttributes: null);
1073
var
html = helper.ListBoxFor(value => value.Property1, selectList, htmlAttributes: null);
1097
var
html = helper.DropDownList(
1125
var
html = helper.DropDownList(
1149
var
html = helper.DropDownListFor(value => value, selectList, optionLabel: null, htmlAttributes: null);
1169
var
html = helper.DropDownListFor(value => value, selectList, optionLabel: null, htmlAttributes: null);
1194
var
html = helper.ListBox(expression: string.Empty, selectList: selectList, htmlAttributes: null);
1220
var
html = helper.ListBox(expression: string.Empty, selectList: selectList, htmlAttributes: null);
1241
var
html = helper.ListBoxFor(value => value, selectList, htmlAttributes: null);
1263
var
html = helper.ListBoxFor(value => value, selectList, htmlAttributes: null);
Rendering\HtmlHelperTest.cs (2)
264
var
result = helper.Raw(value);
281
var
result = helper.Raw(value);
Rendering\HtmlHelperTextAreaExtensionsTest.cs (7)
25
var
textAreaResult = helper.TextArea("Property1");
44
var
textAreaForResult = helper.TextAreaFor(m => m.Property1);
63
var
textAreaResult = helper.TextArea("Property1", value: "myvalue");
82
var
textAreaResult = helper.TextArea("Property1", htmlAttributes: new { attr = "value" });
102
var
textAreaForResult = helper.TextAreaFor(m => m.Property1, htmlAttributes: new { attr = "value" });
119
var
textAreaResult = helper.TextArea("Property1", value: "myvalue", rows: 1, columns: 2, htmlAttributes: new { attr = "value" });
136
var
textAreaForResult = helper.TextAreaFor(m => m.Property1, rows: 1, columns: 2, htmlAttributes: new { attr = "value" });
Rendering\HtmlHelperTextAreaTest.cs (4)
19
var
textArea = helper.TextAreaFor(m => m.Property1);
34
var
textArea = helper.TextAreaFor(m => m.Property1);
82
var
result = helper.TextAreaFor(expression);
133
var
result = helper.TextAreaFor(expression);
Rendering\HtmlHelperTextBoxExtensionsTest.cs (8)
26
var
textBoxResult = helper.TextBox("Property1");
44
var
textBoxForResult = helper.TextBoxFor(m => m.Property1);
62
var
textBoxResult = helper.TextBox("Property1", value: "myvalue");
80
var
textBoxResult = helper.TextBox("Property1", value: null, format: "prefix: {0}");
98
var
textBoxResult = helper.TextBox("Property1", value: "myvalue", format: "prefix: {0}");
125
var
textBoxResult = helper.TextBox("Property1", "myvalue", htmlAttributes);
153
var
textBoxForResult = helper.TextBoxFor(m => m.Property1, htmlAttributes);
199
var
textBoxForResult = helper.TextBoxFor(m => m, htmlAttributes);
Rendering\HtmlHelperTextBoxTest.cs (4)
25
var
textBox = helper.TextBoxFor(m => m.Property1, new { type });
52
var
textBox = helper.TextBoxFor(m => m.Property1, new { type });
100
var
result = helper.TextBoxFor(expression);
151
var
result = helper.TextBoxFor(expression);
Rendering\HtmlHelperValidationMessageExtensionsTest.cs (8)
20
var
validationMessageResult = helper.ValidationMessage("Property1");
35
var
validationMessageForResult = helper.ValidationMessageFor(m => m.Property1);
50
var
validationMessageResult = helper.ValidationMessage("Property1", message: "Custom Message");
65
var
validationMessageForResult = helper.ValidationMessageFor(m => m.Property1, message: "Custom Message");
80
var
validationMessageResult = helper.ValidationMessage("Property1", message: "Custom Message", htmlAttributes: new { attr = "value" });
95
var
validationMessageForResult = helper.ValidationMessageFor(m => m.Property1, message: "Custom Message", htmlAttributes: new { attr = "value" });
110
var
validationMessageResult = helper.ValidationMessage("Property1", message: "Custom Message", tag: "div");
125
var
validationMessageForResult = helper.ValidationMessageFor(m => m.Property1, message: "Custom Message", tag: "div");
Rendering\HtmlHelperValidationSummaryTest.cs (22)
140
var
result = html.ValidationSummary(
163
var
result = html.ValidationSummary(
187
var
result = html.ValidationSummary(
212
var
result = html.ValidationSummary(
238
var
result = html.ValidationSummary(
263
var
result = html.ValidationSummary(
287
var
result = html.ValidationSummary(
317
var
result = html.ValidationSummary(
353
var
result = html.ValidationSummary(
383
var
result = html.ValidationSummary(
413
var
result = html.ValidationSummary(
447
var
result = html.ValidationSummary(
480
var
result = html.ValidationSummary(
498
var
validationSummaryResult = helper.ValidationSummary();
516
var
validationSummaryResult = helper.ValidationSummary(excludePropertyErrors: true);
530
var
validationSummaryResult = helper.ValidationSummary(message: "Custom Message");
549
var
validationSummaryResult = helper.ValidationSummary(message: "Custom Message", tag: "div");
569
var
validationSummaryResult = helper.ValidationSummary(excludePropertyErrors: true, message: "Custom Message");
588
var
validationSummaryResult = helper.ValidationSummary(message: "Custom Message", htmlAttributes: new { attr = "value" });
607
var
validationSummaryResult = helper.ValidationSummary(message: "Custom Message", htmlAttributes: new { attr = "value" }, tag: "div");
627
var
validationSummaryResult = helper.ValidationSummary(excludePropertyErrors: true, message: "Custom Message", tag: "div");
647
var
validationSummaryResult = helper.ValidationSummary(
Rendering\JsonHelperTestBase.cs (6)
24
var
result = helper.Serialize(obj);
39
var
result = helper.Serialize(value: null);
58
var
result = helper.Serialize(obj);
77
var
result = helper.Serialize(obj);
96
var
result = helper.Serialize(obj);
115
var
result = helper.Serialize(obj);
Rendering\SystemTextJsonHelperTest.cs (3)
31
var
result = helper.Serialize(obj);
50
var
result = helper.Serialize(obj);
82
var
result = helper.Serialize(obj);
Rendering\TagBuilderTest.cs (6)
204
var
tag = tagBuilder.RenderStartTag();
218
var
tag = tagBuilder.RenderStartTag();
232
var
tag = tagBuilder.RenderEndTag();
246
var
tag = tagBuilder.RenderEndTag();
260
var
tag = tagBuilder.RenderSelfClosingTag();
274
var
tag = tagBuilder.RenderBody();
ViewComponentResultTest.cs (2)
408
var result = Task.FromResult<
IHtmlContent
>(new HtmlContentBuilder().AppendHtml(expected));
450
var result = Task.FromResult<
IHtmlContent
>(new HtmlContentBuilder().AppendHtml(expected));
Microsoft.AspNetCore.Mvc.Views.TestCommon (1)
HtmlContentUtilities.cs (1)
12
public static string HtmlContentToString(
IHtmlContent
content, HtmlEncoder encoder = null)
Microsoft.AspNetCore.Razor (18)
TagHelpers\DefaultTagHelperContent.cs (5)
82
public override TagHelperContent AppendHtml(
IHtmlContent
htmlContent) => AppendCore(htmlContent);
214
((
IHtmlContent
)entry).WriteTo(writer, encoder);
235
destination.AppendHtml((
IHtmlContent
)entry);
256
destination.AppendHtml((
IHtmlContent
)entry);
274
((
IHtmlContent
)entry).WriteTo(writer, NullHtmlEncoder.Default);
TagHelpers\TagHelperAttribute.cs (6)
99
var
htmlContent = Value as
IHtmlContent
;
136
IHtmlContent
valueAsHtmlContent;
145
else if ((valueAsHtmlContent = Value as
IHtmlContent
) != null)
181
IHtmlContent
valueAsHtmlContent;
190
else if ((valueAsHtmlContent = Value as
IHtmlContent
) != null)
TagHelpers\TagHelperContent.cs (5)
28
/// <param name="htmlContent">The <see cref="
IHtmlContent
"/> that replaces the content.</param>
30
public TagHelperContent SetHtmlContent(
IHtmlContent
htmlContent)
74
/// <param name="htmlContent">The <see cref="
IHtmlContent
"/> to be appended.</param>
76
public abstract TagHelperContent AppendHtml(
IHtmlContent
htmlContent);
158
IHtmlContentBuilder IHtmlContentBuilder.AppendHtml(
IHtmlContent
content)
TagHelpers\TagHelperOutput.cs (2)
248
/// The <see cref="HtmlEncoder"/> to use when the page handles non-<see cref="
IHtmlContent
"/> C# expressions.
270
/// The <see cref="HtmlEncoder"/> to use when the page handles non-<see cref="
IHtmlContent
"/> C# expressions.
Microsoft.AspNetCore.Razor.Runtime.Test (2)
src\Shared\Razor\CaseSensitiveBoundAttributeComparer.cs (2)
42
var
htmlContent = value as
IHtmlContent
;
Microsoft.AspNetCore.Razor.Test (2)
src\Shared\Razor\CaseSensitiveBoundAttributeComparer.cs (2)
42
var
htmlContent = value as
IHtmlContent
;
Microsoft.Data.Analysis.Interactive (7)
DataFrameKernelExtension.cs (7)
44
var header = new List<
IHtmlContent
>
48
header.AddRange(df.Columns.Select(c => (
IHtmlContent
)th(c.Name)));
57
var rows = new List<List<
IHtmlContent
>>();
60
var cells = new List<
IHtmlContent
>
72
var footer = new List<
IHtmlContent
>();
110
var rows = new List<List<
IHtmlContent
>>();
113
var cells = new List<
IHtmlContent
>
Microsoft.ML.AutoML.Interactive (3)
AutoMLMonitorKernelExtension.cs (3)
48
var summary = new List<
IHtmlContent
>();
82
var chartHeader = new List<
IHtmlContent
>();
98
var tableHeader = new List<
IHtmlContent
>();