Adding some internal bits in the ServiceContextManager and PackagingService
This commit is contained in:
@@ -45,6 +45,17 @@ namespace Umbraco.Core.Services
|
||||
_importedContentTypes = new Dictionary<string, IContentType>();
|
||||
}
|
||||
|
||||
#region Generic export methods
|
||||
|
||||
internal void ExportToFile(string absoluteFilePath, string nodeType, int id)
|
||||
{
|
||||
var contentType = _contentTypeService.GetContentType(id);
|
||||
var xml = Export(contentType);
|
||||
xml.Save(absoluteFilePath);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Content
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
using Umbraco.Core.Persistence;
|
||||
using Umbraco.Core.Persistence.Mappers;
|
||||
using Umbraco.Core.Persistence.UnitOfWork;
|
||||
@@ -24,10 +23,19 @@ namespace Umbraco.Core.Standalone
|
||||
Trace.WriteLine("ServiceContextManager-Current AppDomain: " + AppDomain.CurrentDomain.FriendlyName);
|
||||
Trace.WriteLine("ServiceContextManager-Current AppDomain: " + AppDomain.CurrentDomain.BaseDirectory);
|
||||
|
||||
var examineEventHandlerToRemove = Type.GetType("Umbraco.Web.Search.ExamineEvents, Umbraco.Web");
|
||||
//var webAssembly = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault(x => x.FullName.StartsWith("umbraco"));
|
||||
//if (webAssembly != null && examineEventHandlerToRemove == null)
|
||||
//{
|
||||
// var examineEventType = webAssembly.GetType("Umbraco.Web.Search.ExamineEvents");
|
||||
// examineEventHandlerToRemove = examineEventType;
|
||||
//}
|
||||
|
||||
_application = StandaloneCoreApplication.GetApplication(baseDirectory);
|
||||
_application.WithoutApplicationEventHandler(examineEventHandlerToRemove);
|
||||
|
||||
var examineEventHandlerToRemove = Type.GetType("Umbraco.Web.Search.ExamineEvents, umbraco");
|
||||
if (examineEventHandlerToRemove != null)
|
||||
_application.WithoutApplicationEventHandler(examineEventHandlerToRemove);
|
||||
|
||||
_application.Start();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user