/// <summary>
 /// Searches the specified search item.
 /// </summary>
 /// <param name="searchItem">The search item.</param>
 /// <returns></returns>
 internal int Search(IndexItem searchItem)
 {
     return(InDeserializationContext.PrimarySortInfo.IsTag ?
            InternalItemList.LinearSearch(InternalItemAdapter.ConvertToInternalItem(searchItem), InDeserializationContext.LocalIdentityTagNames) :
            InternalItemList.BinarySearchItem(InternalItemAdapter.ConvertToInternalItem(searchItem),
                                              InDeserializationContext.PrimarySortInfo.IsTag,
                                              InDeserializationContext.PrimarySortInfo.FieldName,
                                              InDeserializationContext.PrimarySortInfo.SortOrderList, InDeserializationContext.LocalIdentityTagNames));
 }
 /// <summary>
 /// Gets the insert position.
 /// </summary>
 /// <param name="searchItem">The search item.</param>
 /// <param name="sortBy">The sort by.</param>
 /// <param name="comparer">The comparer.</param>
 /// <returns>InsertPosition</returns>
 internal int GetInsertPosition(IndexItem searchItem, SortBy sortBy, InternalItemComparer comparer)
 {
     return(InternalItemList.GetInsertPosition(InternalItemAdapter.ConvertToInternalItem(searchItem), comparer, sortBy));
 }