Added a check for property bag in tag helper descriptor comparer.

Modified TagHelperDescriptorComparer to reflect changes made in #822.
This commit is contained in:
Crystal Qian 2016-08-30 09:53:45 -07:00 committed by GitHub
parent cdb1a1a343
commit bb5a70f9a8
1 changed files with 5 additions and 1 deletions

View File

@ -2,6 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System; using System;
using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using Microsoft.Extensions.Internal; using Microsoft.Extensions.Internal;
@ -61,7 +62,10 @@ namespace Microsoft.AspNetCore.Razor.Compilation.TagHelpers
descriptorX.AllowedChildren.OrderBy(child => child, StringComparer.OrdinalIgnoreCase), descriptorX.AllowedChildren.OrderBy(child => child, StringComparer.OrdinalIgnoreCase),
descriptorY.AllowedChildren.OrderBy(child => child, StringComparer.OrdinalIgnoreCase), descriptorY.AllowedChildren.OrderBy(child => child, StringComparer.OrdinalIgnoreCase),
StringComparer.OrdinalIgnoreCase))) && StringComparer.OrdinalIgnoreCase))) &&
descriptorX.TagStructure == descriptorY.TagStructure; descriptorX.TagStructure == descriptorY.TagStructure &&
Enumerable.SequenceEqual(
descriptorX.PropertyBag.OrderBy(propertyX => propertyX.Key, StringComparer.Ordinal),
descriptorY.PropertyBag.OrderBy(propertyY => propertyY.Key, StringComparer.Ordinal));
} }
/// <inheritdoc /> /// <inheritdoc />