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