Skip to content
This repository has been archived by the owner on Dec 19, 2018. It is now read-only.

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

Merged
merged 3 commits into from
Aug 30, 2016

Conversation

cjqian
Copy link
Contributor

@cjqian cjqian commented Aug 26, 2016

@dnfclas
Copy link

dnfclas commented Aug 26, 2016

Hi @cjqian, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!

The agreement was validated by .NET Foundation and real humans are currently evaluating your PR.

TTYL, DNFBOT;

@@ -61,7 +62,8 @@ public virtual bool Equals(TagHelperDescriptor descriptorX, TagHelperDescriptor
descriptorX.AllowedChildren.OrderBy(child => child, StringComparer.OrdinalIgnoreCase),
descriptorY.AllowedChildren.OrderBy(child => child, StringComparer.OrdinalIgnoreCase),
StringComparer.OrdinalIgnoreCase))) &&
descriptorX.TagStructure == descriptorY.TagStructure;
descriptorX.TagStructure == descriptorY.TagStructure &&
descriptorX.PropertyBag.OrderBy(x => x.Key).SequenceEqual(descriptorY.PropertyBag.OrderBy(y => y.Key));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Do Enumerable.SequenceEqual to stay consistent with the above.
  • Provide Comparer in both order bys
  • propertyX, propertyY

@NTaylorMullen
Copy link
Contributor

@cjqian
Copy link
Contributor Author

cjqian commented Aug 28, 2016

🆙 📅

descriptorX.TagStructure == descriptorY.TagStructure;
descriptorX.TagStructure == descriptorY.TagStructure &&
Enumerable.SequenceEqual(
descriptorX.PropertyBag.OrderBy(propertyX => propertyX.Key, StringComparer.OrdinalIgnoreCase),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PropertyBag was constructed with a StringComparer.Ordinal why would this differ?

@NTaylorMullen
Copy link
Contributor

@cjqian
Copy link
Contributor Author

cjqian commented Aug 29, 2016

🆙 📅

@@ -2,6 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;
using System.Collections;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prob don't need this anymore

@NTaylorMullen
Copy link
Contributor

:shipit:

@cjqian cjqian merged commit bb5a70f into dev Aug 30, 2016
@cjqian cjqian deleted the PropertyBagComparer branch August 30, 2016 16:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants