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); } }
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); }