Résolution des codeSmells critiques

pull/45/head
Johnny RATTON 1 year ago
parent baf9cba856
commit 9f2e9b8ace

@ -48,24 +48,24 @@ public class LessonDto : IEquatable<LessonDto>
return $"{Id}\t{Title}\t{LastPublisher}\t{LastEdit}";
}
public override bool Equals(object right)
public override bool Equals(object obj)
{
if (object.ReferenceEquals(right, null))
if (object.ReferenceEquals(obj, null))
{
return false;
}
if (object.ReferenceEquals(this, right))
if (object.ReferenceEquals(this, obj))
{
return true;
}
if (this.GetType() != right.GetType())
if (this.GetType() != obj.GetType())
{
return false;
}
return this.Equals(right as LessonDto);
return this.Equals(obj as LessonDto);
}
public bool Equals(LessonDto other)

@ -58,24 +58,24 @@ public class ParagraphDto : ContentLessonDto, IEquatable<ParagraphDto>
return $"{Id}\t{Title}\t{Content}\t{Info}\t{Query}\t{Comment}";
}
public override bool Equals(object right)
public override bool Equals(object obj)
{
if (object.ReferenceEquals(right, null))
if (object.ReferenceEquals(obj, null))
{
return false;
}
if (object.ReferenceEquals(this, right))
if (object.ReferenceEquals(this, obj))
{
return true;
}
if (this.GetType() != right.GetType())
if (this.GetType() != obj.GetType())
{
return false;
}
return this.Equals(right as ParagraphDto);
return this.Equals(obj as ParagraphDto);
}
public bool Equals(ParagraphDto other)

@ -22,24 +22,24 @@ public class SuccessDto : IEquatable<SuccessDto>
return $"User :{UserId}\t Enquête : {InquiryId}\t{IsFinished}";
}
public override bool Equals(object right)
public override bool Equals(object obj)
{
if (object.ReferenceEquals(right, null))
if (object.ReferenceEquals(obj, null))
{
return false;
}
if (object.ReferenceEquals(this, right))
if (object.ReferenceEquals(this, obj))
{
return true;
}
if (this.GetType() != right.GetType())
if (this.GetType() != obj.GetType())
{
return false;
}
return this.Equals(right as SuccessDto);
return this.Equals(obj as SuccessDto);
}
public bool Equals(SuccessDto other)

@ -34,24 +34,24 @@
return $"{Id}\t{Username}\t{Email}\t{IsAdmin}";
}
public override bool Equals(object right)
public override bool Equals(object obj)
{
if (object.ReferenceEquals(right, null))
if (object.ReferenceEquals(obj, null))
{
return false;
}
if (object.ReferenceEquals(this, right))
if (object.ReferenceEquals(this, obj))
{
return true;
}
if (this.GetType() != right.GetType())
if (this.GetType() != obj.GetType())
{
return false;
}
return this.Equals(right as UserDto);
return this.Equals(obj as UserDto);
}
public bool Equals(UserDto other)

Loading…
Cancel
Save