コード例 #1
0
 private void AddBookmarkSubscription(BookmarkResumptionQuery bookmarkTrackingQuery)
 {
     _trackingRecordPreFilter.TrackBookmarkResumptionRecords = true;
     if (_bookmarkSubscriptions == null)
     {
         _bookmarkSubscriptions = new Dictionary <string, BookmarkResumptionQuery>();
     }
     //if duplicates are found, use only the first subscription for a given bookmark name.
     if (!_bookmarkSubscriptions.ContainsKey(bookmarkTrackingQuery.Name))
     {
         _bookmarkSubscriptions.Add(bookmarkTrackingQuery.Name, bookmarkTrackingQuery);
     }
 }
コード例 #2
0
        private BookmarkResumptionQuery Match(BookmarkResumptionRecord bookmarkRecord)
        {
            BookmarkResumptionQuery trackingQuery = null;

            if (_bookmarkSubscriptions != null)
            {
                if (bookmarkRecord.BookmarkName != null)
                {
                    _bookmarkSubscriptions.TryGetValue(bookmarkRecord.BookmarkName, out trackingQuery);
                }
                if (trackingQuery == null)
                {
                    _bookmarkSubscriptions.TryGetValue("*", out trackingQuery);
                }
            }
            return(trackingQuery);
        }