예제 #1
0
        /// <summary>
        /// true - file needs recompile
        /// </summary>
        /// <param name="url"></param>
        /// <returns></returns>
        protected virtual bool CheckScriptModifications(string url)
        {
            TypeCacheEntry tce;

            lock (_typeCache)
            {
                if (!_typeCache.TryGetValue(url, out tce))
                {
                    return(true);                                       //none
                }
                var d0 = _storage.GetLastModificationDate(url);
                _lastModificationCheck = DateTime.Now;
                if (d0 > tce.CompiledDate)
                {
                    return(true);
                }
                return(false);
            }
        }
예제 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="url"></param>
        /// <returns></returns>
        public virtual DateTime?GetLastModificationDate(string url)
        {
            var dt = _storage.GetLastModificationDate(_storage.Normalize(url));

            return(dt > DateTime.MinValue ? dt : (DateTime?)null);
        }