public void GivenWriteLockIsAlreadyHeld_GetWriteLockAllowsARecursiveLock() // refs #267 { using (bundles.GetWriteLock()) { using (bundles.GetWriteLock()) { } } }
public void RebuildCache() { cache.Clear(); using (bundles.GetWriteLock()) { bundles.Clear(); bundleCollectionInitializer.Initialize(bundles); } }
public void Initialize(BundleCollection bundleCollection) { using (bundleCollection.GetWriteLock()) { bundles = bundleCollection; bundles.Clear(); AddBundles(); ProcessBundles(); AddBundlesForUrlReferences(); bundles.BuildReferences(); } }
public void Initialize(BundleCollection bundleCollection) { using (bundleCollection.GetWriteLock()) { bundles = bundleCollection; ClearBundles(); if (ReadCache()) { if (IsStaticCache) { Trace.Source.TraceInformation("CacheAwareBundleCollectionInitializer using static cache"); UseCachedBundles(); } else { AddBundlesFromConfigurations(); if (IsCacheValid) { Trace.Source.TraceInformation("CacheAwareBundleCollectionInitializer using runtime cache"); UseCachedBundles(); } else { Trace.Source.TraceInformation("CacheAwareBundleCollectionInitializer runtime cache is invalid"); ProcessBundles(); WriteToCache(); } } } else { Trace.Source.TraceInformation("CacheAwareBundleCollectionInitializer failed to read from cache"); AddBundlesFromConfigurations(); ProcessBundles(); WriteToCache(); } AddBundlesForUrlReferences(); bundles.BuildReferences(); } }