React to new ctor for TagHelperContext
Razor issue: aspnet/Razor#1065 Razor PR: aspnet/Razor#1066
This commit is contained in:
parent
1c74e31715
commit
cd9899363f
|
|
@ -88,6 +88,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.TagHelpers
|
|||
var tagHelper = new UrlResolutionTagHelper(urlHelperFactory.Object, new HtmlTestEncoder());
|
||||
|
||||
var context = new TagHelperContext(
|
||||
tagName: "a",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
@ -144,6 +145,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.TagHelpers
|
|||
var tagHelper = new UrlResolutionTagHelper(urlHelperFactory.Object, new HtmlTestEncoder());
|
||||
|
||||
var context = new TagHelperContext(
|
||||
tagName: "a",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
@ -199,6 +201,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.TagHelpers
|
|||
var tagHelper = new UrlResolutionTagHelper(urlHelperFactory.Object, new HtmlTestEncoder());
|
||||
|
||||
var context = new TagHelperContext(
|
||||
tagName: "a",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
@ -254,6 +257,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.TagHelpers
|
|||
var tagHelper = new UrlResolutionTagHelper(urlHelperFactory.Object, new HtmlTestEncoder());
|
||||
|
||||
var context = new TagHelperContext(
|
||||
tagName: "a",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
@ -284,6 +288,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.TagHelpers
|
|||
var tagHelper = new UrlResolutionTagHelper(urlHelperFactory: null, htmlEncoder: null);
|
||||
|
||||
var context = new TagHelperContext(
|
||||
tagName: "a",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
@ -329,6 +334,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.TagHelpers
|
|||
var tagHelper = new UrlResolutionTagHelper(urlHelperFactory.Object, new HtmlTestEncoder());
|
||||
|
||||
var context = new TagHelperContext(
|
||||
tagName: "a",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
var metadataProvider = new TestModelMetadataProvider();
|
||||
|
||||
var tagHelperContext = new TagHelperContext(
|
||||
tagName: "not-a",
|
||||
allAttributes: new TagHelperAttributeList
|
||||
{
|
||||
{ "id", "myanchor" },
|
||||
|
|
@ -93,6 +94,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
{
|
||||
// Arrange
|
||||
var context = new TagHelperContext(
|
||||
tagName: "a",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
@ -142,6 +144,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
{
|
||||
// Arrange
|
||||
var context = new TagHelperContext(
|
||||
tagName: "a",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
@ -193,6 +196,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
{
|
||||
// Arrange
|
||||
var context = new TagHelperContext(
|
||||
tagName: "a",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
@ -250,6 +254,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
{
|
||||
// Arrange
|
||||
var context = new TagHelperContext(
|
||||
tagName: "a",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
@ -308,6 +313,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
{
|
||||
// Arrange
|
||||
var context = new TagHelperContext(
|
||||
tagName: "a",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
@ -398,6 +404,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
"'asp-fragment' attribute.";
|
||||
|
||||
var context = new TagHelperContext(
|
||||
tagName: "test",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
@ -433,6 +440,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
"'asp-route' must not have an 'asp-action' or 'asp-controller' attribute.";
|
||||
|
||||
var context = new TagHelperContext(
|
||||
tagName: "test",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
var cacheEntryOptions = new MemoryCacheEntryOptions()
|
||||
.AddExpirationToken(new CancellationChangeToken(tokenSource.Token));
|
||||
var tagHelperContext = new TagHelperContext(
|
||||
tagName: "cache",
|
||||
allAttributes: new TagHelperAttributeList(),
|
||||
items: new Dictionary<object, object>(),
|
||||
uniqueId: id);
|
||||
|
|
@ -661,6 +662,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
private static TagHelperContext GetTagHelperContext(string id = "testid")
|
||||
{
|
||||
return new TagHelperContext(
|
||||
tagName: "cache",
|
||||
allAttributes: new TagHelperAttributeList(),
|
||||
items: new Dictionary<object, object>(),
|
||||
uniqueId: id);
|
||||
|
|
|
|||
|
|
@ -384,6 +384,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
private static TagHelperContext GetTagHelperContext(string id = "testid")
|
||||
{
|
||||
return new TagHelperContext(
|
||||
tagName: "test",
|
||||
allAttributes: new TagHelperAttributeList(),
|
||||
items: new Dictionary<object, object>(),
|
||||
uniqueId: id);
|
||||
|
|
|
|||
|
|
@ -728,6 +728,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
private static TagHelperContext GetTagHelperContext()
|
||||
{
|
||||
return new TagHelperContext(
|
||||
tagName: "test",
|
||||
allAttributes: new TagHelperAttributeList(),
|
||||
items: new Dictionary<object, object>(),
|
||||
uniqueId: "testid");
|
||||
|
|
|
|||
|
|
@ -214,7 +214,8 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers.Test
|
|||
attributes = attributes ?? new TagHelperAttributeList();
|
||||
|
||||
return new TagHelperContext(
|
||||
attributes,
|
||||
tagName: "env",
|
||||
allAttributes: attributes,
|
||||
items: new Dictionary<object, object>(),
|
||||
uniqueId: Guid.NewGuid().ToString("N"));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
var metadataProvider = new TestModelMetadataProvider();
|
||||
|
||||
var tagHelperContext = new TagHelperContext(
|
||||
tagName: "form-action",
|
||||
allAttributes: new TagHelperAttributeList
|
||||
{
|
||||
{ "id", "my-id" },
|
||||
|
|
@ -100,6 +101,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
var metadataProvider = new TestModelMetadataProvider();
|
||||
|
||||
var tagHelperContext = new TagHelperContext(
|
||||
tagName: "form-action",
|
||||
allAttributes: new TagHelperAttributeList
|
||||
{
|
||||
{ "id", "my-id" },
|
||||
|
|
@ -203,6 +205,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
{
|
||||
// Arrange
|
||||
var context = new TagHelperContext(
|
||||
tagName: "form-action",
|
||||
allAttributes: new TagHelperAttributeList(),
|
||||
items: new Dictionary<object, object>(),
|
||||
uniqueId: "test");
|
||||
|
|
@ -262,6 +265,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
{
|
||||
// Arrange
|
||||
var context = new TagHelperContext(
|
||||
tagName: "form-action",
|
||||
allAttributes: new TagHelperAttributeList(),
|
||||
items: new Dictionary<object, object>(),
|
||||
uniqueId: "test");
|
||||
|
|
@ -339,6 +343,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
{
|
||||
// Arrange
|
||||
var context = new TagHelperContext(
|
||||
tagName: "form-action",
|
||||
allAttributes: new TagHelperAttributeList(),
|
||||
items: new Dictionary<object, object>(),
|
||||
uniqueId: "test");
|
||||
|
|
@ -392,6 +397,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
{
|
||||
// Arrange
|
||||
var context = new TagHelperContext(
|
||||
tagName: "form-action",
|
||||
allAttributes: new TagHelperAttributeList(),
|
||||
items: new Dictionary<object, object>(),
|
||||
uniqueId: "test");
|
||||
|
|
@ -472,6 +478,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
"'asp-action', 'asp-controller', 'asp-area', 'asp-fragment', or 'asp-route' attribute.";
|
||||
|
||||
var context = new TagHelperContext(
|
||||
tagName: "form-action",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
@ -507,6 +514,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
"elements with a specified 'asp-route' must not have an 'asp-action', 'asp-controller', or 'asp-fragment' attribute.";
|
||||
|
||||
var context = new TagHelperContext(
|
||||
tagName: "form-action",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
var expectedTagName = "not-form";
|
||||
var metadataProvider = new TestModelMetadataProvider();
|
||||
var tagHelperContext = new TagHelperContext(
|
||||
tagName: "form",
|
||||
allAttributes: new TagHelperAttributeList
|
||||
{
|
||||
{ "id", "myform" },
|
||||
|
|
@ -115,6 +116,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
var viewContext = CreateViewContext();
|
||||
var expectedAttribute = new TagHelperAttribute("method", method.ToString().ToLowerInvariant());
|
||||
var context = new TagHelperContext(
|
||||
tagName: "form",
|
||||
allAttributes: new TagHelperAttributeList(new[] { expectedAttribute }),
|
||||
items: new Dictionary<object, object>(),
|
||||
uniqueId: "test");
|
||||
|
|
@ -167,6 +169,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
// Arrange
|
||||
var testViewContext = CreateViewContext();
|
||||
var context = new TagHelperContext(
|
||||
tagName: "form",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
@ -239,6 +242,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
// Arrange
|
||||
var viewContext = CreateViewContext();
|
||||
var context = new TagHelperContext(
|
||||
tagName: "form",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
@ -291,6 +295,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
var expectedTagName = "form";
|
||||
var metadataProvider = new TestModelMetadataProvider();
|
||||
var tagHelperContext = new TagHelperContext(
|
||||
tagName: "form",
|
||||
allAttributes: new TagHelperAttributeList
|
||||
{
|
||||
{ "id", "myform" },
|
||||
|
|
@ -356,6 +361,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
// Arrange
|
||||
var viewContext = CreateViewContext();
|
||||
var context = new TagHelperContext(
|
||||
tagName: "form",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
@ -412,6 +418,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
// Arrange
|
||||
var viewContext = CreateViewContext();
|
||||
var context = new TagHelperContext(
|
||||
tagName: "form",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
@ -468,6 +475,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
// Arrange
|
||||
var viewContext = CreateViewContext();
|
||||
var context = new TagHelperContext(
|
||||
tagName: "form",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
@ -525,6 +533,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
// Arrange
|
||||
var viewContext = CreateViewContext();
|
||||
var context = new TagHelperContext(
|
||||
tagName: "form",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
@ -606,6 +615,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
return Task.FromResult<TagHelperContent>(tagHelperContent);
|
||||
});
|
||||
var context = new TagHelperContext(
|
||||
tagName: "form",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
@ -654,6 +664,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
"'asp-action', 'asp-controller', 'asp-fragment', 'asp-area', or 'asp-route' attribute.";
|
||||
|
||||
var context = new TagHelperContext(
|
||||
tagName: "form",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
@ -685,6 +696,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
"'asp-route' must not have an 'asp-action', 'asp-controller', or 'asp-fragment' attribute.";
|
||||
|
||||
var context = new TagHelperContext(
|
||||
tagName: "form",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
|
|||
|
|
@ -284,7 +284,8 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
TagHelperAttributeList attributes)
|
||||
{
|
||||
return new TagHelperContext(
|
||||
attributes,
|
||||
tagName: "image",
|
||||
allAttributes: attributes,
|
||||
items: new Dictionary<object, object>(),
|
||||
uniqueId: Guid.NewGuid().ToString("N"));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,6 +88,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
"<input name=\"HtmlEncode[[IsACar]]\" type=\"HtmlEncode[[hidden]]\" value=\"HtmlEncode[[false]]\" />";
|
||||
|
||||
var context = new TagHelperContext(
|
||||
tagName: "input",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
@ -135,6 +136,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
};
|
||||
|
||||
var context = new TagHelperContext(
|
||||
tagName: "input",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
@ -181,6 +183,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
};
|
||||
|
||||
var context = new TagHelperContext(
|
||||
tagName: "input",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
@ -224,6 +227,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
};
|
||||
|
||||
var context = new TagHelperContext(
|
||||
tagName: "input",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
@ -330,6 +334,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
var expectedTagName = "not-input";
|
||||
|
||||
var context = new TagHelperContext(
|
||||
tagName: "input",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
@ -409,6 +414,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
{ "type", specifiedType },
|
||||
};
|
||||
var context = new TagHelperContext(
|
||||
tagName: "input",
|
||||
allAttributes: allAttributes,
|
||||
items: new Dictionary<object, object>(),
|
||||
uniqueId: "test");
|
||||
|
|
@ -464,6 +470,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
var expectedPostContent = "original post-content";
|
||||
|
||||
var context = new TagHelperContext(
|
||||
tagName: "input",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
@ -567,6 +574,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
var expectedTagName = "not-input";
|
||||
|
||||
var context = new TagHelperContext(
|
||||
tagName: "input",
|
||||
allAttributes: contextAttributes,
|
||||
items: new Dictionary<object, object>(),
|
||||
uniqueId: "test");
|
||||
|
|
@ -669,6 +677,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
var expectedTagName = "not-input";
|
||||
|
||||
var context = new TagHelperContext(
|
||||
tagName: "input",
|
||||
allAttributes: contextAttributes,
|
||||
items: new Dictionary<object, object>(),
|
||||
uniqueId: "test");
|
||||
|
|
@ -768,6 +777,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
var expectedTagName = "not-input";
|
||||
|
||||
var context = new TagHelperContext(
|
||||
tagName: "input",
|
||||
allAttributes: contextAttributes,
|
||||
items: new Dictionary<object, object>(),
|
||||
uniqueId: "test");
|
||||
|
|
@ -879,6 +889,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
var expectedTagName = "not-input";
|
||||
|
||||
var context = new TagHelperContext(
|
||||
tagName: "input",
|
||||
allAttributes: contextAttributes,
|
||||
items: new Dictionary<object, object>(),
|
||||
uniqueId: "test");
|
||||
|
|
@ -999,6 +1010,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
var expectedTagName = "not-input";
|
||||
|
||||
var context = new TagHelperContext(
|
||||
tagName: "input",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
@ -1069,6 +1081,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
var expectedTagName = "not-input";
|
||||
|
||||
var context = new TagHelperContext(
|
||||
tagName: "input",
|
||||
allAttributes: new TagHelperAttributeList()
|
||||
{
|
||||
{"type", "datetime" }
|
||||
|
|
@ -1154,6 +1167,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
var expectedTagName = "not-input";
|
||||
|
||||
var context = new TagHelperContext(
|
||||
tagName: "input",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
|
|||
|
|
@ -96,7 +96,8 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers.Internal
|
|||
private static TagHelperContext MakeTagHelperContext(TagHelperAttributeList attributes)
|
||||
{
|
||||
return new TagHelperContext(
|
||||
attributes,
|
||||
tagName: "test",
|
||||
allAttributes: attributes,
|
||||
items: new Dictionary<object, object>(),
|
||||
uniqueId: Guid.NewGuid().ToString("N"));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -190,6 +190,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
var expectedPostContent = "original post-content";
|
||||
|
||||
var tagHelperContext = new TagHelperContext(
|
||||
tagName: "not-label",
|
||||
allAttributes: new TagHelperAttributeList(),
|
||||
items: new Dictionary<object, object>(),
|
||||
uniqueId: "test");
|
||||
|
|
|
|||
|
|
@ -1001,7 +1001,8 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
attributes = attributes ?? new TagHelperAttributeList();
|
||||
|
||||
return new TagHelperContext(
|
||||
attributes,
|
||||
tagName: "link",
|
||||
allAttributes: attributes,
|
||||
items: new Dictionary<object, object>(),
|
||||
uniqueId: Guid.NewGuid().ToString("N"));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -401,7 +401,8 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
}
|
||||
|
||||
var tagHelperContext = new TagHelperContext(
|
||||
contextAttributes,
|
||||
tagName: "option",
|
||||
allAttributes: contextAttributes,
|
||||
items: new Dictionary<object, object>(),
|
||||
uniqueId: "test");
|
||||
|
||||
|
|
@ -472,7 +473,8 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
var originalPreContent = "original pre-content";
|
||||
var originalPostContent = "original post-content";
|
||||
var tagHelperContext = new TagHelperContext(
|
||||
contextAttributes,
|
||||
tagName: "option",
|
||||
allAttributes: contextAttributes,
|
||||
items: new Dictionary<object, object>(),
|
||||
uniqueId: "test");
|
||||
var output = new TagHelperOutput(
|
||||
|
|
@ -535,7 +537,8 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
var originalPreContent = "original pre-content";
|
||||
var originalPostContent = "original post-content";
|
||||
var tagHelperContext = new TagHelperContext(
|
||||
contextAttributes,
|
||||
tagName: "option",
|
||||
allAttributes: contextAttributes,
|
||||
items: new Dictionary<object, object>(),
|
||||
uniqueId: "test");
|
||||
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
});
|
||||
|
||||
var tagHelperContext = new TagHelperContext(
|
||||
"test",
|
||||
new TagHelperAttributeList(),
|
||||
new Dictionary<object, object>(),
|
||||
"someId");
|
||||
|
|
|
|||
|
|
@ -908,7 +908,8 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
attributes = attributes ?? new TagHelperAttributeList();
|
||||
|
||||
return new TagHelperContext(
|
||||
attributes,
|
||||
tagName: "script",
|
||||
allAttributes: attributes,
|
||||
items: new Dictionary<object, object>(),
|
||||
uniqueId: Guid.NewGuid().ToString("N"));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -201,6 +201,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
var modelExpression = new ModelExpression(nameAndId.Name, modelExplorer);
|
||||
|
||||
var tagHelperContext = new TagHelperContext(
|
||||
tagName: "select",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
@ -290,6 +291,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
var modelExpression = new ModelExpression(nameAndId.Name, modelExplorer);
|
||||
|
||||
var tagHelperContext = new TagHelperContext(
|
||||
tagName: "select",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
@ -380,6 +382,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
var expectedTagName = "select";
|
||||
|
||||
var tagHelperContext = new TagHelperContext(
|
||||
tagName: "select",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
@ -468,6 +471,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
var modelExpression = new ModelExpression(name: string.Empty, modelExplorer: modelExplorer);
|
||||
|
||||
var tagHelperContext = new TagHelperContext(
|
||||
tagName: "select",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
@ -556,7 +560,8 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
var expectedTagName = "select";
|
||||
|
||||
var tagHelperContext = new TagHelperContext(
|
||||
contextAttributes,
|
||||
tagName: "select",
|
||||
allAttributes: contextAttributes,
|
||||
items: new Dictionary<object, object>(),
|
||||
uniqueId: "test");
|
||||
|
||||
|
|
@ -638,7 +643,8 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
var tagName = "select";
|
||||
|
||||
var tagHelperContext = new TagHelperContext(
|
||||
contextAttributes,
|
||||
tagName: "select",
|
||||
allAttributes: contextAttributes,
|
||||
items: new Dictionary<object, object>(),
|
||||
uniqueId: "test");
|
||||
var output = new TagHelperOutput(
|
||||
|
|
|
|||
|
|
@ -340,7 +340,8 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
getChildContentAsync: (useCachedResult, encoder) => Task.FromResult<TagHelperContent>(
|
||||
new DefaultTagHelperContent()));
|
||||
var context = new TagHelperContext(
|
||||
allAttributes,
|
||||
tagName: "p",
|
||||
allAttributes: allAttributes,
|
||||
items: new Dictionary<object, object>(),
|
||||
uniqueId: "test");
|
||||
|
||||
|
|
@ -441,7 +442,8 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
getChildContentAsync: (useCachedResult, encoder) => Task.FromResult<TagHelperContent>(
|
||||
new DefaultTagHelperContent()));
|
||||
var context = new TagHelperContext(
|
||||
allAttributes,
|
||||
tagName: "p",
|
||||
allAttributes: allAttributes,
|
||||
items: new Dictionary<object, object>(),
|
||||
uniqueId: "test");
|
||||
|
||||
|
|
@ -468,6 +470,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
return Task.FromResult<TagHelperContent>(tagHelperContent);
|
||||
});
|
||||
var tagHelperContext = new TagHelperContext(
|
||||
tagName: "p",
|
||||
allAttributes: new TagHelperAttributeList
|
||||
{
|
||||
{ attributeName, attributeValue }
|
||||
|
|
@ -503,6 +506,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
});
|
||||
var expectedAttribute = new TagHelperAttribute(attributeName, "world2");
|
||||
var tagHelperContext = new TagHelperContext(
|
||||
tagName: "p",
|
||||
allAttributes: new TagHelperAttributeList
|
||||
{
|
||||
{ attributeName, "world" }
|
||||
|
|
@ -533,6 +537,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
return Task.FromResult<TagHelperContent>(tagHelperContent);
|
||||
});
|
||||
var tagHelperContext = new TagHelperContext(
|
||||
tagName: "p",
|
||||
allAttributes: new TagHelperAttributeList
|
||||
{
|
||||
{ "hello", "world" }
|
||||
|
|
|
|||
|
|
@ -124,6 +124,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
};
|
||||
|
||||
var tagHelperContext = new TagHelperContext(
|
||||
tagName: "text-area",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
var expectedPostContent = "original post-content";
|
||||
|
||||
var tagHelperContext = new TagHelperContext(
|
||||
tagName: "not-span",
|
||||
allAttributes: new TagHelperAttributeList
|
||||
{
|
||||
{ "id", "myvalidationmessage" },
|
||||
|
|
@ -114,6 +115,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
var expectedContent = "original content";
|
||||
var expectedPostContent = "original post-content";
|
||||
var context = new TagHelperContext(
|
||||
tagName: "span",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
@ -186,6 +188,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
output.Content.AppendHtml(outputContent);
|
||||
|
||||
var context = new TagHelperContext(
|
||||
tagName: "span",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
@ -246,6 +249,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
});
|
||||
|
||||
var context = new TagHelperContext(
|
||||
tagName: "span",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
@ -286,6 +290,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
output.PostContent.SetContent(expectedPostContent);
|
||||
|
||||
var context = new TagHelperContext(
|
||||
tagName: "span",
|
||||
allAttributes: new TagHelperAttributeList(
|
||||
Enumerable.Empty<TagHelperAttribute>()),
|
||||
items: new Dictionary<object, object>(),
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
var expectedPreContent = "original pre-content";
|
||||
var expectedContent = "original content";
|
||||
var tagHelperContext = new TagHelperContext(
|
||||
tagName: "not-div",
|
||||
allAttributes: new TagHelperAttributeList(),
|
||||
items: new Dictionary<object, object>(),
|
||||
uniqueId: "test");
|
||||
|
|
@ -122,7 +123,8 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
});
|
||||
|
||||
var context = new TagHelperContext(
|
||||
new TagHelperAttributeList(),
|
||||
tagName: "div",
|
||||
allAttributes: new TagHelperAttributeList(),
|
||||
items: new Dictionary<object, object>(),
|
||||
uniqueId: "test");
|
||||
|
||||
|
|
@ -189,7 +191,8 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
});
|
||||
|
||||
var context = new TagHelperContext(
|
||||
new TagHelperAttributeList(),
|
||||
tagName: "div",
|
||||
allAttributes: new TagHelperAttributeList(),
|
||||
items: new Dictionary<object, object>(),
|
||||
uniqueId: "test");
|
||||
|
||||
|
|
@ -221,6 +224,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
var expectedPreContent = "original pre-content";
|
||||
var expectedContent = "original content";
|
||||
var tagHelperContext = new TagHelperContext(
|
||||
tagName: "not-div",
|
||||
allAttributes: new TagHelperAttributeList(),
|
||||
items: new Dictionary<object, object>(),
|
||||
uniqueId: "test");
|
||||
|
|
@ -290,6 +294,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
var expectedPreContent = "original pre-content";
|
||||
var expectedContent = "original content";
|
||||
var tagHelperContext = new TagHelperContext(
|
||||
tagName: "not-div",
|
||||
allAttributes: new TagHelperAttributeList(),
|
||||
items: new Dictionary<object, object>(),
|
||||
uniqueId: "test");
|
||||
|
|
@ -373,6 +378,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
validationSummaryTagHelper.ViewContext = expectedViewContext;
|
||||
|
||||
var context = new TagHelperContext(
|
||||
tagName: "div",
|
||||
allAttributes: new TagHelperAttributeList(),
|
||||
items: new Dictionary<object, object>(),
|
||||
uniqueId: "test");
|
||||
|
|
@ -428,6 +434,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
validationSummaryTagHelper.ViewContext = viewContext;
|
||||
|
||||
var context = new TagHelperContext(
|
||||
tagName: "div",
|
||||
allAttributes: new TagHelperAttributeList(),
|
||||
items: new Dictionary<object, object>(),
|
||||
uniqueId: "test");
|
||||
|
|
@ -486,6 +493,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
validationSummaryTagHelper.ViewContext = viewContext;
|
||||
|
||||
var context = new TagHelperContext(
|
||||
tagName: "div",
|
||||
allAttributes: new TagHelperAttributeList(),
|
||||
items: new Dictionary<object, object>(),
|
||||
uniqueId: "test");
|
||||
|
|
@ -541,6 +549,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
|
|||
validationSummaryTagHelper.ViewContext = viewContext;
|
||||
|
||||
var context = new TagHelperContext(
|
||||
tagName: "div",
|
||||
allAttributes: new TagHelperAttributeList(),
|
||||
items: new Dictionary<object, object>(),
|
||||
uniqueId: "test");
|
||||
|
|
|
|||
Loading…
Reference in New Issue