mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Compare commits
5 Commits
issue/8232
...
issue/8752
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f66516c87f | ||
|
|
3ec2daa9d6 | ||
|
|
2c3fe26900 | ||
|
|
bf028e0316 | ||
|
|
7b503709a5 |
43
.github/workflows/compile.yml
vendored
43
.github/workflows/compile.yml
vendored
@@ -16,56 +16,29 @@ jobs:
|
||||
shell: pwsh
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Clone Repository
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Restore NuGet Packages
|
||||
- name: Restore NuGet packages
|
||||
run: nuget restore src/Orchard.sln
|
||||
|
||||
- name: Add MSBuild to PATH
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v2
|
||||
|
||||
- name: Compile
|
||||
run: msbuild Orchard.proj /m /v:minimal /t:Compile /p:TreatWarningsAsErrors=true -WarnAsError /p:MvcBuildViews=true
|
||||
run: msbuild Orchard.proj /m /v:minimal /t:Compile /p:MvcBuildViews=true /p:TreatWarningsAsErrors=true -WarnAsError
|
||||
|
||||
- name: Test
|
||||
run: msbuild Orchard.proj /m /v:minimal /t:Test
|
||||
|
||||
- name: Test Setup with SpecFlow
|
||||
run: |
|
||||
$nunitConsole = (Get-ChildItem -Path 'src/packages' -Recurse -Filter 'nunit-console.exe' | Select-Object -Last 1).FullName
|
||||
& $nunitConsole 'build/Compile/Orchard.Specs.dll' /xml='build/Orchard.Specs.xml' /run=Orchard.Specs.SetupFeature.RootAndSetupFolderShowsSetupScreenAndFormValuesAreValidated
|
||||
|
||||
- name: Run Orchard Setup with Orchard.exe
|
||||
run: |
|
||||
$commandFile = 'src/Orchard.Web/bin/setup-commands.txt'
|
||||
New-Item -Path $commandFile -ItemType File -Force
|
||||
Set-Content -Path $commandFile -Value 'setup /SiteName:Orchard /AdminUsername:admin /AdminPassword:Password1! /DatabaseProvider:SqlCe /Recipe:Default'
|
||||
& 'src/Orchard.Web/bin/Orchard.exe' @$commandFile
|
||||
|
||||
- name: Run Code Generation
|
||||
run: |
|
||||
$commandFile = 'src/Orchard.Web/bin/codegen-commands.txt'
|
||||
New-Item -Path $commandFile -ItemType File -Force
|
||||
Set-Content -Path $commandFile -Value @'
|
||||
feature enable Orchard.CodeGeneration
|
||||
codegen module Orchard.CodeGeneration.TestModule
|
||||
codegen theme Orchard.CodeGeneration.TestTheme /CreateProject:true
|
||||
codegen moduletests Orchard.CodeGeneration.TestModule
|
||||
'@
|
||||
& 'src/Orchard.Web/bin/Orchard.exe' @$commandFile
|
||||
|
||||
- name: Compile Again with Generated Projects
|
||||
run: msbuild Orchard.proj /m /v:minimal /t:Compile /p:TreatWarningsAsErrors=true -WarnAsError /NoWarn:CS2008
|
||||
|
||||
compile-node:
|
||||
name: Compile Client-side Assets
|
||||
name: Compile client-side assets
|
||||
defaults:
|
||||
run:
|
||||
shell: pwsh
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Clone Repository
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Setup NodeJS
|
||||
@@ -73,7 +46,7 @@ jobs:
|
||||
with:
|
||||
node-version: '7'
|
||||
|
||||
- name: Setup NPM Packages
|
||||
- name: Setup NPM packages
|
||||
working-directory: ./src
|
||||
run: |
|
||||
npm install --loglevel warn
|
||||
@@ -82,7 +55,7 @@ jobs:
|
||||
$gulpVersion = (Get-Content Package.json -Raw | ConvertFrom-Json).devDependencies.gulp
|
||||
Start-Process npm -NoNewWindow -Wait -ArgumentList "install gulp@$gulpVersion -g --loglevel warn"
|
||||
|
||||
- name: Rebuild Client-side Assets
|
||||
- name: Rebuild client-side assets
|
||||
working-directory: ./src
|
||||
run: |
|
||||
gulp rebuild
|
||||
|
||||
@@ -52,6 +52,12 @@ Website: http://dlr.codeplex.com
|
||||
Copyright: Copyright (c) Microsoft Corporation
|
||||
License: Apache Software Foundation License 2.0
|
||||
|
||||
DotNetZip
|
||||
-----
|
||||
Website: http://dotnetzip.codeplex.com/
|
||||
Copyright:
|
||||
License: MS-PL
|
||||
|
||||
Eric Meyer's Reset CSS
|
||||
-----
|
||||
Website: http://meyerweb.com/eric/tools/css/reset/
|
||||
|
||||
26
README.md
26
README.md
@@ -1,14 +1,16 @@
|
||||
# Orchard
|
||||
|
||||
Orchard is a free, open source, community-focused Content Management System built on the ASP.NET MVC platform. You are looking at Orchard 1, the older, .NET Framework-based version that has been in development since 2009.
|
||||
Orchard is a free, open source, community-focused Content Management System built on the ASP.NET MVC platform.
|
||||
|
||||
If you're starting a new project (or maintaining a project built on Orchard 1), you should check out [Orchard Core](https://github.com/OrchardCMS/OrchardCore), the new generation of Orchard built on ASP.NET Core. You can also try it for free on [DotNest.com](https://dotnest.com)!
|
||||
[](https://gitter.im/OrchardCMS/Orchard?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
Join the community discussion on [Discord](https://orchardcore.net/discord), where we also have a [channel dedicated to Orchard 1](https://discord.com/channels/551136772243980291/551137194689953848).
|
||||
You can try it for free on [DotNest.com](https://dotnest.com) or on Microsoft Azure by clicking on this button.
|
||||
|
||||
[](https://portal.azure.com/#create/OutercurveFoundation.OrchardCMS)
|
||||
|
||||
## About The Orchard Project
|
||||
|
||||
#### Please visit our website at https://orchardcore.net for the most current information about this project.
|
||||
#### Please visit our website at https://orchardproject.net for the most current information about this project.
|
||||
|
||||
Orchard is a free, open source, community-focused **Content Management System** built on the ASP.NET MVC platform.
|
||||
|
||||
@@ -22,12 +24,12 @@ Our mission is to empower our users and foster a dedicated and diverse community
|
||||
|
||||
Orchard is currently in version **[1.10.3](https://github.com/OrchardCMS/Orchard/releases/tag/1.10.3)**: It contains bugfixes and the more impactful changes and new features added in the latest major version (*1.10*).
|
||||
|
||||
We invite participation by the developer community in shaping the project's direction, so that we can publicly validate our designs and development approach.
|
||||
We invite participation by the developer community in shaping the project’s direction, so that we can publicly validate our designs and development approach.
|
||||
All our releases are available on our [Releases](https://github.com/OrchardCMS/Orchard/releases) page, and we encourage interested developers to check out the source code on the Orchard GitHub site and get involved with the project.
|
||||
|
||||
* [Download the latest release](https://github.com/OrchardCMS/Orchard/releases)
|
||||
* [Feature roadmap](https://docs.orchardcore.net/projects/O1/en/latest/Documentation/Feature-roadmap/)
|
||||
* [Docs and designs/specs](https://docs.orchardcore.net/projects/O1/en/latest/)
|
||||
* [Feature roadmap](https://docs.orchardproject.net/en/latest/Documentation/Feature-roadmap/)
|
||||
* [Docs and designs/specs](https://docs.orchardproject.net)
|
||||
|
||||
## How To Get Involved
|
||||
|
||||
@@ -40,7 +42,11 @@ There are many ways you can contribute to Orchard:
|
||||
* [Find and file a bug](https://github.com/OrchardCMS/Orchard/issues)
|
||||
* [Propose a feature idea](https://github.com/OrchardCMS/Orchard/issues/new)
|
||||
* [Ask and answer questions on Stack Overflow](https://stackoverflow.com/questions/tagged/orchardcms)
|
||||
* [Join us on Discord](https://orchardcore.net/discord)
|
||||
* [Submit a pull request](https://docs.orchardcore.net/projects/O1/en/latest/Documentation/Contributing-patches/)
|
||||
* [Participate in our gitter.im chatroom](https://gitter.im/OrchardCMS/Orchard)
|
||||
* [Submit a pull request](https://docs.orchardproject.net/en/latest/Documentation/Contributing-patches/)
|
||||
* [Translate Orchard](https://crowdin.com/project/orchard-cms)
|
||||
* [Contribute modules and themes to our gallery](https://gallery.orchardproject.net)
|
||||
* [Contribute modules and themes to our gallery](https://gallery.orchardproject.net/)
|
||||
|
||||
## The Future Of Orchard CMS: Orchard Core
|
||||
|
||||
As the underlying frameworks (.NET, ASP.NET and ASP.NET MVC) are constantly evolving, Orchard of course keeps track of the changes and improvements of these: Orchard Core is the next generation of Orchard releases that is based on [ASP.NET Core](https://www.asp.net/core). Just like the current Orchard project, it's fully [open-source and is publicly available on GitHub](https://github.com/OrchardCMS/OrchardCore). Orchard Core (as a framework) is being built from scratch: it's still in development and does not share any of its code base (at least directly) with the current versions (1.x) of Orchard.
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="NHibernate" publicKeyToken="aa95f207798dfdb4" culture="neutral" />
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Autofac" publicKeyToken="17863af14b0044da" />
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using Ionic.Zip;
|
||||
using NUnit.Framework;
|
||||
using Orchard.Environment.Configuration;
|
||||
using Orchard.FileSystems.Media;
|
||||
@@ -53,10 +53,10 @@ namespace Orchard.Tests.Modules.Media.Services {
|
||||
[Test]
|
||||
public void GetMediaFoldersTest() {
|
||||
StorageProvider.ListFoldersPredicate = path => {
|
||||
return string.IsNullOrEmpty(path) ? new[] { new StubStorageFolder(FolderName1) }
|
||||
: string.Equals(path, FolderName1) ? new[] { new StubStorageFolder(FolderName2), new StubStorageFolder(FolderName3) }
|
||||
return string.IsNullOrEmpty(path) ? new[] {new StubStorageFolder(FolderName1)}
|
||||
: string.Equals(path, FolderName1) ? new[] {new StubStorageFolder(FolderName2), new StubStorageFolder(FolderName3)}
|
||||
: new StubStorageFolder[] { };
|
||||
};
|
||||
};
|
||||
|
||||
IEnumerable<MediaFolder> mediaFolders = MediaService.GetMediaFolders(null);
|
||||
Assert.That(mediaFolders.Count(), Is.EqualTo(1), "Root path only has 1 sub directory");
|
||||
@@ -94,7 +94,7 @@ namespace Orchard.Tests.Modules.Media.Services {
|
||||
Assert.That(StorageProvider.SavedStreams.Contains(StorageProvider.Combine(FolderName1, FinalDottedWebconfigFileName)), Is.False, "no extension files are never allowed");
|
||||
Assert.That(StorageProvider.SavedStreams.Contains(StorageProvider.Combine(FolderName1, PaddedWebconfigFileName)), Is.False, "no extension files are never allowed");
|
||||
Assert.That(StorageProvider.SavedStreams.Contains(StorageProvider.Combine(FolderName1, FinalDottedTextFileName)), Is.False, "no extension files are never allowed");
|
||||
|
||||
|
||||
Assert.That(StorageProvider.SavedStreams.Count, Is.EqualTo(3));
|
||||
}
|
||||
|
||||
@@ -160,30 +160,29 @@ namespace Orchard.Tests.Modules.Media.Services {
|
||||
}
|
||||
|
||||
private MemoryStream CreateZipMemoryStream() {
|
||||
var entries = new List<string> {
|
||||
TextFileName, WebconfigFileName, DllFileName, ZipFileName, NoExtensionFileName, PaddedWebconfigFileName,
|
||||
FinalDottedWebconfigFileName, PaddedTextFileName, FinalDottedTextFileName
|
||||
};
|
||||
|
||||
// Setup memory stream with zip archive for more complex scenarios
|
||||
MemoryStream memoryStream = new MemoryStream();
|
||||
using (var archive = new ZipArchive(memoryStream, ZipArchiveMode.Create, leaveOpen: true)) {
|
||||
var content = new byte[] { 0x01 };
|
||||
foreach (var entry in entries) {
|
||||
var zipEntry = archive.CreateEntry(entry);
|
||||
using (var zipStream = zipEntry.Open()) {
|
||||
zipStream.Write(content, 0, 1);
|
||||
}
|
||||
++content[0];
|
||||
}
|
||||
}
|
||||
using (ZipFile zipOut = new ZipFile()) {
|
||||
|
||||
zipOut.AddEntry(TextFileName, new byte[] { 0x01 });
|
||||
zipOut.AddEntry(WebconfigFileName, new byte[] { 0x02 });
|
||||
zipOut.AddEntry(DllFileName, new byte[] { 0x03 });
|
||||
zipOut.AddEntry(ZipFileName, new byte[] { 0x04 });
|
||||
zipOut.AddEntry(NoExtensionFileName, new byte[] { 0x05 });
|
||||
zipOut.AddEntry(PaddedWebconfigFileName, new byte[] { 0x06 });
|
||||
zipOut.AddEntry(FinalDottedWebconfigFileName, new byte[] { 0x07 });
|
||||
zipOut.AddEntry(PaddedTextFileName, new byte[] { 0x08 });
|
||||
zipOut.AddEntry(FinalDottedTextFileName, new byte[] { 0x09 });
|
||||
|
||||
zipOut.Save(memoryStream);
|
||||
}
|
||||
|
||||
return new MemoryStream(memoryStream.ToArray());
|
||||
}
|
||||
|
||||
private class MediaServiceAccessor : MediaService {
|
||||
public MediaServiceAccessor(IStorageProvider storageProvider, IOrchardServices orchardServices)
|
||||
: base(storageProvider, orchardServices) { }
|
||||
: base (storageProvider, orchardServices) {}
|
||||
|
||||
public void UnzipMediaFileArchiveAccessor(string targetFolder, Stream zipStream) {
|
||||
UnzipMediaFileArchive(targetFolder, zipStream);
|
||||
|
||||
@@ -64,6 +64,9 @@
|
||||
<Reference Include="Castle.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Castle.Core.3.3.1\lib\net45\Castle.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DotNetZip, Version=1.12.0.0, Culture=neutral, PublicKeyToken=6583c7c814667745, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\DotNetZip.1.12.0\lib\net20\DotNetZip.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FluentNHibernate, Version=2.0.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -104,8 +107,8 @@
|
||||
<Reference Include="Moq, Version=4.2.1510.2205, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Moq.4.2.1510.2205\lib\net40\Moq.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate, Version=4.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NHibernate.4.1.2.4000\lib\net40\NHibernate.dll</HintPath>
|
||||
@@ -131,7 +134,6 @@
|
||||
<HintPath>..\..\lib\sqlce\System.Data.SqlServerCe.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.Abstractions">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<packages>
|
||||
<package id="Autofac" version="3.5.2" targetFramework="net48" />
|
||||
<package id="Castle.Core" version="3.3.1" targetFramework="net48" />
|
||||
<package id="DotNetZip" version="1.12.0" targetFramework="net48" />
|
||||
<package id="FluentNHibernate" version="2.0.3.0" targetFramework="net48" />
|
||||
<package id="Iesi.Collections" version="4.0.1.4000" targetFramework="net48" />
|
||||
<package id="IronRuby" version="1.1.3" targetFramework="net48" />
|
||||
@@ -11,7 +12,7 @@
|
||||
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||
<package id="Moq" version="4.2.1510.2205" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net48" />
|
||||
<package id="NHibernate" version="4.1.2.4000" targetFramework="net48" />
|
||||
<package id="NUnit" version="2.5.10.11092" targetFramework="net48" />
|
||||
<package id="Orchard.FluentPath" version="1.0.0.1" targetFramework="net48" />
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Autofac" publicKeyToken="17863af14b0044da" />
|
||||
|
||||
@@ -104,8 +104,8 @@
|
||||
<Reference Include="Moq, Version=4.2.1510.2205, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Moq.4.2.1510.2205\lib\net40\Moq.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate, Version=4.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NHibernate.4.1.2.4000\lib\net40\NHibernate.dll</HintPath>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||
<package id="Moq" version="4.2.1510.2205" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net48" />
|
||||
<package id="NHibernate" version="4.1.2.4000" targetFramework="net48" />
|
||||
<package id="NUnit" version="2.5.10.11092" targetFramework="net48" />
|
||||
<package id="NUnitTestAdapter" version="2.3.0" targetFramework="net48" />
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -59,8 +59,8 @@
|
||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
@@ -250,4 +250,4 @@
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -5,5 +5,5 @@
|
||||
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="4.1.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||
</packages>
|
||||
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net48" />
|
||||
</packages>
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -61,8 +61,8 @@
|
||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate, Version=4.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\NHibernate.4.1.2.4000\lib\net40\NHibernate.dll</HintPath>
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="4.1.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net48" />
|
||||
<package id="NHibernate" version="4.1.2.4000" targetFramework="net48" />
|
||||
<package id="XMLDiffPatch" version="1.0.8.28" targetFramework="net48" />
|
||||
</packages>
|
||||
</packages>
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -76,14 +76,14 @@
|
||||
<Reference Include="Microsoft.Data.Services.Client, Version=5.8.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.Data.Services.Client.5.8.4\lib\net40\Microsoft.Data.Services.Client.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.IdentityModel.JsonWebTokens, Version=5.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.IdentityModel.JsonWebTokens.5.7.0\lib\net461\Microsoft.IdentityModel.JsonWebTokens.dll</HintPath>
|
||||
<Reference Include="Microsoft.IdentityModel.JsonWebTokens, Version=5.2.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.IdentityModel.JsonWebTokens.5.2.4\lib\net451\Microsoft.IdentityModel.JsonWebTokens.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.IdentityModel.Logging, Version=5.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.IdentityModel.Logging.5.7.0\lib\net461\Microsoft.IdentityModel.Logging.dll</HintPath>
|
||||
<Reference Include="Microsoft.IdentityModel.Logging, Version=5.2.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.IdentityModel.Logging.5.2.4\lib\net451\Microsoft.IdentityModel.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.IdentityModel.Tokens, Version=5.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.IdentityModel.Tokens.5.7.0\lib\net461\Microsoft.IdentityModel.Tokens.dll</HintPath>
|
||||
<Reference Include="Microsoft.IdentityModel.Tokens, Version=5.2.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.IdentityModel.Tokens.5.2.4\lib\net451\Microsoft.IdentityModel.Tokens.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Practices.TransientFaultHandling.Core, Version=5.1.1209.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\TransientFaultHandling.Core.5.1.1209.1\lib\NET4\Microsoft.Practices.TransientFaultHandling.Core.dll</HintPath>
|
||||
@@ -109,8 +109,8 @@
|
||||
<Reference Include="Microsoft.WindowsAzure.Storage, Version=5.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\WindowsAzure.Storage.5.0.2\lib\net40\Microsoft.WindowsAzure.Storage.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate, Version=4.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\NHibernate.4.1.2.4000\lib\net40\NHibernate.dll</HintPath>
|
||||
@@ -121,8 +121,8 @@
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.IdentityModel.Tokens.Jwt, Version=5.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\System.IdentityModel.Tokens.Jwt.5.7.0\lib\net461\System.IdentityModel.Tokens.Jwt.dll</HintPath>
|
||||
<Reference Include="System.IdentityModel.Tokens.Jwt, Version=5.2.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\System.IdentityModel.Tokens.Jwt.5.2.4\lib\net451\System.IdentityModel.Tokens.Jwt.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.Spatial, Version=5.8.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
|
||||
@@ -11,15 +11,15 @@
|
||||
<package id="Microsoft.Data.Edm" version="5.8.4" targetFramework="net48" />
|
||||
<package id="Microsoft.Data.OData" version="5.8.4" targetFramework="net48" />
|
||||
<package id="Microsoft.Data.Services.Client" version="5.8.4" targetFramework="net48" />
|
||||
<package id="Microsoft.IdentityModel.JsonWebTokens" version="5.7.0" targetFramework="net48" />
|
||||
<package id="Microsoft.IdentityModel.Logging" version="5.7.0" targetFramework="net48" />
|
||||
<package id="Microsoft.IdentityModel.Tokens" version="5.7.0" targetFramework="net48" />
|
||||
<package id="Microsoft.IdentityModel.JsonWebTokens" version="5.2.4" targetFramework="net48" />
|
||||
<package id="Microsoft.IdentityModel.Logging" version="5.2.4" targetFramework="net48" />
|
||||
<package id="Microsoft.IdentityModel.Tokens" version="5.2.4" targetFramework="net48" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="3.1.0" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net48" />
|
||||
<package id="NHibernate" version="4.1.2.4000" targetFramework="net48" />
|
||||
<package id="Orchard.WindowsAzure.Diagnostics" version="2.7.0.0" targetFramework="net48" />
|
||||
<package id="System.IdentityModel.Tokens.Jwt" version="5.7.0" targetFramework="net48" />
|
||||
<package id="System.IdentityModel.Tokens.Jwt" version="5.2.4" targetFramework="net48" />
|
||||
<package id="System.Spatial" version="5.8.4" targetFramework="net48" />
|
||||
<package id="TransientFaultHandling.Core" version="5.1.1209.1" targetFramework="net48" />
|
||||
<package id="windowsazure.mediaservices" version="3.4.0.0" targetFramework="net48" />
|
||||
|
||||
@@ -100,8 +100,8 @@
|
||||
<Reference Include="Microsoft.WindowsFabric.Data.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Caching.2.4.0.0\lib\net40-full\Microsoft.WindowsFabric.Data.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate, Version=4.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\NHibernate.4.1.2.4000\lib\net40\NHibernate.dll</HintPath>
|
||||
@@ -218,4 +218,4 @@
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Autofac" publicKeyToken="17863af14b0044da" culture="neutral" />
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||
<package id="Microsoft.WindowsAzure.Caching" version="2.4.0.0" targetFramework="net48" />
|
||||
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="3.1.0" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net48" />
|
||||
<package id="NHibernate" version="4.1.2.4000" targetFramework="net48" />
|
||||
<package id="Orchard.WindowsAzure.ServiceRuntime" version="2.7.0.0" targetFramework="net48" />
|
||||
<package id="System.Spatial" version="5.8.4" targetFramework="net48" />
|
||||
<package id="WindowsAzure.Storage" version="5.0.2" targetFramework="net48" />
|
||||
</packages>
|
||||
</packages>
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30AD4FE6B2A6AEED" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="NHibernate" publicKeyToken="AA95F207798DFDB4" culture="neutral"/>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>..\..\..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSet>..\..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
@@ -35,16 +35,16 @@
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Autofac, Version=3.5.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
|
||||
<Reference Include="Autofac">
|
||||
<HintPath>..\..\..\..\packages\Autofac.3.5.2\lib\net40\Autofac.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Moq, Version=4.2.1510.2205, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\..\packages\Moq.4.2.1510.2205\lib\net40\Moq.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate, Version=4.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\..\packages\NHibernate.4.1.2.4000\lib\net40\NHibernate.dll</HintPath>
|
||||
<Reference Include="NHibernate">
|
||||
<HintPath>..\..\..\..\packages\NHibernate.4.0.1.4000\lib\net40\NHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework, Version=2.5.10.11092, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
||||
<Reference Include="nunit.framework">
|
||||
<HintPath>..\..\..\..\packages\NUnit.2.5.10.11092\lib\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Autofac" version="3.5.2" targetFramework="net48" />
|
||||
<package id="Moq" version="4.2.1510.2205" targetFramework="net48" />
|
||||
<package id="NHibernate" version="4.1.2.4000" targetFramework="net48" />
|
||||
<package id="NUnit" version="2.5.10.11092" targetFramework="net48" />
|
||||
</packages>
|
||||
@@ -161,8 +161,6 @@ namespace Orchard.CodeGeneration.Commands {
|
||||
templateText = templateText.Replace("$$ModuleTypeLibGuid$$", Guid.NewGuid().ToString());
|
||||
File.WriteAllText(propertiesPath + "\\AssemblyInfo.cs", templateText);
|
||||
content.Add(propertiesPath + "\\AssemblyInfo.cs");
|
||||
File.WriteAllText(testsPath + "packages.config", File.ReadAllText(_codeGenTemplatePath + "ModuleTestsPackagesConfig.txt"));
|
||||
content.Add(testsPath + "packages.config");
|
||||
|
||||
var itemGroup = CreateProjectItemGroup(testsPath, content, folders);
|
||||
|
||||
@@ -170,7 +168,7 @@ namespace Orchard.CodeGeneration.Commands {
|
||||
csprojText = csprojText.Replace("$$ProjectName$$", projectName);
|
||||
csprojText = csprojText.Replace("$$TestsProjectGuid$$", projectGuid);
|
||||
csprojText = csprojText.Replace("$$FileIncludes$$", itemGroup ?? "");
|
||||
csprojText = csprojText.Replace("$$OrchardReferences$$", GetOrchardReferences(modulesFolderRelativeDepth: 3));
|
||||
csprojText = csprojText.Replace("$$OrchardReferences$$", GetOrchardReferences());
|
||||
|
||||
File.WriteAllText(testsPath + projectName + ".csproj", csprojText);
|
||||
|
||||
@@ -329,17 +327,15 @@ namespace Orchard.CodeGeneration.Commands {
|
||||
return text;
|
||||
}
|
||||
|
||||
private static string GetOrchardReferences(int modulesFolderRelativeDepth = 2) {
|
||||
var frameworkRelativeDepth = string.Join("\\", Enumerable.Repeat("..", modulesFolderRelativeDepth + 1));
|
||||
var coreRelativeDepth = string.Join("\\", Enumerable.Repeat("..", modulesFolderRelativeDepth));
|
||||
private static string GetOrchardReferences() {
|
||||
return IsSourceEnlistment() ?
|
||||
$@"<ProjectReference Include=""{frameworkRelativeDepth}\Orchard\Orchard.Framework.csproj"">
|
||||
<Project>{{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}}</Project>
|
||||
@"<ProjectReference Include=""..\..\..\Orchard\Orchard.Framework.csproj"">
|
||||
<Project>{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}</Project>
|
||||
<Name>Orchard.Framework</Name>
|
||||
<Private>$(MvcBuildViews)</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include=""{coreRelativeDepth}\Core\Orchard.Core.csproj"">
|
||||
<Project>{{9916839C-39FC-4CEB-A5AF-89CA7E87119F}}</Project>
|
||||
<ProjectReference Include=""..\..\Core\Orchard.Core.csproj"">
|
||||
<Project>{9916839C-39FC-4CEB-A5AF-89CA7E87119F}</Project>
|
||||
<Name>Orchard.Core</Name>
|
||||
<Private>$(MvcBuildViews)</Private>
|
||||
</ProjectReference>" :
|
||||
|
||||
@@ -88,7 +88,6 @@
|
||||
<Compile Include="Services\CodeGenerationCommandInterpreter.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="CodeGenerationTemplates\ModuleTestsPackagesConfig.txt" />
|
||||
<Content Include="CodeGenerationTemplates\ModuleStylesMinCss.txt" />
|
||||
<Content Include="CodeGenerationTemplates\ModuleStylesCss.txt" />
|
||||
<Content Include="CodeGenerationTemplates\ModuleStylesLess.txt" />
|
||||
@@ -159,4 +158,4 @@
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -65,8 +65,8 @@
|
||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -7,5 +7,5 @@
|
||||
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="4.1.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net48" />
|
||||
</packages>
|
||||
@@ -68,8 +68,8 @@
|
||||
<Reference Include="MimeKit, Version=3.1.0.0, Culture=neutral, PublicKeyToken=bede1c8a46c66814, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\MimeKit.3.1.1\lib\net48\MimeKit.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="4.1.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||
<package id="MimeKit" version="3.1.1" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net48" />
|
||||
<package id="Portable.BouncyCastle" version="1.9.0" targetFramework="net48" />
|
||||
<package id="System.Buffers" version="4.5.1" targetFramework="net48" />
|
||||
</packages>
|
||||
@@ -54,7 +54,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -54,8 +54,8 @@
|
||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
@@ -172,4 +172,4 @@
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -4,5 +4,5 @@
|
||||
<package id="Microsoft.AspNet.Razor" version="3.2.7" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||
</packages>
|
||||
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net48" />
|
||||
</packages>
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -60,8 +60,8 @@
|
||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
@@ -196,4 +196,4 @@
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -5,5 +5,5 @@
|
||||
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="4.1.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||
</packages>
|
||||
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net48" />
|
||||
</packages>
|
||||
|
||||
@@ -58,8 +58,8 @@
|
||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Autofac" publicKeyToken="17863af14b0044da" culture="neutral" />
|
||||
|
||||
@@ -7,6 +7,6 @@
|
||||
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="4.1.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net48" />
|
||||
<package id="YamlDotNet" version="11.1.1" targetFramework="net48" />
|
||||
</packages>
|
||||
@@ -54,7 +54,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -52,6 +52,9 @@
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="DotNetZip, Version=1.12.0.0, Culture=neutral, PublicKeyToken=6583c7c814667745, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\DotNetZip.1.12.0\lib\net20\DotNetZip.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.4.1.0\lib\net472\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -61,7 +64,6 @@
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.ApplicationServices" />
|
||||
<Reference Include="System.Web.DynamicData" />
|
||||
@@ -202,4 +204,4 @@
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using Ionic.Zip;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.FileSystems.Media;
|
||||
using Orchard.Localization;
|
||||
@@ -194,7 +194,7 @@ namespace Orchard.Media.Services {
|
||||
/// <param name="bytes">The array of bytes with the file's contents.</param>
|
||||
/// <param name="extractZip">Boolean value indicating weather zip files should be extracted.</param>
|
||||
/// <returns>The path to the uploaded file.</returns>
|
||||
public string UploadMediaFile(string folderPath, string fileName, byte[] bytes, bool extractZip) {
|
||||
public string UploadMediaFile(string folderPath, string fileName, byte [] bytes, bool extractZip) {
|
||||
Argument.ThrowIfNullOrEmpty(folderPath, "folderPath");
|
||||
Argument.ThrowIfNullOrEmpty(fileName, "fileName");
|
||||
Argument.ThrowIfNull(bytes, "bytes");
|
||||
@@ -274,16 +274,16 @@ namespace Orchard.Media.Services {
|
||||
|
||||
// must be in the whitelist
|
||||
MediaSettingsPart mediaSettings = currentSite.As<MediaSettingsPart>();
|
||||
|
||||
|
||||
if (mediaSettings == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (String.IsNullOrWhiteSpace(mediaSettings.UploadAllowedFileTypeWhitelist)) {
|
||||
}
|
||||
|
||||
if(String.IsNullOrWhiteSpace(mediaSettings.UploadAllowedFileTypeWhitelist)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!mediaSettings.UploadAllowedFileTypeWhitelist.ToUpperInvariant().Split(' ').Contains(extension.ToUpperInvariant())) {
|
||||
if(!mediaSettings.UploadAllowedFileTypeWhitelist.ToUpperInvariant().Split(' ').Contains(extension.ToUpperInvariant())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -305,26 +305,28 @@ namespace Orchard.Media.Services {
|
||||
Argument.ThrowIfNullOrEmpty(targetFolder, "targetFolder");
|
||||
Argument.ThrowIfNull(zipStream, "zipStream");
|
||||
|
||||
using (var fileInflater = new ZipArchive(zipStream)) {
|
||||
using (var fileInflater = ZipFile.Read(zipStream)) {
|
||||
// We want to preserve whatever directory structure the zip file contained instead
|
||||
// of flattening it.
|
||||
// The API below doesn't necessarily return the entries in the zip file in any order.
|
||||
// That means the files in subdirectories can be returned as entries from the stream
|
||||
// before the directories that contain them, so we create directories as soon as first
|
||||
// file below their path is encountered.
|
||||
foreach (var entry in fileInflater.Entries) {
|
||||
foreach (ZipEntry entry in fileInflater) {
|
||||
if (entry == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(entry.Name)) {
|
||||
// skip disallowed files
|
||||
if (FileAllowed(entry.Name, false)) {
|
||||
string fullFileName = _storageProvider.Combine(targetFolder, entry.FullName);
|
||||
if (!entry.IsDirectory && !string.IsNullOrEmpty(entry.FileName)) {
|
||||
|
||||
using (var stream = entry.Open()) {
|
||||
// skip disallowed files
|
||||
if (FileAllowed(entry.FileName, false)) {
|
||||
string fullFileName = _storageProvider.Combine(targetFolder, entry.FileName);
|
||||
|
||||
using (var stream = entry.OpenReader()) {
|
||||
// the call will return false if the file already exists
|
||||
if (!_storageProvider.TrySaveStream(fullFileName, stream)) {
|
||||
|
||||
// try to delete the file and save again
|
||||
try {
|
||||
_storageProvider.DeleteFile(fullFileName);
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="DotNetZip" version="1.12.0" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNet.Mvc" version="5.2.7" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNet.Razor" version="3.2.7" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
||||
|
||||
@@ -58,8 +58,8 @@
|
||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
@@ -451,4 +451,4 @@
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -5,5 +5,5 @@
|
||||
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="4.1.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||
</packages>
|
||||
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net48" />
|
||||
</packages>
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Core.Title.Models;
|
||||
using Orchard.DisplayManagement;
|
||||
using Orchard.Forms.Services;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Mvc;
|
||||
using Orchard.Projections.Descriptors.Filter;
|
||||
using Orchard.Projections.Descriptors.Layout;
|
||||
@@ -15,9 +11,13 @@ using Orchard.Projections.Descriptors.SortCriterion;
|
||||
using Orchard.Projections.Models;
|
||||
using Orchard.Projections.Services;
|
||||
using Orchard.Projections.ViewModels;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.DisplayManagement;
|
||||
using Orchard.Localization;
|
||||
using Orchard.UI.Notify;
|
||||
using System;
|
||||
using Orchard.Settings;
|
||||
using Orchard.UI.Navigation;
|
||||
using Orchard.UI.Notify;
|
||||
|
||||
namespace Orchard.Projections.Controllers {
|
||||
[ValidateInput(false)]
|
||||
@@ -84,7 +84,7 @@ namespace Orchard.Projections.Controllers {
|
||||
|
||||
var model = new AdminIndexViewModel {
|
||||
Queries = results.Select(x => new QueryEntry {
|
||||
Query = x.As<QueryPart>().Record,
|
||||
Query = x.As<QueryPart>().Record,
|
||||
QueryId = x.Id,
|
||||
Name = x.As<QueryPart>().Name
|
||||
}).ToList(),
|
||||
@@ -158,21 +158,16 @@ namespace Orchard.Projections.Controllers {
|
||||
Category = f.Category,
|
||||
Type = f.Type,
|
||||
FilterRecordId = filter.Id,
|
||||
DisplayText = String.IsNullOrWhiteSpace(filter.Description) ? f.Display(new FilterContext { State = FormParametersHelper.ToDynamic(filter.State) }).Text : filter.Description
|
||||
DisplayText = String.IsNullOrWhiteSpace(filter.Description) ? f.Display(new FilterContext {State = FormParametersHelper.ToDynamic(filter.State)}).Text : filter.Description
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
filterGroupEntries.Add(new FilterGroupEntry { Id = group.Id, Filters = filterEntries });
|
||||
filterGroupEntries.Add( new FilterGroupEntry { Id = group.Id, Filters = filterEntries } );
|
||||
}
|
||||
|
||||
viewModel.FilterGroups = filterGroupEntries;
|
||||
|
||||
if (viewModel.FilterGroups.Any(group => group.Filters.Count() == 0)) {
|
||||
_services.Notifier.Warning(
|
||||
T("This Query has at least one empty filter group, which will cause all content items to be returned, unless the Projection using this Query limits the number of content items displayed."));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Load Sort criterias
|
||||
@@ -190,7 +185,7 @@ namespace Orchard.Projections.Controllers {
|
||||
Category = f.Category,
|
||||
Type = f.Type,
|
||||
SortCriterionRecordId = sortCriterion.Id,
|
||||
DisplayText = String.IsNullOrWhiteSpace(sortCriterion.Description) ? f.Display(new SortCriterionContext { State = FormParametersHelper.ToDynamic(sortCriterion.State) }).Text : sortCriterion.Description
|
||||
DisplayText = String.IsNullOrWhiteSpace(sortCriterion.Description) ? f.Display(new SortCriterionContext { State = FormParametersHelper.ToDynamic(sortCriterion.State) }).Text : sortCriterion.Description
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,12 +20,10 @@ using Orchard.Projections.Settings;
|
||||
using Orchard.Projections.ViewModels;
|
||||
using Orchard.Tokens;
|
||||
using Orchard.UI.Navigation;
|
||||
using Orchard.UI.Notify;
|
||||
using Orchard.Utility.Extensions;
|
||||
|
||||
namespace Orchard.Projections.Drivers {
|
||||
public class ProjectionPartDriver : ContentPartDriver<ProjectionPart> {
|
||||
private readonly IOrchardServices _orchardServices;
|
||||
private readonly IRepository<QueryPartRecord> _queryRepository;
|
||||
private readonly IProjectionManagerExtension _projectionManager;
|
||||
private readonly IFeedManager _feedManager;
|
||||
@@ -35,25 +33,25 @@ namespace Orchard.Projections.Drivers {
|
||||
private const string TemplateName = "Parts/ProjectionPart";
|
||||
|
||||
public ProjectionPartDriver(
|
||||
IOrchardServices orchardServices,
|
||||
IOrchardServices services,
|
||||
IRepository<QueryPartRecord> queryRepository,
|
||||
IProjectionManagerExtension projectionManager,
|
||||
IFeedManager feedManager,
|
||||
ITokenizer tokenizer,
|
||||
IDisplayHelperFactory displayHelperFactory,
|
||||
IWorkContextAccessor workContextAccessor) {
|
||||
_orchardServices = orchardServices;
|
||||
_queryRepository = queryRepository;
|
||||
_projectionManager = projectionManager;
|
||||
_feedManager = feedManager;
|
||||
_tokenizer = tokenizer;
|
||||
_displayHelperFactory = displayHelperFactory;
|
||||
_workContextAccessor = workContextAccessor;
|
||||
|
||||
T = NullLocalizer.Instance;
|
||||
Services = services;
|
||||
}
|
||||
|
||||
public Localizer T { get; set; }
|
||||
public IOrchardServices Services { get; set; }
|
||||
|
||||
protected override string Prefix { get { return "ProjectionPart"; } }
|
||||
|
||||
@@ -61,7 +59,7 @@ namespace Orchard.Projections.Drivers {
|
||||
var query = part.Record.QueryPartRecord;
|
||||
|
||||
// retrieving paging parameters
|
||||
var queryString = _orchardServices.WorkContext.HttpContext.Request.QueryString;
|
||||
var queryString = Services.WorkContext.HttpContext.Request.QueryString;
|
||||
|
||||
var pageKey = String.IsNullOrWhiteSpace(part.Record.PagerSuffix) ? "page" : "page-" + part.Record.PagerSuffix;
|
||||
var page = 0;
|
||||
@@ -83,14 +81,16 @@ namespace Orchard.Projections.Drivers {
|
||||
var pageSizeKey = "pageSize" + part.Record.PagerSuffix;
|
||||
|
||||
if (queryString.AllKeys.Contains(pageSizeKey)) {
|
||||
if (Int32.TryParse(queryString[pageSizeKey], out int qsPageSize)) {
|
||||
int qsPageSize;
|
||||
|
||||
if (Int32.TryParse(queryString[pageSizeKey], out qsPageSize)) {
|
||||
if (part.Record.MaxItems == 0 || qsPageSize <= part.Record.MaxItems) {
|
||||
pageSize = qsPageSize;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var pager = new Pager(_orchardServices.WorkContext.CurrentSite, page, pageSize);
|
||||
var pager = new Pager(Services.WorkContext.CurrentSite, page, pageSize);
|
||||
|
||||
var pagerShape = shapeHelper.Pager(pager)
|
||||
.ContentPart(part)
|
||||
@@ -107,7 +107,7 @@ namespace Orchard.Projections.Drivers {
|
||||
ContentShape("Parts_ProjectionPart_List", shape => {
|
||||
|
||||
// generates a link to the RSS feed for this term
|
||||
var metaData = _orchardServices.ContentManager.GetItemMetadata(part.ContentItem);
|
||||
var metaData = Services.ContentManager.GetItemMetadata(part.ContentItem);
|
||||
_feedManager.Register(metaData.DisplayText, "rss", new RouteValueDictionary { { "projection", part.Id } });
|
||||
|
||||
// execute the query
|
||||
@@ -130,8 +130,8 @@ namespace Orchard.Projections.Drivers {
|
||||
|
||||
// renders in a standard List shape if no specific layout could be found
|
||||
if (layoutDescriptor == null) {
|
||||
var list = _orchardServices.New.List();
|
||||
var contentShapes = contentItems.Select(item => _orchardServices.ContentManager.BuildDisplay(item, "Summary"));
|
||||
var list = Services.New.List();
|
||||
var contentShapes = contentItems.Select(item => Services.ContentManager.BuildDisplay(item, "Summary"));
|
||||
list.AddRange(contentShapes);
|
||||
|
||||
return list;
|
||||
@@ -143,7 +143,7 @@ namespace Orchard.Projections.Drivers {
|
||||
var layoutComponents = contentItems.Select(
|
||||
contentItem => {
|
||||
|
||||
var contentItemMetadata = _orchardServices.ContentManager.GetItemMetadata(contentItem);
|
||||
var contentItemMetadata = Services.ContentManager.GetItemMetadata(contentItem);
|
||||
|
||||
var propertyDescriptors = fieldDescriptors.Select(
|
||||
d => {
|
||||
@@ -156,9 +156,9 @@ namespace Orchard.Projections.Drivers {
|
||||
});
|
||||
|
||||
// apply all settings to the field content, wrapping it in a FieldWrapper shape
|
||||
var properties = _orchardServices.New.Properties(
|
||||
var properties = Services.New.Properties(
|
||||
Items: propertyDescriptors.Select(
|
||||
pd => _orchardServices.New.PropertyWrapper(
|
||||
pd => Services.New.PropertyWrapper(
|
||||
Item: pd.Shape,
|
||||
Property: pd.Property,
|
||||
ContentItem: contentItem,
|
||||
@@ -199,14 +199,14 @@ namespace Orchard.Projections.Drivers {
|
||||
return key;
|
||||
}).Select(x => new { Key = x.Key, Components = x });
|
||||
|
||||
var list = _orchardServices.New.List();
|
||||
var list = Services.New.List();
|
||||
foreach (var group in groups) {
|
||||
|
||||
var localResult = layoutDescriptor.Render(renderLayoutContext, group.Components);
|
||||
// add the Context to the shape
|
||||
localResult.Context(renderLayoutContext);
|
||||
|
||||
list.Add(_orchardServices.New.LayoutGroup(Key: new MvcHtmlString(group.Key), List: localResult));
|
||||
list.Add(Services.New.LayoutGroup(Key: new MvcHtmlString(group.Key), List: localResult));
|
||||
}
|
||||
|
||||
return list;
|
||||
@@ -223,80 +223,81 @@ namespace Orchard.Projections.Drivers {
|
||||
}
|
||||
|
||||
protected override DriverResult Editor(ProjectionPart part, dynamic shapeHelper) {
|
||||
return ContentShape("Parts_ProjectionPart_Edit", () => {
|
||||
var model = new ProjectionPartEditViewModel();
|
||||
return ContentShape("Parts_ProjectionPart_Edit",
|
||||
() => {
|
||||
var model = new ProjectionPartEditViewModel();
|
||||
|
||||
// for create read the setting values
|
||||
var settings = part.TypePartDefinition.Settings.GetModel<ProjectionPartSettings>();
|
||||
if (part.Id == 0) {
|
||||
model = new ProjectionPartEditViewModel {
|
||||
DisplayPager = settings.DisplayPager,
|
||||
Items = settings.Items,
|
||||
Skip = settings.Skip,
|
||||
PagerSuffix = settings.PagerSuffix,
|
||||
MaxItems = settings.MaxItems,
|
||||
QueryLayoutRecordId = settings.QueryLayoutRecordId
|
||||
};
|
||||
}
|
||||
else {
|
||||
model = new ProjectionPartEditViewModel {
|
||||
DisplayPager = part.Record.DisplayPager,
|
||||
Items = part.Record.Items,
|
||||
ItemsPerPage = part.Record.ItemsPerPage,
|
||||
Skip = part.Record.Skip,
|
||||
PagerSuffix = part.Record.PagerSuffix,
|
||||
MaxItems = part.Record.MaxItems,
|
||||
QueryLayoutRecordId = "-1"
|
||||
};
|
||||
// concatenated Query and Layout ids for the view
|
||||
if (part.Record.QueryPartRecord != null) {
|
||||
model.QueryLayoutRecordId = part.Record.QueryPartRecord.Id + ";";
|
||||
}
|
||||
// for create read the setting values
|
||||
var settings = part.TypePartDefinition.Settings.GetModel<ProjectionPartSettings>();
|
||||
if (part.Id == 0) {
|
||||
model = new ProjectionPartEditViewModel {
|
||||
DisplayPager = settings.DisplayPager,
|
||||
Items = settings.Items,
|
||||
Skip = settings.Skip,
|
||||
PagerSuffix = settings.PagerSuffix,
|
||||
MaxItems = settings.MaxItems,
|
||||
QueryLayoutRecordId = settings.QueryLayoutRecordId
|
||||
};
|
||||
}
|
||||
else {
|
||||
model = new ProjectionPartEditViewModel {
|
||||
DisplayPager = part.Record.DisplayPager,
|
||||
Items = part.Record.Items,
|
||||
ItemsPerPage = part.Record.ItemsPerPage,
|
||||
Skip = part.Record.Skip,
|
||||
PagerSuffix = part.Record.PagerSuffix,
|
||||
MaxItems = part.Record.MaxItems,
|
||||
QueryLayoutRecordId = "-1"
|
||||
};
|
||||
// concatenated Query and Layout ids for the view
|
||||
if (part.Record.QueryPartRecord != null) {
|
||||
model.QueryLayoutRecordId = part.Record.QueryPartRecord.Id + ";";
|
||||
}
|
||||
|
||||
if (part.Record.LayoutRecord != null) {
|
||||
model.QueryLayoutRecordId += part.Record.LayoutRecord.Id.ToString();
|
||||
}
|
||||
else {
|
||||
model.QueryLayoutRecordId += "-1";
|
||||
}
|
||||
}
|
||||
if (part.Record.LayoutRecord != null) {
|
||||
model.QueryLayoutRecordId += part.Record.LayoutRecord.Id.ToString();
|
||||
}
|
||||
else {
|
||||
model.QueryLayoutRecordId += "-1";
|
||||
}
|
||||
}
|
||||
|
||||
model.PartId = part.Id;
|
||||
model.PartId = part.Id;
|
||||
|
||||
// lock fields
|
||||
model.LockEditingItems = settings.LockEditingItems;
|
||||
model.LockEditingSkip = settings.LockEditingSkip;
|
||||
model.LockEditingMaxItems = settings.LockEditingMaxItems;
|
||||
model.LockEditingPagerSuffix = settings.LockEditingPagerSuffix;
|
||||
model.LockEditingDisplayPager = settings.LockEditingDisplayPager;
|
||||
// lock fields
|
||||
model.LockEditingItems = settings.LockEditingItems;
|
||||
model.LockEditingSkip = settings.LockEditingSkip;
|
||||
model.LockEditingMaxItems = settings.LockEditingMaxItems;
|
||||
model.LockEditingPagerSuffix = settings.LockEditingPagerSuffix;
|
||||
model.LockEditingDisplayPager = settings.LockEditingDisplayPager;
|
||||
|
||||
// populating the list of queries and layouts
|
||||
var layouts = _projectionManager.DescribeLayouts().SelectMany(x => x.Descriptors).ToList();
|
||||
model.QueryRecordEntries = _orchardServices.ContentManager.Query<QueryPart, QueryPartRecord>().Join<TitlePartRecord>().OrderBy(x => x.Title).List()
|
||||
.Select(x => new QueryRecordEntry {
|
||||
Id = x.Id,
|
||||
Name = x.Name,
|
||||
LayoutRecordEntries = x.Layouts.Select(l => new LayoutRecordEntry {
|
||||
Id = l.Id,
|
||||
Description = GetLayoutDescription(layouts, l)
|
||||
})
|
||||
});
|
||||
// populating the list of queries and layouts
|
||||
var layouts = _projectionManager.DescribeLayouts().SelectMany(x => x.Descriptors).ToList();
|
||||
model.QueryRecordEntries = Services.ContentManager.Query<QueryPart, QueryPartRecord>().Join<TitlePartRecord>().OrderBy(x => x.Title).List()
|
||||
.Select(x => new QueryRecordEntry {
|
||||
Id = x.Id,
|
||||
Name = x.Name,
|
||||
LayoutRecordEntries = x.Layouts.Select(l => new LayoutRecordEntry {
|
||||
Id = l.Id,
|
||||
Description = GetLayoutDescription(layouts, l)
|
||||
})
|
||||
});
|
||||
|
||||
// if any values, use default list of the settings
|
||||
if (!string.IsNullOrWhiteSpace(settings.FilterQueryRecordId)) {
|
||||
var filterQueryRecordId = settings.FilterQueryRecordId.Split('&');
|
||||
model.QueryRecordIdFilterEntries = filterQueryRecordId
|
||||
.Select(x => new QueryRecordFilterEntry {
|
||||
Id = x.Split(';')[0],
|
||||
LayoutId = x.Split(';')[1]
|
||||
});
|
||||
}
|
||||
else {
|
||||
model.QueryRecordIdFilterEntries = new List<QueryRecordFilterEntry>();
|
||||
}
|
||||
// if any values, use default list of the settings
|
||||
if (!string.IsNullOrWhiteSpace(settings.FilterQueryRecordId)) {
|
||||
var filterQueryRecordId = settings.FilterQueryRecordId.Split('&');
|
||||
model.QueryRecordIdFilterEntries = filterQueryRecordId
|
||||
.Select(x => new QueryRecordFilterEntry {
|
||||
Id = x.Split(';')[0],
|
||||
LayoutId = x.Split(';')[1]
|
||||
});
|
||||
}
|
||||
else {
|
||||
model.QueryRecordIdFilterEntries = new List<QueryRecordFilterEntry>();
|
||||
}
|
||||
|
||||
return shapeHelper.EditorTemplate(TemplateName: TemplateName, Model: model, Prefix: Prefix);
|
||||
});
|
||||
return shapeHelper.EditorTemplate(TemplateName: TemplateName, Model: model, Prefix: Prefix);
|
||||
});
|
||||
}
|
||||
|
||||
private static string GetLayoutDescription(IEnumerable<LayoutDescriptor> layouts, LayoutRecord l) {
|
||||
@@ -312,7 +313,7 @@ namespace Orchard.Projections.Drivers {
|
||||
updater.TryUpdateModel(model, Prefix, null, null);
|
||||
|
||||
model.PartId = part.Id;
|
||||
|
||||
|
||||
// check the setting, if it is unlocked, assign the setting value
|
||||
if (settings.LockEditingDisplayPager) {
|
||||
part.Record.DisplayPager = settings.DisplayPager;
|
||||
@@ -355,12 +356,6 @@ namespace Orchard.Projections.Drivers {
|
||||
updater.AddModelError("PagerSuffix", T("Suffix should not contain special characters."));
|
||||
}
|
||||
|
||||
if (model.Items == 0
|
||||
&& (part.Record.QueryPartRecord?.FilterGroups.Any(group => group.Filters.Count == 0) ?? false)) {
|
||||
_orchardServices.Notifier.Warning(
|
||||
T("The selected Query has at least one empty filter group, which causes all content items to be returned. It is recommended to limit the number of content items queried by setting the 'Items to display' field to a non-zero value."));
|
||||
}
|
||||
|
||||
return Editor(part, shapeHelper);
|
||||
}
|
||||
|
||||
@@ -381,11 +376,12 @@ namespace Orchard.Projections.Drivers {
|
||||
protected override void ImportCompleted(ProjectionPart part, ImportContentContext context) {
|
||||
// Assign the query only when everything is imported.
|
||||
var query = context.Attribute(part.PartDefinition.Name, "Query");
|
||||
if (query != null && context.GetItemFromSession(query).As<QueryPart>() != null) {
|
||||
if (query != null && context.GetItemFromSession(query).As<QueryPart>()!=null) {
|
||||
part.Record.QueryPartRecord = context.GetItemFromSession(query).As<QueryPart>().Record;
|
||||
var layoutIndex = context.Attribute(part.PartDefinition.Name, "LayoutIndex");
|
||||
int layoutIndexValue;
|
||||
if (layoutIndex != null
|
||||
&& Int32.TryParse(layoutIndex, out int layoutIndexValue)
|
||||
&& Int32.TryParse(layoutIndex, out layoutIndexValue)
|
||||
&& layoutIndexValue >= 0
|
||||
&& part.Record.QueryPartRecord.Layouts.Count > layoutIndexValue) {
|
||||
part.Record.LayoutRecord = part.Record.QueryPartRecord.Layouts[Int32.Parse(layoutIndex)];
|
||||
@@ -402,9 +398,9 @@ namespace Orchard.Projections.Drivers {
|
||||
context.Element(part.PartDefinition.Name).SetAttributeValue("DisplayPager", part.Record.DisplayPager);
|
||||
|
||||
if (part.Record.QueryPartRecord != null) {
|
||||
var queryPart = _orchardServices.ContentManager.Query<QueryPart, QueryPartRecord>("Query").Where(x => x.Id == part.Record.QueryPartRecord.Id).List().FirstOrDefault();
|
||||
var queryPart = Services.ContentManager.Query<QueryPart, QueryPartRecord>("Query").Where(x => x.Id == part.Record.QueryPartRecord.Id).List().FirstOrDefault();
|
||||
if (queryPart != null) {
|
||||
var queryIdentity = _orchardServices.ContentManager.GetItemMetadata(queryPart).Identity;
|
||||
var queryIdentity = Services.ContentManager.GetItemMetadata(queryPart).Identity;
|
||||
context.Element(part.PartDefinition.Name).SetAttributeValue("Query", queryIdentity.ToString());
|
||||
context.Element(part.PartDefinition.Name).SetAttributeValue("LayoutIndex", part.Record.QueryPartRecord.Layouts.IndexOf(part.Record.LayoutRecord));
|
||||
}
|
||||
|
||||
@@ -19,16 +19,14 @@ namespace Orchard.Projections.Drivers {
|
||||
_projectionManager = projectionManager;
|
||||
_formManager = formManager;
|
||||
}
|
||||
|
||||
protected override string Prefix {
|
||||
get {
|
||||
return "Query_Part";
|
||||
}
|
||||
}
|
||||
|
||||
protected override DriverResult Editor(QueryPart part, dynamic shapeHelper) =>
|
||||
Editor(part, null, shapeHelper);
|
||||
|
||||
protected override DriverResult Editor(QueryPart part, dynamic shapeHelper) {
|
||||
return Editor(part, null, shapeHelper);
|
||||
}
|
||||
protected override DriverResult Editor(QueryPart part, IUpdateModel updater, dynamic shapeHelper) {
|
||||
var model = new QueryViewModel { VersionScope = part.VersionScope };
|
||||
if (updater != null) {
|
||||
@@ -36,10 +34,10 @@ namespace Orchard.Projections.Drivers {
|
||||
part.VersionScope = model.VersionScope;
|
||||
}
|
||||
}
|
||||
|
||||
return ContentShape("Parts_QueryPart_Edit", () => {
|
||||
return shapeHelper.EditorTemplate(TemplateName: "Parts/QueryPart_Edit", Model: model, Prefix: Prefix);
|
||||
});
|
||||
return ContentShape("Parts_QueryPart_Edit",
|
||||
() => {
|
||||
return shapeHelper.EditorTemplate(TemplateName: "Parts/QueryPart_Edit", Model: model, Prefix: Prefix);
|
||||
});
|
||||
}
|
||||
|
||||
protected override void Exporting(QueryPart part, ExportContentContext context) {
|
||||
@@ -62,12 +60,12 @@ namespace Orchard.Projections.Drivers {
|
||||
}
|
||||
|
||||
return new XElement("Filter",
|
||||
new XAttribute("Category", filter.Category ?? ""),
|
||||
new XAttribute("Description", filter.Description ?? ""),
|
||||
new XAttribute("Position", filter.Position),
|
||||
new XAttribute("State", state ?? ""),
|
||||
new XAttribute("Type", filter.Type ?? "")
|
||||
);
|
||||
new XAttribute("Category", filter.Category ?? ""),
|
||||
new XAttribute("Description", filter.Description ?? ""),
|
||||
new XAttribute("Position", filter.Position),
|
||||
new XAttribute("State", state ?? ""),
|
||||
new XAttribute("Type", filter.Type ?? "")
|
||||
);
|
||||
})
|
||||
)
|
||||
)
|
||||
|
||||
@@ -72,7 +72,17 @@ namespace Orchard.Projections {
|
||||
SchemaBuilder.CreateTable("FieldIndexPartRecord", table => table.ContentPartRecord());
|
||||
|
||||
//Adds indexes for better performances in queries
|
||||
AddPropertyNameAndFieldIndexPartRecordIdIndexes();
|
||||
SchemaBuilder.AlterTable("StringFieldIndexRecord", table => table.CreateIndex("IX_PropertyName", new string[] { "PropertyName" }));
|
||||
SchemaBuilder.AlterTable("StringFieldIndexRecord", table => table.CreateIndex("IX_FieldIndexPartRecord_Id", new string[] { "FieldIndexPartRecord_Id" }));
|
||||
|
||||
SchemaBuilder.AlterTable("IntegerFieldIndexRecord", table => table.CreateIndex("IX_PropertyName", new string[] { "PropertyName" }));
|
||||
SchemaBuilder.AlterTable("IntegerFieldIndexRecord", table => table.CreateIndex("IX_FieldIndexPartRecord_Id", new string[] { "FieldIndexPartRecord_Id" }));
|
||||
|
||||
SchemaBuilder.AlterTable("DoubleFieldIndexRecord", table => table.CreateIndex("IX_PropertyName", new string[] { "PropertyName" }));
|
||||
SchemaBuilder.AlterTable("DoubleFieldIndexRecord", table => table.CreateIndex("IX_FieldIndexPartRecord_Id", new string[] { "FieldIndexPartRecord_Id" }));
|
||||
|
||||
SchemaBuilder.AlterTable("DecimalFieldIndexRecord", table => table.CreateIndex("IX_PropertyName", new string[] { "PropertyName" }));
|
||||
SchemaBuilder.AlterTable("DecimalFieldIndexRecord", table => table.CreateIndex("IX_FieldIndexPartRecord_Id", new string[] { "FieldIndexPartRecord_Id" }));
|
||||
|
||||
// Query
|
||||
|
||||
@@ -277,7 +287,7 @@ namespace Orchard.Projections {
|
||||
Description = T("The text from the Body part").Text
|
||||
});
|
||||
|
||||
return 8;
|
||||
return 6;
|
||||
}
|
||||
|
||||
public int UpdateFrom1() {
|
||||
@@ -333,7 +343,17 @@ namespace Orchard.Projections {
|
||||
.AddColumn<decimal>("LatestValue"));
|
||||
|
||||
//Adds indexes for better performances in queries
|
||||
AddPropertyNameAndFieldIndexPartRecordIdIndexes();
|
||||
SchemaBuilder.AlterTable("StringFieldIndexRecord", table => table.CreateIndex("IX_PropertyName", new string[] { "PropertyName" }));
|
||||
SchemaBuilder.AlterTable("StringFieldIndexRecord", table => table.CreateIndex("IX_FieldIndexPartRecord_Id", new string[] { "FieldIndexPartRecord_Id" }));
|
||||
|
||||
SchemaBuilder.AlterTable("IntegerFieldIndexRecord", table => table.CreateIndex("IX_PropertyName", new string[] { "PropertyName" }));
|
||||
SchemaBuilder.AlterTable("IntegerFieldIndexRecord", table => table.CreateIndex("IX_FieldIndexPartRecord_Id", new string[] { "FieldIndexPartRecord_Id" }));
|
||||
|
||||
SchemaBuilder.AlterTable("DoubleFieldIndexRecord", table => table.CreateIndex("IX_PropertyName", new string[] { "PropertyName" }));
|
||||
SchemaBuilder.AlterTable("DoubleFieldIndexRecord", table => table.CreateIndex("IX_FieldIndexPartRecord_Id", new string[] { "FieldIndexPartRecord_Id" }));
|
||||
|
||||
SchemaBuilder.AlterTable("DecimalFieldIndexRecord", table => table.CreateIndex("IX_PropertyName", new string[] { "PropertyName" }));
|
||||
SchemaBuilder.AlterTable("DecimalFieldIndexRecord", table => table.CreateIndex("IX_FieldIndexPartRecord_Id", new string[] { "FieldIndexPartRecord_Id" }));
|
||||
|
||||
SchemaBuilder.AlterTable("QueryPartRecord", table => table
|
||||
.AddColumn<string>("VersionScope", c => c.WithLength(15)));
|
||||
@@ -366,47 +386,5 @@ namespace Orchard.Projections {
|
||||
|
||||
return 7;
|
||||
}
|
||||
|
||||
public int UpdateFrom7() {
|
||||
SchemaBuilder.AlterTable("StringFieldIndexRecord", table => {
|
||||
table.DropIndex("IX_PropertyName");
|
||||
table.DropIndex("IX_FieldIndexPartRecord_Id");
|
||||
});
|
||||
SchemaBuilder.AlterTable("IntegerFieldIndexRecord", table => {
|
||||
table.DropIndex("IX_PropertyName");
|
||||
table.DropIndex("IX_FieldIndexPartRecord_Id");
|
||||
});
|
||||
SchemaBuilder.AlterTable("DoubleFieldIndexRecord", table => {
|
||||
table.DropIndex("IX_PropertyName");
|
||||
table.DropIndex("IX_FieldIndexPartRecord_Id");
|
||||
});
|
||||
SchemaBuilder.AlterTable("DecimalFieldIndexRecord", table => {
|
||||
table.DropIndex("IX_PropertyName");
|
||||
table.DropIndex("IX_FieldIndexPartRecord_Id");
|
||||
});
|
||||
|
||||
AddPropertyNameAndFieldIndexPartRecordIdIndexes();
|
||||
|
||||
return 8;
|
||||
}
|
||||
|
||||
private void AddPropertyNameAndFieldIndexPartRecordIdIndexes() {
|
||||
SchemaBuilder.AlterTable("StringFieldIndexRecord", table => {
|
||||
table.CreateIndex("IDX_StringFieldIndexRecord_PropertyName", "PropertyName");
|
||||
table.CreateIndex("IDX_StringFieldIndexRecord_FieldIndexPartRecord_Id", "FieldIndexPartRecord_Id");
|
||||
});
|
||||
SchemaBuilder.AlterTable("IntegerFieldIndexRecord", table => {
|
||||
table.CreateIndex("IDX_IntegerFieldIndexRecord_PropertyName", "PropertyName");
|
||||
table.CreateIndex("IDX_IntegerFieldIndexRecord_FieldIndexPartRecord_Id", "FieldIndexPartRecord_Id");
|
||||
});
|
||||
SchemaBuilder.AlterTable("DoubleFieldIndexRecord", table => {
|
||||
table.CreateIndex("IDX_DoubleFieldIndexRecord_PropertyName", "PropertyName");
|
||||
table.CreateIndex("IDX_DoubleFieldIndexRecord_FieldIndexPartRecord_Id", "FieldIndexPartRecord_Id");
|
||||
});
|
||||
SchemaBuilder.AlterTable("DecimalFieldIndexRecord", table => {
|
||||
table.CreateIndex("IDX_DecimalFieldIndexRecord_PropertyName", "PropertyName");
|
||||
table.CreateIndex("IDX_DecimalFieldIndexRecord_FieldIndexPartRecord_Id", "FieldIndexPartRecord_Id");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -108,15 +108,19 @@ namespace Orchard.Projections.Services {
|
||||
}
|
||||
|
||||
public int GetCount(int queryId, ContentPart part) {
|
||||
var queryRecord = _queryRepository.Get(queryId) ?? throw new ArgumentException("queryId");
|
||||
var queryRecord = _queryRepository.Get(queryId);
|
||||
|
||||
// Prepare tokens.
|
||||
if (queryRecord == null) {
|
||||
throw new ArgumentException("queryId");
|
||||
}
|
||||
|
||||
// prepares tokens
|
||||
Dictionary<string, object> tokens = new Dictionary<string, object>();
|
||||
if (part != null) {
|
||||
tokens.Add("Content", part.ContentItem);
|
||||
}
|
||||
|
||||
// Aggregate the result of each filter group.
|
||||
// aggregate the result for each group query
|
||||
return GetContentQueries(queryRecord, Enumerable.Empty<SortCriterionRecord>(), tokens)
|
||||
.Sum(contentQuery => contentQuery.Count());
|
||||
}
|
||||
@@ -136,13 +140,13 @@ namespace Orchard.Projections.Services {
|
||||
|
||||
var contentItems = new List<ContentItem>();
|
||||
|
||||
// Prepare tokens.
|
||||
// prepares tokens
|
||||
Dictionary<string, object> tokens = new Dictionary<string, object>();
|
||||
if (part != null) {
|
||||
tokens.Add("Content", part.ContentItem);
|
||||
}
|
||||
|
||||
// Aggregate the result of each filter group.
|
||||
// aggregate the result for each group query
|
||||
foreach (var contentQuery in GetContentQueries(queryRecord, queryRecord.SortCriteria.OrderBy(sc => sc.Position), tokens)) {
|
||||
contentItems.AddRange(contentQuery.Slice(skip, count));
|
||||
}
|
||||
@@ -151,7 +155,7 @@ namespace Orchard.Projections.Services {
|
||||
return contentItems;
|
||||
}
|
||||
|
||||
// Re-executing the sorting on the aggregated results.
|
||||
// re-executing the sorting with the cumulated groups
|
||||
var ids = contentItems.Select(c => c.Id).ToArray();
|
||||
|
||||
if (ids.Length == 0) {
|
||||
@@ -160,7 +164,7 @@ namespace Orchard.Projections.Services {
|
||||
|
||||
var groupQuery = _contentManager.HqlQuery().Where(alias => alias.Named("ci"), x => x.InG("Id", ids));
|
||||
|
||||
// Iterate over each sort criteria to apply the alterations to the query object.
|
||||
// iterate over each sort criteria to apply the alterations to the query object
|
||||
foreach (var sortCriterion in queryRecord.SortCriteria.OrderBy(s => s.Position)) {
|
||||
var tokenizedState = _tokenizer.Replace(sortCriterion.State, tokens);
|
||||
var sortCriterionContext = new SortCriterionContext {
|
||||
@@ -173,17 +177,15 @@ namespace Orchard.Projections.Services {
|
||||
string category = sortCriterion.Category;
|
||||
string type = sortCriterion.Type;
|
||||
|
||||
// Find specific sort criterion.
|
||||
var descriptor = availableSortCriteria
|
||||
.SelectMany(x => x.Descriptors)
|
||||
.FirstOrDefault(x => x.Category == category && x.Type == type);
|
||||
// look for the specific filter component
|
||||
var descriptor = availableSortCriteria.SelectMany(x => x.Descriptors).FirstOrDefault(x => x.Category == category && x.Type == type);
|
||||
|
||||
// Skip if not found.
|
||||
// ignore unfound descriptors
|
||||
if (descriptor == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Apply alteration.
|
||||
// apply alteration
|
||||
descriptor.Sort(sortCriterionContext);
|
||||
|
||||
groupQuery = sortCriterionContext.Query;
|
||||
@@ -192,10 +194,7 @@ namespace Orchard.Projections.Services {
|
||||
return groupQuery.Slice(skip, count);
|
||||
}
|
||||
|
||||
public IEnumerable<IHqlQuery> GetContentQueries(
|
||||
QueryPartRecord queryRecord,
|
||||
IEnumerable<SortCriterionRecord> sortCriteria,
|
||||
Dictionary<string, object> tokens) {
|
||||
public IEnumerable<IHqlQuery> GetContentQueries(QueryPartRecord queryRecord, IEnumerable<SortCriterionRecord> sortCriteria, Dictionary<string, object> tokens) {
|
||||
|
||||
var availableFilters = DescribeFilters().ToList();
|
||||
var availableSortCriteria = DescribeSortCriteria().ToList();
|
||||
@@ -205,11 +204,11 @@ namespace Orchard.Projections.Services {
|
||||
|
||||
var version = queryRecord.VersionScope.ToVersionOptions();
|
||||
|
||||
// Iterate over each filter group and evaluate the filters.
|
||||
// pre-executing all groups
|
||||
foreach (var group in queryRecord.FilterGroups) {
|
||||
var contentQuery = _contentManager.HqlQuery().ForVersion(version);
|
||||
|
||||
// Iterate over each filter to apply the alterations to the query object.
|
||||
// iterate over each filter to apply the alterations to the query object
|
||||
foreach (var filter in group.Filters) {
|
||||
var tokenizedState = _tokenizer.Replace(filter.State, tokens);
|
||||
var filterContext = new FilterContext {
|
||||
@@ -222,23 +221,23 @@ namespace Orchard.Projections.Services {
|
||||
string category = filter.Category;
|
||||
string type = filter.Type;
|
||||
|
||||
// Find specific filter.
|
||||
// look for the specific filter component
|
||||
var descriptor = availableFilters
|
||||
.SelectMany(x => x.Descriptors)
|
||||
.FirstOrDefault(x => x.Category == category && x.Type == type);
|
||||
|
||||
// Skip if not found.
|
||||
// ignore unfound descriptors
|
||||
if (descriptor == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Apply alteration.
|
||||
// apply alteration
|
||||
descriptor.Filter(filterContext);
|
||||
|
||||
contentQuery = filterContext.Query;
|
||||
}
|
||||
|
||||
// Iterate over each sort criteria to apply the alterations to the query object.
|
||||
// iterate over each sort criteria to apply the alterations to the query object
|
||||
foreach (var sortCriterion in sortCriteria.OrderBy(s => s.Position)) {
|
||||
var tokenizedState = _tokenizer.Replace(sortCriterion.State, tokens);
|
||||
var sortCriterionContext = new SortCriterionContext {
|
||||
@@ -251,22 +250,23 @@ namespace Orchard.Projections.Services {
|
||||
string category = sortCriterion.Category;
|
||||
string type = sortCriterion.Type;
|
||||
|
||||
// Find specific sort criterion.
|
||||
// look for the specific filter component
|
||||
var descriptor = availableSortCriteria
|
||||
.SelectMany(x => x.Descriptors)
|
||||
.FirstOrDefault(x => x.Category == category && x.Type == type);
|
||||
|
||||
// Skip if not found.
|
||||
// ignore unfound descriptors
|
||||
if (descriptor == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Apply alteration.
|
||||
// apply alteration
|
||||
descriptor.Sort(sortCriterionContext);
|
||||
|
||||
contentQuery = sortCriterionContext.Query;
|
||||
}
|
||||
|
||||
|
||||
yield return contentQuery;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -53,8 +53,8 @@
|
||||
<HintPath>..\..\..\packages\Iesi.Collections.4.0.1.4000\lib\net40\Iesi.Collections.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate, Version=4.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\NHibernate.4.1.2.4000\lib\net40\NHibernate.dll</HintPath>
|
||||
@@ -161,4 +161,4 @@
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Iesi.Collections" version="4.0.1.4000" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net48" />
|
||||
<package id="NHibernate" version="4.1.2.4000" targetFramework="net48" />
|
||||
<package id="StackExchange.Redis" version="1.0.481" targetFramework="net48" />
|
||||
</packages>
|
||||
</packages>
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user