You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unity Abstractions relies on IEquatable<> to determine compatibility of dependencies with various injected members.
Problem
IEquatable<T> interface implements one method: bool Equals(T? other)
The other parameter is passed as nullable, so before it is used, it needs to be checked for null. Every call to this method adds a null check although it is never null.
Solution
To resolve this issue IEquatable<T> interface should be replaced with custom interface:
Description
Unity Abstractions relies on
IEquatable<>
to determine compatibility of dependencies with various injected members.Problem
IEquatable<T>
interface implements one method:bool Equals(T? other)
The
other
parameter is passed as nullable, so before it is used, it needs to be checked for null. Every call to this method adds a null check although it is nevernull
.Solution
To resolve this issue
IEquatable<T>
interface should be replaced with custom interface:Impact
Custom Injection Members will require refactoring.
The text was updated successfully, but these errors were encountered: