Resvolution - WIP running without Resolution

This commit is contained in:
Stephan
2016-08-31 16:48:57 +02:00
parent 9dcc6b285f
commit e25e77f167
38 changed files with 248 additions and 370 deletions

View File

@@ -14,7 +14,6 @@ using Umbraco.Core.IO;
using Umbraco.Core.Logging;
using Umbraco.Core.Models;
using Umbraco.Core.Models.Rdbms;
using Umbraco.Core.ObjectResolution;
using Umbraco.Core.Persistence;
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
using Umbraco.Core.Persistence.Repositories;
@@ -92,11 +91,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
InitializeFilePersister();
}
// need to wait for resolution to be frozen
if (Resolution.IsFrozen)
OnResolutionFrozen(testing, enableRepositoryEvents);
else
Resolution.Frozen += (sender, args) => OnResolutionFrozen(testing, enableRepositoryEvents);
Initialize(testing, enableRepositoryEvents);
}
// internal for unit tests
@@ -169,7 +164,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
_released = (registered == false);
}
private void OnResolutionFrozen(bool testing, bool enableRepositoryEvents)
private void Initialize(bool testing, bool enableRepositoryEvents)
{
if (testing == false || enableRepositoryEvents)
InitializeRepositoryEvents();