コード例 #1
0
        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);
        }
コード例 #2
0
 protected bool Equals(RecordHeader other)
 {
     return(string.Equals(Name, other.Name) && string.Equals(Tags, other.Tags) && string.Equals(Id, other.Id));
 }