Ejemplo n.º 1
0
        /// <summary>
        /// Get maximum resource total size option
        /// </summary>
        /// <param name="options"></param>
        /// <returns></returns>
        public static int GetMaxResourceTotalSize(this AssetCacheOptions options)
        {
            object value;

            if (options.TryGetValue(Key_MaxResourceTotalSize, out value) && value is int _value)
            {
                return(_value);
            }
            return(1024 * 1024);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Get options for cache streams
        /// </summary>
        /// <param name="options"></param>
        /// <returns></returns>
        public static bool GetCacheStreams(this AssetCacheOptions options)
        {
            object value;

            if (options.TryGetValue(Key_CacheStreams, out value) && value is bool _value)
            {
                return(_value);
            }
            return(true);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Get maximum resource option
        /// </summary>
        /// <param name="options"></param>
        /// <returns></returns>
        public static int GetMaxResourceCount(this AssetCacheOptions options)
        {
            object value;

            if (options.TryGetValue(Key_MaxResourceCount, out value) && value is int _value)
            {
                return(_value);
            }
            return(Int32.MaxValue);
        }