Remove chaining from HashCodeCombiner.
Reacting to https://github.com/aspnet/Common/issues/40
This commit is contained in:
parent
8f3a322cf9
commit
498d209949
|
|
@ -131,11 +131,12 @@ namespace Microsoft.AspNet.Mvc.ModelBinding
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override int GetHashCode()
|
public override int GetHashCode()
|
||||||
{
|
{
|
||||||
var hash = HashCodeCombiner.Start();
|
var hashCodeCombiner = HashCodeCombiner.Start();
|
||||||
hash.Add(Key, StringComparer.OrdinalIgnoreCase);
|
hashCodeCombiner.Add(Key, StringComparer.OrdinalIgnoreCase);
|
||||||
hash.Add(IsModelSet);
|
hashCodeCombiner.Add(IsModelSet);
|
||||||
hash.Add(Model);
|
hashCodeCombiner.Add(Model);
|
||||||
return hash.CombinedHash;
|
|
||||||
|
return hashCodeCombiner.CombinedHash;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
|
|
||||||
|
|
@ -82,10 +82,11 @@ namespace Microsoft.AspNet.Mvc.Razor.Precompilation
|
||||||
|
|
||||||
public override int GetHashCode()
|
public override int GetHashCode()
|
||||||
{
|
{
|
||||||
return HashCodeCombiner
|
var hashCodeCombiner = HashCodeCombiner.Start();
|
||||||
.Start()
|
hashCodeCombiner.Add(Configuration);
|
||||||
.Add(Configuration)
|
hashCodeCombiner.Add(TargetFramework);
|
||||||
.Add(TargetFramework);
|
|
||||||
|
return hashCodeCombiner;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -109,9 +109,8 @@ namespace Microsoft.AspNet.Mvc.Razor
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override int GetHashCode()
|
public override int GetHashCode()
|
||||||
{
|
{
|
||||||
var hashCodeCombiner = HashCodeCombiner.Start()
|
var hashCodeCombiner = HashCodeCombiner.Start();
|
||||||
.Add(IsFoundResult);
|
hashCodeCombiner.Add(IsFoundResult);
|
||||||
|
|
||||||
|
|
||||||
if (IsFoundResult)
|
if (IsFoundResult)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue