public InterestingEntries(IInterstingEntriesAlgorithm interestingEntriesCore) { InterestingEntriesCore = interestingEntriesCore; Algororithm = WeBlog.Components.InterestingEntriesCore.GetAlgororithmFromString(Mode); if (Algororithm != InterestingEntriesAlgorithm.Custom || InterestingEntriesCore == null) { InterestingEntriesCore = new InterestingEntriesCore(ManagerFactory.EntryManagerInstance, Algororithm); } }
protected override void OnInit(EventArgs e) { base.OnInit(e); var algororithm = WeBlog.Components.InterestingEntriesCore.GetAlgororithmFromString(Mode); if (algororithm != InterestingEntriesAlgorithm.Custom || InterestingEntriesCore == null) { InterestingEntriesCore = new InterestingEntriesCore(ManagerFactory.EntryManagerInstance, algororithm); } }
protected void Page_Load(object sender, EventArgs e) { var dataSource = InterestingEntriesCore.GetEntries(CurrentBlog, MaximumCount); if (dataSource.Any()) { ItemList.DataSource = dataSource; ItemList.DataBind(); PanelInteresingEntries.Visible = true; } else { PanelInteresingEntries.Visible = false; } }
public override void Initialize(Rendering rendering) { base.Initialize(rendering); Entries = InterestingEntriesCore.GetEntries(CurrentBlog, MaximumCount); }