diff --git a/OliverBooth/Data/Blog/BlogPost.cs b/OliverBooth/Data/Blog/BlogPost.cs index 8b608ca..baa4bda 100644 --- a/OliverBooth/Data/Blog/BlogPost.cs +++ b/OliverBooth/Data/Blog/BlogPost.cs @@ -91,6 +91,14 @@ public sealed class BlogPost : IEquatable /// The legacy WordPress ID. public int? WordPressId { get; set; } + /// + /// Returns a value indicating whether this instance of is equal to another instance. + /// + /// An instance to compare with this instance. + /// + /// if is equal to this instance; otherwise, + /// . + /// public bool Equals(BlogPost? other) { if (ReferenceEquals(null, other)) return false; @@ -98,6 +106,14 @@ public sealed class BlogPost : IEquatable return Id == other.Id; } + /// + /// Returns a value indicating whether this instance is equal to a specified object. + /// + /// An object to compare with this instance. + /// + /// if is an instance of and equals the + /// value of this instance; otherwise, . + /// public override bool Equals(object? obj) { return ReferenceEquals(this, obj) || obj is BlogPost other && Equals(other); @@ -135,6 +151,11 @@ public sealed class BlogPost : IEquatable return $"{GetDisqusDomain()}/{path}"; } + + /// + /// Gets the hash code for this instance. + /// + /// The hash code. public override int GetHashCode() { // ReSharper disable once NonReadonlyMemberInGetHashCode