Examine v1.0.0 integration, it now builds! now to run tests and fixup
This commit is contained in:
26
src/Umbraco.Examine/NoPrefixSimpleFsLockFactory.cs
Normal file
26
src/Umbraco.Examine/NoPrefixSimpleFsLockFactory.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System.IO;
|
||||
using Lucene.Net.Store;
|
||||
|
||||
namespace Umbraco.Examine
|
||||
{
|
||||
/// <summary>
|
||||
/// A custom <see cref="SimpleFSLockFactory"/> that ensures a prefixless lock prefix
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This is a work around for the Lucene APIs. By default Lucene will use a null prefix however when we set a custom
|
||||
/// lock factory the null prefix is overwritten.
|
||||
/// </remarks>
|
||||
public class NoPrefixSimpleFsLockFactory : SimpleFSLockFactory
|
||||
{
|
||||
public NoPrefixSimpleFsLockFactory(DirectoryInfo lockDir) : base(lockDir)
|
||||
{
|
||||
}
|
||||
|
||||
public override string LockPrefix
|
||||
{
|
||||
get => base.LockPrefix;
|
||||
set => base.LockPrefix = null; //always set to null
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user