Deprecated ICustomExportStep.

This commit is contained in:
Sipke Schoorstra
2015-07-17 15:02:02 +01:00
parent 8a04052dfe
commit 3e745c38ee
3 changed files with 8 additions and 4 deletions

View File

@@ -1,7 +1,9 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using Orchard.Events;
namespace Orchard.ImportExport.Services {
[Obsolete("Implement IRecipeBuilderStep instead.")]
public interface ICustomExportStep : IEventHandler {
void Register(IList<string> steps);
}

View File

@@ -1,6 +1,8 @@
using Orchard.Events;
using System;
using Orchard.Events;
namespace Orchard.ImportExport.Services {
[Obsolete("Implement IRecipeExecutionStep instead.")]
public interface IExportEventHandler : IEventHandler {
void Exporting(ExportContext context);
void Exported(ExportContext context);

View File

@@ -10,7 +10,7 @@ namespace Orchard.ImportExport.Services {
private readonly IOrchardServices _orchardServices;
private readonly IAppDataFolder _appDataFolder;
private readonly IRecipeBuilder _recipeBuilder;
private IRecipeParser _recipeParser;
private readonly IRecipeParser _recipeParser;
private readonly IRecipeExecutor _recipeExecutor;
private readonly IClock _clock;
private const string ExportsDirectory = "Exports";
@@ -40,7 +40,7 @@ namespace Orchard.ImportExport.Services {
var recipe = _recipeBuilder.Build(steps);
return recipe;
}
public string WriteExportFile(XDocument recipeDocument) {
var exportFile = String.Format("Export-{0}-{1}.xml", _orchardServices.WorkContext.CurrentUser.UserName, _clock.UtcNow.Ticks);
if (!_appDataFolder.DirectoryExists(ExportsDirectory)) {