public static SpxusGetIContentsByKey <int> GetChildIContentByRootId <T>( Func <int, IEnumerable <IContent> > serviceFunction, Func <int, IDictionary <int, T>, IEnumerable <T> > cacheFunction, IDictionary <int, T> cache, Func <string, bool> checkQueryName, int expireMins = 30 ) where T : CacheBase, new() { return((rootId, where, alive, queryName) => { var queryNameCheck = G.Text(queryName); if (queryNameCheck == "") { queryNameCheck = $"icontent children {G.Text(rootId)}"; } return GetFunc.GetChildContentsByKey <int, IContent, T>( serviceFunction, cacheFunction, b => b.Id, cache, rootId, alive, expireMins, where, checkQueryName(queryNameCheck)); }); }
public static SDHCGetIPublishedContentsByKey <Key> GetChildIPublishContentByRootId <Key, T>( Func <Key, IEnumerable <IPublishedContent> > serviceFunction, Func <Key, IDictionary <Key, T>, IEnumerable <T> > cacheFunction, Func <IPublishedContent, Key> getKeyFunction, IDictionary <Key, T> cache, Func <string, bool> checkQueryName, int expireMins = 30 ) where T : CacheBase, new() { return((rootId, where, alive, queryName) => { var queryNameCheck = G.Text(queryName); if (queryNameCheck == "") { queryNameCheck = $"children {G.Text(rootId)}"; } return GetFunc.GetChildContentsByKey <Key, IPublishedContent, T>( serviceFunction, cacheFunction, getKeyFunction, cache, rootId, alive, expireMins, where, checkQueryName(queryNameCheck)); }); }