private int WeighRecordHeader(RecordHeader recordHeader, string[] searchTokens) { var title = recordHeader.Name; var titleTokens = title.Split(' ').ToList(); int weight = 0; foreach (var searchToken in searchTokens) { if (!string.IsNullOrWhiteSpace(searchToken)) { weight = weight + WeighSearchTokenWeight(titleTokens, searchToken); } } return(weight); }
protected bool Equals(RecordHeader other) { return(string.Equals(Name, other.Name) && string.Equals(Tags, other.Tags) && string.Equals(Id, other.Id)); }