From 3e745c38ee07b0f00918e6f0106e54d625bba975 Mon Sep 17 00:00:00 2001 From: Sipke Schoorstra Date: Fri, 17 Jul 2015 15:02:02 +0100 Subject: [PATCH] Deprecated ICustomExportStep. --- .../Orchard.ImportExport/Services/ICustomExportStep.cs | 4 +++- .../Orchard.ImportExport/Services/IExportEventHandler.cs | 4 +++- .../Orchard.ImportExport/Services/ImportExportService.cs | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Orchard.Web/Modules/Orchard.ImportExport/Services/ICustomExportStep.cs b/src/Orchard.Web/Modules/Orchard.ImportExport/Services/ICustomExportStep.cs index 0a822a5cd..9e16b747b 100644 --- a/src/Orchard.Web/Modules/Orchard.ImportExport/Services/ICustomExportStep.cs +++ b/src/Orchard.Web/Modules/Orchard.ImportExport/Services/ICustomExportStep.cs @@ -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 steps); } diff --git a/src/Orchard.Web/Modules/Orchard.ImportExport/Services/IExportEventHandler.cs b/src/Orchard.Web/Modules/Orchard.ImportExport/Services/IExportEventHandler.cs index 94bd48405..c9d912d2c 100644 --- a/src/Orchard.Web/Modules/Orchard.ImportExport/Services/IExportEventHandler.cs +++ b/src/Orchard.Web/Modules/Orchard.ImportExport/Services/IExportEventHandler.cs @@ -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); diff --git a/src/Orchard.Web/Modules/Orchard.ImportExport/Services/ImportExportService.cs b/src/Orchard.Web/Modules/Orchard.ImportExport/Services/ImportExportService.cs index 4c04936e4..7ae2ef7be 100644 --- a/src/Orchard.Web/Modules/Orchard.ImportExport/Services/ImportExportService.cs +++ b/src/Orchard.Web/Modules/Orchard.ImportExport/Services/ImportExportService.cs @@ -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)) {