Skip to content

Commit

Permalink
Do case sensitive comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
ajaybhargavb committed May 20, 2019
1 parent 44a19fb commit 6007143
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ public BoundAttributeDescriptor Build()
var parameters = Array.Empty<BoundAttributeParameterDescriptor>();
if (_attributeParameterBuilders != null)
{
var parameterset = new HashSet<BoundAttributeParameterDescriptor>(BoundAttributeParameterDescriptorComparer.Default);
// Attribute parameters are case-sensitive.
var parameterset = new HashSet<BoundAttributeParameterDescriptor>(BoundAttributeParameterDescriptorComparer.CaseSensitive);
for (var i = 0; i < _attributeParameterBuilders.Count; i++)
{
parameterset.Add(_attributeParameterBuilders[i].Build());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public static bool SatisfiesBoundAttributeWithParameter(string name, BoundAttrib
{
var satisfiesBoundAttributeName = SatisfiesBoundAttributeName(attributeName, parent);
var satisfiesBoundAttributeIndexer = SatisfiesBoundAttributeIndexer(attributeName, parent);
var matchesParameter = string.Equals(descriptor.Name, parameterName, StringComparison.OrdinalIgnoreCase);
var matchesParameter = string.Equals(descriptor.Name, parameterName, StringComparison.Ordinal);
return (satisfiesBoundAttributeName || satisfiesBoundAttributeIndexer) && matchesParameter;
}

Expand Down

0 comments on commit 6007143

Please sign in to comment.