|
|
|
@ -88,22 +88,14 @@ namespace Model
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Fonction qui permet de déterminer si deux objets CustomTitle sont égaux selon leurs chemin d'accès
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="other"></param>
|
|
|
|
|
/// <returns>Un booléen indiquant si les chemins d'accès sont égaux</returns>
|
|
|
|
|
public bool Equals(CustomTitle other)
|
|
|
|
|
=> Path.Equals(other?.Path);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Fonction qui permet de déterminer si deux objets CustomTitle sont égaux
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="obj"></param>
|
|
|
|
|
/// <returns>Un booléen indiquant si l'objet est égal</returns>
|
|
|
|
|
public override bool Equals(object obj)
|
|
|
|
|
{
|
|
|
|
|
if (ReferenceEquals(obj, null)) return false;
|
|
|
|
|
if (ReferenceEquals(this, obj)) return true;
|
|
|
|
|
if (GetType() != obj.GetType()) return false;
|
|
|
|
|
return Equals(obj as CustomTitle);
|
|
|
|
|
if (obj is null) return false;
|
|
|
|
|
if (obj.GetType() != typeof(CustomTitle)) return false;
|
|
|
|
|
if (obj is CustomTitle custom && Path == custom.Path) return true;
|
|
|
|
|
else return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|