public static void Release(Top top) { for (int i = 0; i < items.Count; i++) { TopInfo item = items[i]; if (item.top == top) { item.refcount--; if (item.refcount == 0) { items.RemoveAt(i); item.top.Dispose(); } return; } } Debug.Assert(false); // not found }
public ActionResult Index() { TopInfo t = new TopInfo(); ViewData["Uname"] = User.Identity.Name; //List<QuestionInfo> qinfo; t.Questions = questionInfoRepository.GetQuestionList(0, 0, ""); t.Questions = t.Questions.OrderByDescending(x => x.question.ViewCount).Take(5).ToList(); t.Tags = tagsrepository.TopTags(); t.Users = userReporsitory.GetTopUsers(); return(View(t)); }