public IList <CategoryDto> GetCategories() { CancelEventArgsWithoutParameters <IList <CategoryDto> > e = new CancelEventArgsWithoutParameters <IList <CategoryDto> >(null); this.CategoryRetrieving.Raise(this, e); if (e.Cancel) { return(e.Result); } IList <CategoryDto> data = this.categoryDataService.GetCategoriesStructure(); this.CategoriesRetrieved.Raise(this, new GenericEventArgs <IList <CategoryDto> >(data)); return(data); }
public IList <MonthDto> GetMonthsForPublishedPosts() { CancelEventArgsWithoutParameters <IList <MonthDto> > e = new CancelEventArgsWithoutParameters <IList <MonthDto> >(null); this.MonthsRetrievingForPublishedPosts.Raise(this, e); if (e.Cancel) { return(e.Result); } IList <MonthDto> data = this.postDataService.GetMonthsForPublishedPosts(); this.MonthsRetrievedForPublishedPosts.Raise(this, new GenericEventArgs <IList <MonthDto> >(data)); return(data); }
public IList<CategoryDto> GetCategories() { CancelEventArgsWithoutParameters<IList<CategoryDto>> e = new CancelEventArgsWithoutParameters<IList<CategoryDto>>(null); this.CategoryRetrieving.Raise(this, e); if (e.Cancel) { return e.Result; } IList<CategoryDto> data = this.categoryDataService.GetCategoriesStructure(); this.CategoriesRetrieved.Raise(this, new GenericEventArgs<IList<CategoryDto>>(data)); return data; }