public static int Compare(PostId first, long second) { if (first is null) { return(-1); } return(first.Value.CompareTo(second)); }
public int CompareTo(object obj) { return(obj switch { null => 1, PostId other => Compare(this, other), long otherValue => Compare(this, otherValue), string stringValue => this.CompareTo(stringValue), _ => - 1 });
public Origin(string author, string postID, int postNumber, DateTime timestamp, Uri thread, string permalink) { Author = author; AuthorType = IdentityType.User; ID = new PostId(postID); ThreadPostNumber = postNumber; Timestamp = timestamp; Thread = thread; Permalink = permalink; Source = Empty; hash = ComputeHash(); }
private Origin(string author, IdentityType identityType, PostId postId, int postNumber, DateTime timestamp, Uri thread, string permalink, Origin source) { Author = author; AuthorType = identityType; ID = postId; ThreadPostNumber = postNumber; Timestamp = timestamp; Thread = thread; Permalink = permalink; Source = source; hash = ComputeHash(); }