Example #1
0
        private void AppCacheInvalidator_Invalidate(object sender, AppCacheInvalidateEventArgs e)
        {
            if (AppCache == null)
            {
                return;
            }
            var cachedPaths = AppCache.GetPaths(AppFolderName);

            foreach (var name in e.Path.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries))
            {
                if (String.Compare(name, AppFolderName, true) == 0)
                {
                    Invalidate(e.Path);
                    return;
                }
            }

            var path = e.Path;

            foreach (var item in cachedPaths)
            {
                if (item.StartsWith(path, StringComparison.OrdinalIgnoreCase))
                {
                    Invalidate(e.Path);
                    return;
                }
            }
        }
Example #2
0
        private void AppCacheInvalidator_Invalidate(object sender, AppCacheInvalidateEventArgs e)
        {
            if (AppCache == null)
                return;
            var cachedPaths = AppCache.GetPaths(AppFolderName);

            foreach (var name in e.Path.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries))
            {
                if (String.Compare(name, AppFolderName, true) == 0)
                {
                    Invalidate(e.Path);
                    return;
                }
            }

            var path = e.Path;
            foreach (var item in cachedPaths)
            {
                if (item.StartsWith(path, StringComparison.OrdinalIgnoreCase))
                {
                    Invalidate(e.Path);
                    return;
                }
            }
        }