Exemple #1
0
        /// <summary>
        /// Check to see if there are any related Scenes, and load them if requested
        /// </summary>
        public static void CheckExpandScenes(SqlDataManager sdm, IEnumerable <Video> videos, string expandString)
        {
            expandString = expandString.SafeToString();

            if (String.Equals(expandString, "all", StringComparison.OrdinalIgnoreCase) || expandString.IndexOf("scenes", StringComparison.OrdinalIgnoreCase) >= 0)
            {
                var videosWhere = CreateVideoWhere(videos, "Video");
                var childScenes = sdm.GetAllScenes <Scene>(videosWhere);

                videos.ToList()
                .ForEach(feVideo => feVideo.LoadScenes(childScenes));
            }
        }
        /// <summary>
        /// Check to see if there are any related Scenes, and load them if requested
        /// </summary>
        public static void CheckExpandScenes(SqlDataManager sdm, IEnumerable <Location> locations, string expandString)
        {
            expandString = expandString.SafeToString();

            if (String.Equals(expandString, "all", StringComparison.OrdinalIgnoreCase) || expandString.IndexOf("scenes", StringComparison.OrdinalIgnoreCase) >= 0)
            {
                var locationsWhere = CreateLocationWhere(locations, "Location");
                var childScenes    = sdm.GetAllScenes <Scene>(locationsWhere);

                locations.ToList()
                .ForEach(feLocation => feLocation.LoadScenes(childScenes));
            }
        }
Exemple #3
0
        /// <summary>
        /// Check to see if there are any related Scenes, and load them if requested
        /// </summary>
        public static void CheckExpandScenes(SqlDataManager sdm, IEnumerable <InventoryItem> inventoryItems, string expandString)
        {
            expandString = expandString.SafeToString();

            if (String.Equals(expandString, "all", StringComparison.OrdinalIgnoreCase) || expandString.IndexOf("scenes", StringComparison.OrdinalIgnoreCase) >= 0)
            {
                var inventoryItemsWhere = CreateInventoryItemWhere(inventoryItems, "Props");
                var childScenes         = sdm.GetAllScenes <Scene>(inventoryItemsWhere);

                inventoryItems.ToList()
                .ForEach(feInventoryItem => feInventoryItem.LoadProps_Scenes(childScenes));
            }
        }