-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: get rid of a couple closures (#103)
* perf: get rid of a couple closures * replace variable abbreviation with proper name Co-authored-by: Glenn <[email protected]>
- Loading branch information
1 parent
610bf06
commit 599391a
Showing
3 changed files
with
41 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/ReactiveMarbles.PropertyChanged/MemberFuncCacheKeyComparer.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright (c) 2019-2020 ReactiveUI Association Incorporated. All rights reserved. | ||
// ReactiveUI Association Incorporated licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for full license information. | ||
|
||
using System.Collections.Generic; | ||
using System.Reflection; | ||
|
||
namespace ReactiveMarbles.PropertyChanged | ||
{ | ||
internal sealed class MemberFuncCacheKeyComparer : IEqualityComparer<MemberInfo> | ||
{ | ||
public bool Equals(MemberInfo x, MemberInfo y) | ||
{ | ||
return (x.DeclaringType, x.Name) == (y.DeclaringType, y.Name); | ||
} | ||
|
||
public int GetHashCode(MemberInfo obj) | ||
{ | ||
return (obj.DeclaringType, obj.Name).GetHashCode(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters