// Do we need to return record count? // if (returnRecordCount) {
dr.NextResult();
dr.Read();
// Read the total records // threadSet.TotalRecords = (int) dr[0];
}
// Get the recipients if this is a request for // the private message list if ((forumID == 0) && (dr.NextResult()) ) { Hashtable recipientsLookupTable = new Hashtable();
while(dr.Read()) { int threadID = (int) dr["ThreadID"];
if (recipientsLookupTable[threadID] == null) { recipientsLookupTable[threadID] = new ArrayList(); }
// If the user is anonymous take some load off the db // if (userID == 0) { if (forumContext.Context.Cache[anonymousKey] != null) return (ThreadSet) forumContext.Context.Cache[anonymousKey]; }
// Create Instance of the IDataProvider // ForumsDataProvider dp = ForumsDataProvider.Instance();
// Get the threads // threadSet = dp.GetThreads(forumID, pageIndex, pageSize, userID, threadsNewerThan, sortBy, sortOrder, threadStatus, userFilter, activeTopics, unreadOnly, unansweredOnly, returnRecordCount,favoriteOnly);