diff --git a/src/Microsoft.AspNetCore.Mvc.Razor.Host/MvcRazorParser.cs b/src/Microsoft.AspNetCore.Mvc.Razor.Host/MvcRazorParser.cs index 086f4ba2c1..b0b0fa53b7 100644 --- a/src/Microsoft.AspNetCore.Mvc.Razor.Host/MvcRazorParser.cs +++ b/src/Microsoft.AspNetCore.Mvc.Razor.Host/MvcRazorParser.cs @@ -21,7 +21,6 @@ namespace Microsoft.AspNetCore.Mvc.Razor public class MvcRazorParser : RazorParser { private readonly IEnumerable _viewImportsDirectiveDescriptors; - private readonly string _modelExpressionTypeName; /// /// Initializes a new instance of . @@ -63,8 +62,6 @@ namespace Microsoft.AspNetCore.Mvc.Razor _viewImportsDirectiveDescriptors = GetTagHelperDirectiveDescriptors( inheritedChunkTrees, defaultInheritedChunks); - - _modelExpressionTypeName = modelExpressionTypeName; } /// @@ -87,29 +84,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor _viewImportsDirectiveDescriptors, errorSink); - var descriptors = visitor.GetDescriptors(documentRoot); - foreach (var descriptor in descriptors) - { - foreach (var attributeDescriptor in descriptor.Attributes) - { - if (attributeDescriptor.IsIndexer && - string.Equals( - attributeDescriptor.TypeName, - _modelExpressionTypeName, - StringComparison.Ordinal)) - { - errorSink.OnError( - SourceLocation.Undefined, - Resources.FormatMvcRazorParser_InvalidPropertyType( - descriptor.TypeName, - attributeDescriptor.Name, - _modelExpressionTypeName), - length: 0); - } - } - } - - return descriptors; + return visitor.GetDescriptors(documentRoot); } private static IEnumerable GetTagHelperDirectiveDescriptors( diff --git a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/compiler/resources/TagHelpersWebSite.Home.Index.html b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/compiler/resources/TagHelpersWebSite.Home.Index.html index dcf5fd12da..27bc4cf95a 100644 --- a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/compiler/resources/TagHelpersWebSite.Home.Index.html +++ b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/compiler/resources/TagHelpersWebSite.Home.Index.html @@ -39,6 +39,11 @@

Rendering Template:

Tag Cloud from Template:

Lorem,ipsum,dolor,sit,amet,consectetur,adipisicing,elit,sed,do,eiusmod,tempor,incididunt,ut,labore,et,dolore,magna,aliquaUt,enim
+
+

Dictionary Valued Model Expression

+
  • TagsToShow
  • Version.Build
+
+