In the file Extension.cs that lives in the Models folder of the ExtensionManager.Shared project, the Extension.Equals method's code can be simplified. Listing 1 shows the code as it is now. Listing 2 shows the proposed, simplified version.
public override bool Equals(object obj)
{
return !(obj is Extension other) ? false : ID == other.ID;
}
Listing 1. Current code for the Extension.Equals method.
public override bool Equals(object obj)
{
return obj is Extension other && ID == other.ID;
}
In the file
Extension.cs
that lives in theModels
folder of theExtensionManager.Shared
project, theExtension.Equals
method's code can be simplified. Listing 1 shows the code as it is now. Listing 2 shows the proposed, simplified version.Listing 1. Current code for the
Extension.Equals
method.Listing 2. Simplified version.