From a92d255e4b0f2b8dc81daf89bdb11064cd3c8336 Mon Sep 17 00:00:00 2001 From: Shannon Date: Wed, 4 Jan 2017 17:10:48 +1100 Subject: [PATCH] adds notes, obsoletes a few classes that shouldn't have really been there --- src/UmbracoExamine/BaseUmbracoIndexer.cs | 4 ++++ src/UmbracoExamine/LocalStorage/AzureLocalStorageDirectory.cs | 3 +++ .../LocalStorage/CodeGenLocalStorageDirectory.cs | 4 ++++ src/UmbracoExamine/UmbracoExamineSearcher.cs | 4 ++++ 4 files changed, 15 insertions(+) diff --git a/src/UmbracoExamine/BaseUmbracoIndexer.cs b/src/UmbracoExamine/BaseUmbracoIndexer.cs index 933e32cfff..ebb718898b 100644 --- a/src/UmbracoExamine/BaseUmbracoIndexer.cs +++ b/src/UmbracoExamine/BaseUmbracoIndexer.cs @@ -162,6 +162,10 @@ namespace UmbracoExamine base.Initialize(name, config); + //NOTES: useTempStorage is obsolete, tempStorageDirectory is obsolete, both have been superceded by Examine Core's IDirectoryFactory + // tempStorageDirectory never actually got finished in Umbraco Core but accidentally got shipped (it's only enabled on the searcher + // and not the indexer). So this whole block is just legacy + //detect if a dir factory has been specified, if so then useTempStorage will not be used (deprecated) if (config["directoryFactory"] == null && config["useTempStorage"] != null) { diff --git a/src/UmbracoExamine/LocalStorage/AzureLocalStorageDirectory.cs b/src/UmbracoExamine/LocalStorage/AzureLocalStorageDirectory.cs index 6d60d26079..56d1b414c5 100644 --- a/src/UmbracoExamine/LocalStorage/AzureLocalStorageDirectory.cs +++ b/src/UmbracoExamine/LocalStorage/AzureLocalStorageDirectory.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Specialized; +using System.ComponentModel; using System.IO; using System.Web; using Umbraco.Core; @@ -9,6 +10,8 @@ namespace UmbracoExamine.LocalStorage /// /// When running on Azure websites, we can use the local user's storage space /// + [Obsolete("This has been superceded by IDirectoryFactory in Examine Core and should not be used")] + [EditorBrowsable(EditorBrowsableState.Never)] public sealed class AzureLocalStorageDirectory : ILocalStorageDirectory { public DirectoryInfo GetLocalStorageDirectory(NameValueCollection config, string configuredPath) diff --git a/src/UmbracoExamine/LocalStorage/CodeGenLocalStorageDirectory.cs b/src/UmbracoExamine/LocalStorage/CodeGenLocalStorageDirectory.cs index eb7bb9a8b3..4aa92f0e53 100644 --- a/src/UmbracoExamine/LocalStorage/CodeGenLocalStorageDirectory.cs +++ b/src/UmbracoExamine/LocalStorage/CodeGenLocalStorageDirectory.cs @@ -1,4 +1,6 @@ +using System; using System.Collections.Specialized; +using System.ComponentModel; using System.IO; using System.Web; @@ -11,6 +13,8 @@ namespace UmbracoExamine.LocalStorage /// This is the default implementation - but it comes with it's own limitations - the CodeGen folder is cleared whenever new /// DLLs are changed in the /bin folder (among other circumstances) which means the index would be re-synced (or rebuilt) there. /// + [Obsolete("This has been superceded by IDirectoryFactory in Examine Core and should not be used")] + [EditorBrowsable(EditorBrowsableState.Never)] public sealed class CodeGenLocalStorageDirectory : ILocalStorageDirectory { public DirectoryInfo GetLocalStorageDirectory(NameValueCollection config, string configuredPath) diff --git a/src/UmbracoExamine/UmbracoExamineSearcher.cs b/src/UmbracoExamine/UmbracoExamineSearcher.cs index efd0043e0c..7a2a80c3fe 100644 --- a/src/UmbracoExamine/UmbracoExamineSearcher.cs +++ b/src/UmbracoExamine/UmbracoExamineSearcher.cs @@ -73,6 +73,10 @@ namespace UmbracoExamine base.Initialize(name, config); + //NOTES: useTempStorage is obsolete, tempStorageDirectory is obsolete, both have been superceded by Examine Core's IDirectoryFactory + // tempStorageDirectory never actually got finished in Umbraco Core but accidentally got shipped (it's only enabled on the searcher + // and not the indexer). So this whole block is just legacy + //detect if a dir factory has been specified, if so then useTempStorage will not be used (deprecated) if (config != null && config["directoryFactory"] == null && config["useTempStorage"] != null) {