internal static IEnumerable <object> AllCachedObjects(this HttpSessionStateBase session, IFrameworkFacade facade, ObjectFlag flag = ObjectFlag.None) { return(session.GetAndTidyCachedNakedObjects(facade, flag).Where(no => !no.IsDestroyed).Select(no => no.GetDomainObject())); }
// This is dangerous - retrieves all cached objects from the database - use with care ! internal static IEnumerable <object> AllCachedObjects(this HttpSessionStateBase session, INakedObjectsFramework framework, ObjectFlag flag = ObjectFlag.None) { return(session.GetAndTidyCachedNakedObjects(framework, flag).Where(no => !no.ResolveState.IsDestroyed()).Select(no => no.Object)); }