Merge branch 'rel/1.1.0-preview1' into dev

This commit is contained in:
Ajay Bhargav Baaskaran 2016-10-18 12:02:42 -07:00
commit 3004fb822b
4 changed files with 12 additions and 4 deletions

View File

@ -40,7 +40,11 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Host.Internal
tagHelperChunk.Descriptors = Decorate(tagHelperChunk.Descriptors);
}
base.Accept(chunk);
var parentChunk = chunk as ParentChunk;
if (parentChunk != null)
{
Visit(parentChunk);
}
}
protected override void Visit(ParentChunk parentChunk)

View File

@ -41,7 +41,11 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Host.Internal
Visit(tagHelperChunk);
}
base.Accept(chunk);
var parentChunk = chunk as ParentChunk;
if (parentChunk != null)
{
Visit(parentChunk);
}
}
protected override void Visit(ParentChunk parentChunk)

View File

@ -68,7 +68,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Host
private static ParentChunk GetNestedViewComponentTagHelperChunk(string name, bool visitedTagHelperChunks)
{
var parentChunk = new ParentChunk();
var parentChunk = GetTagHelperChunk("blah");
var tagHelperChunk = GetViewComponentTagHelperChunk(name, visitedTagHelperChunks);
parentChunk.Children.Add(tagHelperChunk);
return parentChunk;

View File

@ -44,7 +44,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Host.Test
// Test the parent chunk with view component tag helper inside, Foo.
var expectedParentChunk = (ParentChunk)expectedChunks[1];
var resultParentChunk = Assert.IsType<ParentChunk>(resultChunks[1]);
var resultParentChunk = Assert.IsType<TagHelperChunk>(resultChunks[1]);
Assert.Single(resultParentChunk.Children);
expectedTagHelperChunk = (TagHelperChunk)expectedParentChunk.Children.First();