Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ private void CleanUpDeadWeakReferences()
}
}

internal struct Dependent
internal struct Dependent : IEquatable<Dependent>
{
private DependencyProperty _DP;
private WeakReference _wrDO;
Expand Down Expand Up @@ -178,14 +178,14 @@ public Expression Expr
return (Expression)_wrEX.Target;
}
}

public override bool Equals(object o)
{
if(! (o is Dependent))
return false;

Dependent d = (Dependent)o;

return o is Dependent d ? Equals(d) : false;
}
public bool Equals(Dependent d)
{
// Not equal to Dead values.
// This is assuming that at least one of the compared items is live.
// This assumtion comes from knowing that Equal is used by FrugalList.Remove()
Expand Down