public Post GetPost(string blogName, string postSlug) { return(cache.GetItem <Post>( string.Format("GetPost-Blog:{0},Post:{1}", blogName, postSlug), () => pluginEngine.ProcessDisplayOfPost(context, () => repository.GetPost(blogName, postSlug).FillTags(tagService).FillComments(commentService)), p => p.GetDependencies() )); }
public bool GetBlogExists(string blogName) { return(cache.GetItem <bool?>( string.Format("GetBlogExists-Name:{0}", blogName), () => repository.GetBlog(blogName) != null, null ).GetValueOrDefault(false)); }
public UserAuthenticated GetUser(string name) { return(cache.GetItem <UserAuthenticated>( string.Format("GetUser-UserName:{0}", name), () => repository.GetUser(context.Site.ID, name), null )); }
public ScheduleItem GetScheduleItem(Event evnt, string scheduleItemSlug) { return(cache.GetItem <ScheduleItem>( string.Format("GetScheduleItem-Event:{0},ScheduleItem:{1}", evnt.Name, scheduleItemSlug), () => repository.GetScheduleItem(evnt, scheduleItemSlug).FillTags(tagService).FillComments(commentService), si => si.GetDependencies() )); }
public User GetUser(string name) { return(cache.GetItem <User>( string.Format("GetUser-UserName:{0}", name), () => repository.GetUser(name), null )); }
public ScheduleItem GetScheduleItem(ScheduleItemAddress scheduleItemAddress) { var result = cache.GetItem <ScheduleItem>( string.Format("GetScheduleItem-Event:{0},ScheduleItem:{1}", scheduleItemAddress.EventName, scheduleItemAddress.ScheduleItemSlug), () => repository.GetScheduleItem(scheduleItemAddress.EventName, scheduleItemAddress.ScheduleItemSlug).FillTags(tagService).FillComments(commentService), si => si.GetDependencies() ); SetScheduleItemUsers(result); return(result); }
public bool GetEventExists(string eventName) { return(cache.GetItem <bool?>( string.Format("GetEventExists-Name:{0}", eventName), () => repository.GetEvent(eventName) != null, null ).GetValueOrDefault(false)); }
public Site GetSite() { string instanceName = !string.IsNullOrEmpty(config.InstanceName) ? config.InstanceName : "Oxite"; return (cache != null ? cache.GetItem <Site>("GetSite", () => repository.GetSite(instanceName), null) : repository.GetSite(instanceName)); }
public Site GetSite() { string instanceName = appSettings.GetInstanceName(); return (cache != null ? cache.GetItem <Site>("GetSite", () => repository.GetSite(instanceName), null) : repository.GetSite(instanceName)); }