Merge pull request #8665 from umbraco/netcore/more-linux-optimizations
Netcore: Optimizations for non-windows development
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Examine;
|
||||
using Umbraco.Examine;
|
||||
using Umbraco.Web.Models.ContentEditing;
|
||||
|
||||
namespace Umbraco.Infrastructure.Examine
|
||||
{
|
||||
public class NoopBackOfficeExamineSearcher : IBackOfficeExamineSearcher
|
||||
{
|
||||
public IEnumerable<ISearchResult> Search(string query, UmbracoEntityTypes entityType, int pageSize, long pageIndex, out long totalFound,
|
||||
string searchFrom = null, bool ignoreUserStartNodes = false)
|
||||
{
|
||||
totalFound = 0;
|
||||
return Enumerable.Empty<ISearchResult>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Examine;
|
||||
using Umbraco.Examine;
|
||||
|
||||
namespace Umbraco.Infrastructure.Examine
|
||||
{
|
||||
public class NoopUmbracoIndexesCreator : IUmbracoIndexesCreator
|
||||
{
|
||||
public IEnumerable<IIndex> Create()
|
||||
{
|
||||
return Enumerable.Empty<IIndex>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -30,6 +30,7 @@ using Umbraco.Core.Services.Implement;
|
||||
using Umbraco.Core.Strings;
|
||||
using Umbraco.Core.Sync;
|
||||
using Umbraco.Examine;
|
||||
using Umbraco.Infrastructure.Examine;
|
||||
using Umbraco.Infrastructure.Media;
|
||||
using Umbraco.Web;
|
||||
using Umbraco.Web.Actions;
|
||||
@@ -365,7 +366,9 @@ namespace Umbraco.Core.Runtime
|
||||
|
||||
composition.RegisterUnique<IUmbracoComponentRenderer, UmbracoComponentRenderer>();
|
||||
|
||||
|
||||
// Register noop versions for examine to be overridden by examine
|
||||
composition.RegisterUnique<IUmbracoIndexesCreator, NoopUmbracoIndexesCreator>();
|
||||
composition.RegisterUnique<IBackOfficeExamineSearcher, NoopBackOfficeExamineSearcher>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Umbraco.Configuration\Umbraco.Configuration.csproj" />
|
||||
<ProjectReference Include="..\Umbraco.Core\Umbraco.Core.csproj" />
|
||||
<ProjectReference Include="..\Umbraco.Examine.Lucene\Umbraco.Examine.Lucene.csproj" />
|
||||
<ProjectReference Include="..\Umbraco.Examine.Lucene\Umbraco.Examine.Lucene.csproj" Condition="'$(OS)' == 'Windows_NT'" />
|
||||
<ProjectReference Include="..\Umbraco.Infrastructure\Umbraco.Infrastructure.csproj" />
|
||||
<ProjectReference Include="..\Umbraco.Web.Common\Umbraco.Web.Common.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
<ProjectReference Include="..\Umbraco.Web.BackOffice\Umbraco.Web.BackOffice.csproj" />
|
||||
<ProjectReference Include="..\Umbraco.Web.Common\Umbraco.Web.Common.csproj" />
|
||||
<ProjectReference Include="..\Umbraco.Web.Website\Umbraco.Web.Website.csproj" />
|
||||
<ProjectReference Include="..\Umbraco.Persistance.SqlCe\Umbraco.Persistance.SqlCe.csproj" Condition="'$(OS)' == 'Windows_NT'" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user