mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Compare commits
252 Commits
feature/re
...
1.9.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0d5cff66a9 | ||
|
|
ec0ea5e321 | ||
|
|
dd9d67fe48 | ||
|
|
9105187f78 | ||
|
|
52c6debc97 | ||
|
|
f3be4fa2c7 | ||
|
|
d64541d47a | ||
|
|
9714c2c5f0 | ||
|
|
855d183be3 | ||
|
|
a37e548b25 | ||
|
|
99695f07cc | ||
|
|
63ca6ee2d8 | ||
|
|
042c47cc3f | ||
|
|
49ab41d4dc | ||
|
|
9c88c7fcd1 | ||
|
|
62136eb59f | ||
|
|
8ed39703e5 | ||
|
|
a3ded18eb6 | ||
|
|
5b0efdba58 | ||
|
|
8865041a8b | ||
|
|
d9e833ba58 | ||
|
|
9137414305 | ||
|
|
eb9bfa0d29 | ||
|
|
1724be5c72 | ||
|
|
7a289ca1ad | ||
|
|
b7a0b007e4 | ||
|
|
f2fb1d520d | ||
|
|
248cc7ecde | ||
|
|
bb41f1f559 | ||
|
|
5903f75665 | ||
|
|
46182edc5d | ||
|
|
accd4196dc | ||
|
|
d3d85f3519 | ||
|
|
6e90f704f8 | ||
|
|
497b782a6a | ||
|
|
bc935f18b3 | ||
|
|
12a51ea7af | ||
|
|
f0b1639143 | ||
|
|
9bb95efaaa | ||
|
|
e6c042d1a0 | ||
|
|
df583ea571 | ||
|
|
adbab55ffc | ||
|
|
20fbd99658 | ||
|
|
d9a0e040c1 | ||
|
|
4aaf4d34d0 | ||
|
|
7143792c0e | ||
|
|
4214329a1f | ||
|
|
921b2472f1 | ||
|
|
9e9e19c439 | ||
|
|
f3595881fe | ||
|
|
ba36eae848 | ||
|
|
0bf76dc7ac | ||
|
|
66ff5d36e9 | ||
|
|
749ff5dc72 | ||
|
|
85c4a99c13 | ||
|
|
a3fe3592c6 | ||
|
|
a2c31a1e5c | ||
|
|
3f6dfa3dec | ||
|
|
f9ef297777 | ||
|
|
801b8998db | ||
|
|
92b7ad7554 | ||
|
|
18bb847488 | ||
|
|
47133604c3 | ||
|
|
80b93e412a | ||
|
|
e839f84537 | ||
|
|
a548e47f90 | ||
|
|
89e8658f49 | ||
|
|
6d255f24ab | ||
|
|
e8f0ba6ec7 | ||
|
|
60798f9346 | ||
|
|
c83f5d88cb | ||
|
|
2f2134412e | ||
|
|
1e6b6bb24f | ||
|
|
16de29dabd | ||
|
|
691809cd85 | ||
|
|
ce1df8d794 | ||
|
|
74be36d8a3 | ||
|
|
2bb7eb2f91 | ||
|
|
c4592aa65f | ||
|
|
9bac35b3f1 | ||
|
|
2a0f866f26 | ||
|
|
371238a882 | ||
|
|
67e7d1074e | ||
|
|
25c34d8bca | ||
|
|
75f3a618f0 | ||
|
|
9947f3973e | ||
|
|
a685517118 | ||
|
|
14482162fd | ||
|
|
0f757655b8 | ||
|
|
39fb266221 | ||
|
|
9b91b1b260 | ||
|
|
c2194381f8 | ||
|
|
c860b89e23 | ||
|
|
04f29ba70c | ||
|
|
e118695ea7 | ||
|
|
894e90f485 | ||
|
|
97bb52bbdd | ||
|
|
f3d08d61c4 | ||
|
|
22697edeec | ||
|
|
e0fc576f9e | ||
|
|
ef9e5de8f4 | ||
|
|
5878611817 | ||
|
|
f5772334e1 | ||
|
|
fcc4a944bb | ||
|
|
a0d61c67b8 | ||
|
|
42ff708da8 | ||
|
|
b52a846c5f | ||
|
|
9a8b64393e | ||
|
|
bd1f14eeb0 | ||
|
|
4b59569013 | ||
|
|
a603c7e07a | ||
|
|
96f6cb36fd | ||
|
|
3d63c6d333 | ||
|
|
4cdb081c9d | ||
|
|
9ed6b4261d | ||
|
|
a0e78f2eb0 | ||
|
|
af4e41a717 | ||
|
|
7f91e787de | ||
|
|
6810cf473f | ||
|
|
79a0ae86e8 | ||
|
|
4cec35daf8 | ||
|
|
8d4cb98d59 | ||
|
|
e6424e2589 | ||
|
|
dcc7783f12 | ||
|
|
d35ebe04e7 | ||
|
|
c80f2d4baa | ||
|
|
9a4e0c1741 | ||
|
|
47d3d2b738 | ||
|
|
e0e600a6ce | ||
|
|
21875b98cc | ||
|
|
28a1b4d663 | ||
|
|
bbcdd67b95 | ||
|
|
cfc1dc2379 | ||
|
|
9e95f96195 | ||
|
|
770704f3a7 | ||
|
|
d9a3db1ebf | ||
|
|
9980633ac3 | ||
|
|
5b42c707b1 | ||
|
|
83a35f89cf | ||
|
|
746d3d54c2 | ||
|
|
f19b57c1e6 | ||
|
|
7533cd8879 | ||
|
|
75609bf2ce | ||
|
|
4b44827f2a | ||
|
|
a04195ee0e | ||
|
|
b2c131f516 | ||
|
|
359d25c1f2 | ||
|
|
6552735df3 | ||
|
|
59b3d50e03 | ||
|
|
f2bf75328e | ||
|
|
0213524317 | ||
|
|
fd931397a4 | ||
|
|
64585223ee | ||
|
|
564fdc27be | ||
|
|
06e4d2f7f8 | ||
|
|
cc70480126 | ||
|
|
7bcb6b83fb | ||
|
|
e72471f020 | ||
|
|
de74c00378 | ||
|
|
b206a656e8 | ||
|
|
32669d347a | ||
|
|
5bdfb6e98a | ||
|
|
85fd5c8320 | ||
|
|
41bd9ce9bc | ||
|
|
e346170f24 | ||
|
|
b399925368 | ||
|
|
ecbd485fd8 | ||
|
|
0fcf8c7409 | ||
|
|
430c3de460 | ||
|
|
a6f5e4fb01 | ||
|
|
ff1fe79016 | ||
|
|
8e9f6ce8bd | ||
|
|
47e0b96725 | ||
|
|
f25758cc05 | ||
|
|
bb6a44634d | ||
|
|
3657cfecab | ||
|
|
8a08680a74 | ||
|
|
25670b9620 | ||
|
|
fa09e2e83a | ||
|
|
a9a1413331 | ||
|
|
637cea6a02 | ||
|
|
cc82bfcca0 | ||
|
|
faa216147d | ||
|
|
cbf10216b0 | ||
|
|
bb560f9cdf | ||
|
|
bc2e0607ef | ||
|
|
cd5ca49b32 | ||
|
|
6da6c5c214 | ||
|
|
37a5a7effc | ||
|
|
baad84ee7b | ||
|
|
8a8b0f91c6 | ||
|
|
93476c321a | ||
|
|
ea91185816 | ||
|
|
879e35dcc0 | ||
|
|
e8111cef5e | ||
|
|
c0ebbd4ce7 | ||
|
|
818b35a370 | ||
|
|
34947136d4 | ||
|
|
894d932210 | ||
|
|
8032d202e3 | ||
|
|
046c62e710 | ||
|
|
9001972d8b | ||
|
|
0fc8f5accf | ||
|
|
2a34cb582b | ||
|
|
7411013b45 | ||
|
|
0e7f864d4d | ||
|
|
14cdf57bc5 | ||
|
|
41e9fda2de | ||
|
|
e6211dbf54 | ||
|
|
1664aa1bde | ||
|
|
1b54e3e8fb | ||
|
|
5d09053d30 | ||
|
|
1494aec836 | ||
|
|
a0f42632e0 | ||
|
|
28643ae7b8 | ||
|
|
70ea2df334 | ||
|
|
e964d80f7e | ||
|
|
1e62b2b9f8 | ||
|
|
1732c333c2 | ||
|
|
a01d219607 | ||
|
|
36910e8659 | ||
|
|
230314d7a1 | ||
|
|
7282df4326 | ||
|
|
81034f43d2 | ||
|
|
30a95ed773 | ||
|
|
ddaf49db4a | ||
|
|
3d3d6205b6 | ||
|
|
e72d226263 | ||
|
|
4da838a3c3 | ||
|
|
d63119b1e6 | ||
|
|
6bc98bede6 | ||
|
|
99e05c8a09 | ||
|
|
3e1087ff58 | ||
|
|
43315c349f | ||
|
|
e74b6ad6f8 | ||
|
|
6fe3cf8538 | ||
|
|
db6c25aba2 | ||
|
|
938fd5b827 | ||
|
|
b100634587 | ||
|
|
a071f21f4e | ||
|
|
eed1a9a063 | ||
|
|
0faaa22546 | ||
|
|
0f6fa5844b | ||
|
|
d805c7773d | ||
|
|
18c5b5dfff | ||
|
|
b76306dfb3 | ||
|
|
7bbad86eb4 | ||
|
|
0f48019321 | ||
|
|
51a364a184 | ||
|
|
24ee246a34 | ||
|
|
9966e13fa3 | ||
|
|
29042d10f2 |
3
.deployment
Normal file
3
.deployment
Normal file
@@ -0,0 +1,3 @@
|
||||
[config]
|
||||
command = deploy.cmd
|
||||
SCM_COMMAND_IDLE_TIMEOUT = 3600
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -172,6 +172,7 @@ profiling/
|
||||
src/Orchard.Web/Modules-temp/*
|
||||
src/Backup/*
|
||||
src/packages/*
|
||||
src/node_modules
|
||||
src/UpgradeLog.*
|
||||
*.itrace.csdef
|
||||
*.build.csdef
|
||||
@@ -183,9 +184,6 @@ src/Orchard.Web/Orchard.Web.Publish.xml
|
||||
src/TestResults/*
|
||||
src/Orchard.Web/Properties/PublishProfiles
|
||||
src/Orchard.Azure/Orchard.Azure.CloudService/Staging/
|
||||
src/Orchard.Web/Modules/Orchard.Azure.MediaServices/node_modules
|
||||
src/Orchard.Web/Modules/Orchard.Layouts/node_modules
|
||||
src/Orchard.Web/Modules/Orchard.DynamicForms/node_modules
|
||||
|
||||
#enable all /lib artifacts
|
||||
!lib/*/*.*
|
||||
|
||||
13
Orchard.proj
13
Orchard.proj
@@ -27,6 +27,7 @@
|
||||
|
||||
<BuildPlatform Condition="$(ProgramW6432) != ''">x64</BuildPlatform>
|
||||
<BuildPlatform Condition="$(BuildPlatform) == ''">x86</BuildPlatform>
|
||||
<Configuration Condition="$(Configuration) == ''">Release</Configuration>
|
||||
|
||||
<!-- TeamCity build number -->
|
||||
<Version>$(BUILD_NUMBER)</Version>
|
||||
@@ -115,7 +116,7 @@
|
||||
<MSBuild
|
||||
Projects="$(SrcFolder)\Orchard.sln"
|
||||
Targets="Build"
|
||||
Properties="Configuration=Release;OutputPath=$(CompileFolder)" />
|
||||
Properties="Configuration=$(Configuration);OutputPath=$(CompileFolder)" />
|
||||
<!-- Compile to "regular" output folder for devs using VS locally -->
|
||||
<MSBuild
|
||||
Projects="$(SrcFolder)\Orchard.sln"
|
||||
@@ -126,7 +127,7 @@
|
||||
<MSBuild
|
||||
Projects="$(SrcFolder)\Tools\MSBuild.Orchard.Tasks\MSBuild.Orchard.Tasks.csproj"
|
||||
Targets="Build"
|
||||
Properties="Configuration=Release;OutputPath=$(MsBuildTasksFolder)" />
|
||||
Properties="Configuration=$(Configuration);OutputPath=$(MsBuildTasksFolder)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="TypeScript" DependsOnTargets="CompileMsBuildTasks">
|
||||
@@ -155,7 +156,7 @@
|
||||
<Output TaskParameter="Include" ItemName="TestAssemblies" />
|
||||
</CreateItem>
|
||||
|
||||
<NUnit Assemblies="@(TestAssemblies)" ToolPath="$(LibFolder)\nunit" WorkingDirectory="$(CompileFolder)" OutputXmlFile="$(BuildFolder)\Orchard.Tests.xml" />
|
||||
<NUnit Assemblies="@(TestAssemblies)" ToolPath="$(LibFolder)\nunit" WorkingDirectory="$(CompileFolder)" OutputXmlFile="$(BuildFolder)\Orchard.Tests.xml" ExcludeCategory="longrunning" />
|
||||
</Target>
|
||||
|
||||
<Target Name ="Spec" DependsOnTargets="Package-Stage">
|
||||
@@ -273,19 +274,19 @@
|
||||
<!-- extra processing of the staged config files -->
|
||||
<TransformXml
|
||||
Source="$(StageFolder)\Web.Config"
|
||||
Transform="$(SrcFolder)\Orchard.Web\Web.Release.Config"
|
||||
Transform="$(SrcFolder)\Orchard.Web\Web.$(Configuration).Config"
|
||||
Destination="$(StageFolder)\Web.Config"
|
||||
/>
|
||||
|
||||
<TransformXml
|
||||
Source="$(StageFolder)\Config\HostComponents.Config"
|
||||
Transform="$(SrcFolder)\Orchard.Web\Config\HostComponents.Release.Config"
|
||||
Transform="$(SrcFolder)\Orchard.Web\Config\HostComponents.$(Configuration).Config"
|
||||
Destination="$(StageFolder)\Config\HostComponents.Config"
|
||||
/>
|
||||
|
||||
<TransformXml
|
||||
Source="$(StageFolder)\Config\log4net.Config"
|
||||
Transform="$(SrcFolder)\Orchard.Web\Config\log4net.Release.Config"
|
||||
Transform="$(SrcFolder)\Orchard.Web\Config\log4net.$(Configuration).Config"
|
||||
Destination="$(StageFolder)\Config\log4net.Config"
|
||||
/>
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@ Our mission is to empower our users and foster a dedicated and diverse community
|
||||
There are many ways you can [contribute to Orchard](http://orchardproject.net/contribution): you can [fix bugs](https://github.com/OrchardCMS/Orchard/issues), contribute modules and themes to [our gallery](http://gallery.orchardproject.net/), [write documentation](https://github.com/OrchardCMS/OrchardDoc), [translate Orchard](http://orchardproject.net/localize), or answer questions [on our forums](http://orchard.codeplex.com/discussions) and [on Stack Overflow](http://stackoverflow.com/questions/tagged/orchardcms).
|
||||
|
||||
## Project Status
|
||||
Orchard is currently in version 1.8.1. We invite participation by the developer community in shaping the project’s direction, so that we can publicly validate our designs and development approach.
|
||||
Our 1.8.1 release is available from our Downloads page, and is easy to [Install Orchard using the Web Platform Installer](http://www.orchardproject.net/docs/Installing-Orchard.ashx). We encourage interested developers to check out the source code on the Orchard Github site and get involved with the project.
|
||||
Orchard is currently in version 1.9.1. We invite participation by the developer community in shaping the project’s direction, so that we can publicly validate our designs and development approach.
|
||||
Our 1.9.1 release is available from our Downloads page, and is easy to [Install Orchard using the Web Platform Installer](http://www.orchardproject.net/docs/Installing-Orchard.ashx). 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](http://www.orchardproject.net/docs/feature-roadmap.ashx)
|
||||
|
||||
114
deploy.cmd
Normal file
114
deploy.cmd
Normal file
@@ -0,0 +1,114 @@
|
||||
@if "%SCM_TRACE_LEVEL%" NEQ "4" @echo off
|
||||
|
||||
:: ----------------------
|
||||
:: KUDU Deployment Script
|
||||
:: Version: 0.1.11
|
||||
:: ----------------------
|
||||
|
||||
:: Prerequisites
|
||||
:: -------------
|
||||
|
||||
:: Verify node.js installed
|
||||
where node 2>nul >nul
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
echo Missing node.js executable, please install node.js, if already installed make sure it can be reached from current environment.
|
||||
goto error
|
||||
)
|
||||
|
||||
:: Setup
|
||||
:: -----
|
||||
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
SET ARTIFACTS=%~dp0%..\artifacts
|
||||
|
||||
IF NOT DEFINED DEPLOYMENT_SOURCE (
|
||||
SET DEPLOYMENT_SOURCE=%~dp0%.
|
||||
)
|
||||
|
||||
IF NOT DEFINED DEPLOYMENT_TARGET (
|
||||
SET DEPLOYMENT_TARGET=%ARTIFACTS%\wwwroot
|
||||
)
|
||||
|
||||
IF NOT DEFINED NEXT_MANIFEST_PATH (
|
||||
SET NEXT_MANIFEST_PATH=%ARTIFACTS%\manifest
|
||||
|
||||
IF NOT DEFINED PREVIOUS_MANIFEST_PATH (
|
||||
SET PREVIOUS_MANIFEST_PATH=%ARTIFACTS%\manifest
|
||||
)
|
||||
)
|
||||
|
||||
IF NOT DEFINED KUDU_SYNC_CMD (
|
||||
:: Install kudu sync
|
||||
echo Installing Kudu Sync
|
||||
call npm install kudusync -g --silent
|
||||
IF !ERRORLEVEL! NEQ 0 goto error
|
||||
|
||||
:: Locally just running "kuduSync" would also work
|
||||
SET KUDU_SYNC_CMD=%appdata%\npm\kuduSync.cmd
|
||||
)
|
||||
IF NOT DEFINED DEPLOYMENT_TEMP (
|
||||
SET DEPLOYMENT_TEMP=%temp%\___deployTemp%random%
|
||||
SET CLEAN_LOCAL_DEPLOYMENT_TEMP=true
|
||||
)
|
||||
|
||||
IF DEFINED CLEAN_LOCAL_DEPLOYMENT_TEMP (
|
||||
IF EXIST "%DEPLOYMENT_TEMP%" rd /s /q "%DEPLOYMENT_TEMP%"
|
||||
mkdir "%DEPLOYMENT_TEMP%"
|
||||
)
|
||||
|
||||
IF NOT DEFINED MSBUILD_PATH (
|
||||
SET MSBUILD_PATH=%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
|
||||
)
|
||||
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
:: Deployment
|
||||
:: ----------
|
||||
|
||||
echo Handling .NET Web Application deployment.
|
||||
|
||||
:: 1. Restore NuGet packages
|
||||
IF /I "" NEQ "" (
|
||||
call :ExecuteCmd nuget restore "%DEPLOYMENT_SOURCE%\"
|
||||
IF !ERRORLEVEL! NEQ 0 goto error
|
||||
)
|
||||
|
||||
:: 2. Build to the temporary path
|
||||
call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\Orchard.proj" /t:Precompiled /v:m
|
||||
IF !ERRORLEVEL! NEQ 0 goto error
|
||||
|
||||
:: 3. KuduSync
|
||||
call :ExecuteCmd "%KUDU_SYNC_CMD%" -v 50 -f "%DEPLOYMENT_SOURCE%\build\Precompiled" -t "%DEPLOYMENT_TARGET%" -n "%NEXT_MANIFEST_PATH%" -p "%PREVIOUS_MANIFEST_PATH%" -i ".git;.hg;.deployment;deploy.cmd"
|
||||
IF !ERRORLEVEL! NEQ 0 goto error
|
||||
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
|
||||
:: Post deployment stub
|
||||
IF DEFINED POST_DEPLOYMENT_ACTION call "%POST_DEPLOYMENT_ACTION%"
|
||||
IF !ERRORLEVEL! NEQ 0 goto error
|
||||
|
||||
goto end
|
||||
|
||||
:: Execute command routine that will echo out when error
|
||||
:ExecuteCmd
|
||||
setlocal
|
||||
set _CMD_=%*
|
||||
call %_CMD_%
|
||||
if "%ERRORLEVEL%" NEQ "0" echo Failed exitCode=%ERRORLEVEL%, command=%_CMD_%
|
||||
exit /b %ERRORLEVEL%
|
||||
|
||||
:error
|
||||
endlocal
|
||||
echo An error has occurred during web site deployment.
|
||||
call :exitSetErrorLevel
|
||||
call :exitFromFunction 2>nul
|
||||
|
||||
:exitSetErrorLevel
|
||||
exit /b 1
|
||||
|
||||
:exitFromFunction
|
||||
()
|
||||
|
||||
:end
|
||||
endlocal
|
||||
echo Finished successfully.
|
||||
9
lib/msdeploy/createlogin.sql
Normal file
9
lib/msdeploy/createlogin.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
/**********************************************************************/
|
||||
/* Install.SQL */
|
||||
/* Creates a login and makes the user a member of db roles */
|
||||
/* */
|
||||
/* Modifications for SQL AZURE - ON MASTER */
|
||||
/**********************************************************************/
|
||||
|
||||
|
||||
CREATE LOGIN PlaceHolderForUser WITH PASSWORD = 'PlaceHolderForPassword'
|
||||
15
lib/msdeploy/createuser.sql
Normal file
15
lib/msdeploy/createuser.sql
Normal file
@@ -0,0 +1,15 @@
|
||||
/**********************************************************************/
|
||||
/* CreateUser.SQL */
|
||||
/* Creates a user and makes the user a member of db roles */
|
||||
/* This script runs against the User database and requires connection string */
|
||||
/* Supports SQL Server and SQL AZURE */
|
||||
/**********************************************************************/
|
||||
|
||||
-- Create database user and map to login
|
||||
-- and add user to the datareader, datawriter, ddladmin and securityadmin roles
|
||||
--
|
||||
|
||||
CREATE USER PlaceHolderForUser FOR LOGIN PlaceHolderForUser;
|
||||
GO
|
||||
EXEC sp_addrolemember 'db_owner', PlaceHolderForUser;
|
||||
GO
|
||||
@@ -1,45 +0,0 @@
|
||||
/**********************************************************************/
|
||||
/* Install.SQL */
|
||||
/* Creates a login and makes the user a member of db roles */
|
||||
/* */
|
||||
/**********************************************************************/
|
||||
|
||||
-- Declare variables for database name, username and password
|
||||
DECLARE @dbName sysname,
|
||||
@dbUser sysname,
|
||||
@dbPwd nvarchar(max);
|
||||
|
||||
-- Set variables for database name, username and password
|
||||
SET @dbName = 'PlaceHolderForDb';
|
||||
SET @dbUser = 'PlaceHolderForUser';
|
||||
SET @dbPwd = 'PlaceHolderForPassword';
|
||||
|
||||
DECLARE @cmd nvarchar(max)
|
||||
|
||||
-- Create login
|
||||
IF( SUSER_SID(@dbUser) is null )
|
||||
BEGIN
|
||||
print '-- Creating login '
|
||||
SET @cmd = N'CREATE LOGIN ' + quotename(@dbUser) + N' WITH PASSWORD ='''+ replace(@dbPwd, '''', '''''') + N''''
|
||||
EXEC(@cmd)
|
||||
END
|
||||
|
||||
-- Create database user and map to login
|
||||
-- and add user to the datareader, datawriter, ddladmin and securityadmin roles
|
||||
--
|
||||
SET @cmd = N'USE ' + quotename(@DBName) + N';
|
||||
IF( NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = ''' + replace(@dbUser, '''', '''''') + N'''))
|
||||
BEGIN
|
||||
print ''-- Creating user'';
|
||||
CREATE USER ' + quotename(@dbUser) + N' FOR LOGIN ' + quotename(@dbUser) + N';
|
||||
print ''-- Adding user'';
|
||||
EXEC sp_addrolemember ''db_ddladmin'', ''' + replace(@dbUser, '''', '''''') + N''';
|
||||
print ''-- Adding user'';
|
||||
EXEC sp_addrolemember ''db_securityadmin'', ''' + replace(@dbUser, '''', '''''') + N''';
|
||||
print ''-- Adding user'';
|
||||
EXEC sp_addrolemember ''db_datareader'', ''' + replace(@dbUser, '''', '''''') + N''';
|
||||
print ''-- Adding user'';
|
||||
EXEC sp_addrolemember ''db_datawriter'', ''' + replace(@dbUser, '''', '''''') + N''';
|
||||
END'
|
||||
EXEC(@cmd)
|
||||
GO
|
||||
@@ -1,7 +1,13 @@
|
||||
<MSDeploy.iisApp>
|
||||
<iisapp path="Orchard" managedRuntimeVersion="v4.0" />
|
||||
<iisapp path="Orchard" managedRuntimeVersion="v4.0" />
|
||||
<setAcl path="Orchard/App_Data" setAclAccess="Modify" />
|
||||
<setAcl path="Orchard/Media" setAclAccess="Modify" />
|
||||
<setAcl path="Orchard/bin/HostRestart" setAclAccess="Modify" />
|
||||
<dbFullSql path="install.sql" />
|
||||
</MSDeploy.iisApp>
|
||||
|
||||
<!-- Runs SQL script to create login and assign permissions, requires transacted="false"
|
||||
This script runs as the database administrator provided in parameters.xml
|
||||
-->
|
||||
<dbfullsql path="createlogin.sql" transacted="false" />
|
||||
<dbfullsql path="createuser.sql" transacted="false" />
|
||||
|
||||
</MSDeploy.iisApp>
|
||||
@@ -23,19 +23,20 @@
|
||||
|
||||
<!-- Prompts for the database name and fills it into the database scripts -->
|
||||
<parameter name="Database Name" description="Name of the database for Orchard." defaultValue="orchard" tags="SQL, dbName">
|
||||
<parameterEntry type="TextFile" scope="install.sql" match="PlaceHolderForDb" />
|
||||
|
||||
</parameter>
|
||||
|
||||
<!-- Prompts for the database username and fills it into the database scripts.
|
||||
The SQL tag indicates it is a parameter required for SQL, the DbUsername tag indicates this is a Db username -->
|
||||
<parameter name="Database Username" description="User name to access you application database." defaultValue="orcharduser" tags="SQL, DbUsername">
|
||||
<parameterEntry type="TextFile" scope="install.sql" match="PlaceHolderForUser" />
|
||||
<parameterEntry type="TextFile" scope="createuser.sql" match="PlaceHolderForUser" />
|
||||
<parameterEntry type="TextFile" scope="createlogin.sql" match="PlaceHolderForUser" />
|
||||
</parameter>
|
||||
|
||||
<!-- Prompts for the database password and fills it into the database scripts.
|
||||
The SQL tag indicates it is a parameter required for SQL, the DbUserPassword tag indicates this is a Db password -->
|
||||
<parameter name="Database Password" description="Password for the Database Username." tags="New, Password, SQL, DbUserPassword">
|
||||
<parameterEntry type="TextFile" scope="install.sql" match="PlaceHolderForPassword" />
|
||||
<parameterEntry type="TextFile" scope="createlogin.sql" match="PlaceHolderForPassword" />
|
||||
</parameter>
|
||||
|
||||
<!-- Prompts for the admin creds and uses it for the administrator connection string. This is used to create a login and assign permissions.
|
||||
@@ -47,19 +48,17 @@
|
||||
<!-- Prompts for the admin password and uses it for the administrator connection string.
|
||||
This is use to create a login and assign permissions. The SQL tag indicates it is a parameter required for SQL.
|
||||
The DbAdminPassword tag indicates it should be used when the user is creating a new database. If they're not, it can be filled in with the DbUserPassword value. -->
|
||||
<parameter name="Database Administrator Password" description="Password for the database administrator account." tags="New, Password, SQL, dbAdminPassword">
|
||||
<parameter name="Database Administrator Password" description="Password for the database administrator account." tags="Password, SQL, dbAdminPassword">
|
||||
</parameter>
|
||||
|
||||
<parameter name="Admin Connection String SqlServer"
|
||||
tags="SQLConnectionString, AdminConnectionString, Hidden, Validate" description="Automatically sets the connection string for the connection request."
|
||||
defaultValue="Data Source={Database Server};Initial Catalog={Database Name};User Id={Database Administrator};Password={Database Administrator Password}">
|
||||
<parameterEntry type="ProviderPath" scope="dbfullsql" match="install.sql" />
|
||||
<parameter name="Admin Connection String SqlServer1" tags="SQLConnectionString, sql, Hidden" description="Automatically sets the connection string for the connection request." defaultValue="Data Source={Database Server};Initial Catalog=MASTER;User Id={Database Administrator};Password={Database Administrator Password}">
|
||||
<parameterEntry type="ProviderPath" scope="dbfullsql" match="createlogin.sql" />
|
||||
</parameter>
|
||||
|
||||
<parameter name="Non-Admin Connection String SqlServer"
|
||||
tags="SQLConnectionString, UserConnectionString, Hidden" description="Automatically sets the connection string for the connection request."
|
||||
defaultValue="Data Source={Database Server};Initial Catalog={Database Name};User Id={Database Username};Password={Database Password}">
|
||||
<parameter name="Admin Connection String SqlServer2" tags="SQLConnectionString, SQL, Hidden" description="Automatically sets the connection string for the connection request." defaultValue="Data Source={Database Server};Initial Catalog={Database Name};User Id={Database Administrator};Password={Database Administrator Password}">
|
||||
<parameterEntry type="ProviderPath" scope="dbfullsql" match="createuser.sql" />
|
||||
</parameter>
|
||||
|
||||
|
||||
<parameter name="Orchard Connection String" friendlyName="Orchard Connection String" description="Orchard SQL Data Connection String Setting" defaultValue="" tags="Sql, SqlCE, SingleLineConnectionString, Hidden">
|
||||
<parameterEntry kind="TextFile" scope="\\Settings\.txt$" match="(?<=\s*DataConnectionString:\s+)[^\s].*[^\r\n]" />
|
||||
|
||||
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -161,6 +161,237 @@
|
||||
asynchronous request failed.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Azure.ResourceBase">
|
||||
<summary>
|
||||
Resource information.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Azure.ResourceBase.#ctor">
|
||||
<summary>
|
||||
Initializes a new instance of the ResourceBase class.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Azure.ResourceBase.#ctor(System.String)">
|
||||
<summary>
|
||||
Initializes a new instance of the ResourceBase class with required
|
||||
arguments.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Azure.ResourceBase.Location">
|
||||
<summary>
|
||||
Required. Gets or sets the location of the resource.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Azure.ResourceBase.Tags">
|
||||
<summary>
|
||||
Optional. Gets or sets the tags attached to the resource.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Azure.ResourceBaseExtended">
|
||||
<summary>
|
||||
Resource information with extended details.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Azure.ResourceBaseExtended.#ctor">
|
||||
<summary>
|
||||
Initializes a new instance of the ResourceBaseExtended class.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Azure.ResourceBaseExtended.#ctor(System.String)">
|
||||
<summary>
|
||||
Initializes a new instance of the ResourceBaseExtended class with
|
||||
required arguments.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Azure.ResourceBaseExtended.Id">
|
||||
<summary>
|
||||
Optional. Gets or sets the ID of the resource.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Azure.ResourceBaseExtended.Name">
|
||||
<summary>
|
||||
Optional. Gets or sets the name of the resource.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Azure.ResourceBaseExtended.Type">
|
||||
<summary>
|
||||
Optional. Gets or sets the type of the resource.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Azure.ResourceIdentity">
|
||||
<summary>
|
||||
Resource identity.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Azure.ResourceIdentity.#ctor">
|
||||
<summary>
|
||||
Initializes a new instance of the ResourceIdentity class.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Azure.ResourceIdentity.#ctor(System.String,System.String,System.String)">
|
||||
<summary>
|
||||
Initializes a new instance of the ResourceIdentity class.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Azure.ResourceIdentity.GetProviderFromResourceType(System.String)">
|
||||
<summary>
|
||||
Returns provider string from resource type.
|
||||
</summary>
|
||||
<param name="resourceType">Resource type.</param>
|
||||
<returns>Provider</returns>
|
||||
</member>
|
||||
<member name="M:Microsoft.Azure.ResourceIdentity.GetTypeFromResourceType(System.String)">
|
||||
<summary>
|
||||
Returns type string from resource type.
|
||||
</summary>
|
||||
<param name="resourceType">Resource type.</param>
|
||||
<returns>Type</returns>
|
||||
</member>
|
||||
<member name="P:Microsoft.Azure.ResourceIdentity.ParentResourcePath">
|
||||
<summary>
|
||||
Optional. Gets or sets parent resource path (optional).
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Azure.ResourceIdentity.ResourceName">
|
||||
<summary>
|
||||
Required. Gets or sets resource name.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Azure.ResourceIdentity.ResourceProviderApiVersion">
|
||||
<summary>
|
||||
Required. Gets or sets API version of the resource provider.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Azure.ResourceIdentity.ResourceProviderNamespace">
|
||||
<summary>
|
||||
Required. Gets or sets namespace of the resource provider.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Azure.ResourceIdentity.ResourceType">
|
||||
<summary>
|
||||
Required. Gets or sets resource type.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Azure.Common.OData.FilterParameterAttribute">
|
||||
<summary>
|
||||
Parameter attribute used with OData filters.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Azure.Common.OData.FilterParameterAttribute.#ctor(System.String)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:Microsoft.Azure.Common.OData.FilterParameterAttribute"/> class.
|
||||
</summary>
|
||||
<param name="name">Property name to use in the filter.</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Azure.Common.OData.FilterParameterAttribute.#ctor(System.String,System.String)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:Microsoft.Azure.Common.OData.FilterParameterAttribute"/> class.
|
||||
</summary>
|
||||
<param name="name">Property name to use in the filter.</param>
|
||||
<param name="format">Format of the value.</param>
|
||||
</member>
|
||||
<member name="P:Microsoft.Azure.Common.OData.FilterParameterAttribute.Name">
|
||||
<summary>
|
||||
Property name to use in the filter.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Azure.Common.OData.FilterParameterAttribute.Format">
|
||||
<summary>
|
||||
Format of the value.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Azure.Common.OData.FilterString">
|
||||
<summary>
|
||||
Handles OData filter generation.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Azure.Common.OData.FilterString.Generate``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})">
|
||||
<summary>
|
||||
Generates an OData filter from a specified Linq expression.
|
||||
</summary>
|
||||
<typeparam name="T">Filter type</typeparam>
|
||||
<param name="filter">Entity to use for filter generation</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:Microsoft.Azure.Common.OData.UrlExpressionVisitor">
|
||||
<summary>
|
||||
Expression visitor class that generates OData style $filter parameter.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Azure.Common.OData.UrlExpressionVisitor.VisitBinary(System.Linq.Expressions.BinaryExpression)">
|
||||
<summary>
|
||||
Visits binary expression like ==, &&, >, etc.
|
||||
</summary>
|
||||
<param name="node">Node to visit.</param>
|
||||
<returns>Original node.</returns>
|
||||
</member>
|
||||
<member name="M:Microsoft.Azure.Common.OData.UrlExpressionVisitor.VisitUnary(System.Linq.Expressions.UnaryExpression)">
|
||||
<summary>
|
||||
Visits binary expression !foo.
|
||||
</summary>
|
||||
<param name="node">Node to visit.</param>
|
||||
<returns>Original node.</returns>
|
||||
</member>
|
||||
<member name="M:Microsoft.Azure.Common.OData.UrlExpressionVisitor.VisitConditional(System.Linq.Expressions.ConditionalExpression)">
|
||||
<summary>
|
||||
Visits conditional expression foo == true ? bar : fee. Throws NotSupportedException.
|
||||
</summary>
|
||||
<param name="node">Node to visit.</param>
|
||||
<returns>Throws NotSupportedException.</returns>
|
||||
</member>
|
||||
<member name="M:Microsoft.Azure.Common.OData.UrlExpressionVisitor.VisitNew(System.Linq.Expressions.NewExpression)">
|
||||
<summary>
|
||||
Visits new object expression like new DateTime().
|
||||
</summary>
|
||||
<param name="node">Node to visit.</param>
|
||||
<returns>Original node.</returns>
|
||||
</member>
|
||||
<member name="M:Microsoft.Azure.Common.OData.UrlExpressionVisitor.VisitConstant(System.Linq.Expressions.ConstantExpression)">
|
||||
<summary>
|
||||
Visits constants like 'a' or 123.
|
||||
</summary>
|
||||
<param name="node">Node to visit.</param>
|
||||
<returns>Original node.</returns>
|
||||
</member>
|
||||
<member name="M:Microsoft.Azure.Common.OData.UrlExpressionVisitor.VisitMember(System.Linq.Expressions.MemberExpression)">
|
||||
<summary>
|
||||
Visits object members like p.Foo or dateTime.Hour.
|
||||
</summary>
|
||||
<param name="node">Node to visit.</param>
|
||||
<returns>Original node.</returns>
|
||||
</member>
|
||||
<member name="M:Microsoft.Azure.Common.OData.UrlExpressionVisitor.VisitMethodCall(System.Linq.Expressions.MethodCallExpression)">
|
||||
<summary>
|
||||
Visits method calls like Contains, StartsWith, etc. Methods that are not supported will throw an exception.
|
||||
</summary>
|
||||
<param name="node">Node to visit.</param>
|
||||
<returns>Original node.</returns>
|
||||
</member>
|
||||
<member name="M:Microsoft.Azure.Common.OData.UrlExpressionVisitor.closeUnaryBooleanOperator">
|
||||
<summary>
|
||||
Appends 'eq true' to Boolean unary operators.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Azure.Common.OData.UrlExpressionVisitor.PrintConstant(System.Object)">
|
||||
<summary>
|
||||
Helper method to print constant.
|
||||
</summary>
|
||||
<param name="val">Object to print.</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Azure.Common.OData.UrlExpressionVisitor.GetPropertyName(System.Reflection.PropertyInfo)">
|
||||
<summary>
|
||||
Helper method to generate property name.
|
||||
</summary>
|
||||
<param name="property">Property to examine.</param>
|
||||
<returns>Property name or value specified in the FilterParameterAttribute.</returns>
|
||||
</member>
|
||||
<member name="M:Microsoft.Azure.Common.OData.UrlExpressionVisitor.GetPropertyFormat(System.Reflection.PropertyInfo)">
|
||||
<summary>
|
||||
Helper method to retrieve format from the FilterParameterAttribute.
|
||||
</summary>
|
||||
<param name="property">Property to examine.</param>
|
||||
<returns>Format from FilterParameterAttribute or null.</returns>
|
||||
</member>
|
||||
<member name="T:Microsoft.Azure.Common.Properties.Resources">
|
||||
<summary>
|
||||
A strongly-typed resource class, for looking up localized strings, etc.
|
||||
|
||||
BIN
lib/windowsazure/Microsoft.Azure.KeyVault.Core.dll
Normal file
BIN
lib/windowsazure/Microsoft.Azure.KeyVault.Core.dll
Normal file
Binary file not shown.
114
lib/windowsazure/Microsoft.Azure.KeyVault.Core.xml
Normal file
114
lib/windowsazure/Microsoft.Azure.KeyVault.Core.xml
Normal file
@@ -0,0 +1,114 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>Microsoft.Azure.KeyVault.Core</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:Microsoft.Azure.KeyVault.Core.IKey">
|
||||
<summary>
|
||||
Interface for Keys
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Azure.KeyVault.Core.IKey.DecryptAsync(System.Byte[],System.Byte[],System.Byte[],System.Byte[],System.String,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Decrypts the specified cipher text.
|
||||
</summary>
|
||||
<param name="ciphertext">The cipher text to decrypt</param>
|
||||
<param name="iv">The initialization vector</param>
|
||||
<param name="authenticationData">The authentication data</param>
|
||||
<param name="algorithm">The algorithm to use</param>
|
||||
<param name="token">Cancellation token</param>
|
||||
<returns>The plain text</returns>
|
||||
<remarks>If algorithm is not specified, an implementation should use its default algorithm.
|
||||
Not all algorithms require, or support, all parameters.</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Azure.KeyVault.Core.IKey.EncryptAsync(System.Byte[],System.Byte[],System.Byte[],System.String,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Encrypts the specified plain text.
|
||||
</summary>
|
||||
<param name="plaintext">The plain text to encrypt</param>
|
||||
<param name="iv">The initialization vector</param>
|
||||
<param name="authenticationData">The authentication data</param>
|
||||
<param name="algorithm">The algorithm to use</param>
|
||||
<param name="token">Cancellation token</param>
|
||||
<returns>A Tuple consisting of the cipher text, the authentication tag (if applicable), the algorithm used</returns>
|
||||
<remarks>If the algorithm is not specified, an implementation should use its default algorithm.
|
||||
Not all algorithyms require, or support, all parameters.</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Azure.KeyVault.Core.IKey.WrapKeyAsync(System.Byte[],System.String,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Encrypts the specified key material.
|
||||
</summary>
|
||||
<param name="key">The key material to encrypt</param>
|
||||
<param name="algorithm">The algorithm to use</param>
|
||||
<param name="token">Cancellation token</param>
|
||||
<returns>A Tuple consisting of the encrypted key and the algorithm used</returns>
|
||||
<remarks>If the algorithm is not specified, an implementation should use its default algorithm</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Azure.KeyVault.Core.IKey.UnwrapKeyAsync(System.Byte[],System.String,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Decrypts the specified key material.
|
||||
</summary>
|
||||
<param name="encryptedKey">The encrypted key material</param>
|
||||
<param name="algorithm">The algorithm to use</param>
|
||||
<param name="token">Cancellation token</param>
|
||||
<returns>The decrypted key material</returns>
|
||||
<remarks>If the algorithm is not specified, an implementation should use its default algorithm</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Azure.KeyVault.Core.IKey.SignAsync(System.Byte[],System.String,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Signs the specified digest.
|
||||
</summary>
|
||||
<param name="digest">The digest to sign</param>
|
||||
<param name="algorithm">The algorithm to use</param>
|
||||
<param name="token">Cancellation token</param>
|
||||
<returns>A Tuple consisting of the signature and the algorithm used</returns>
|
||||
<remarks>If the algorithm is not specified, an implementation should use its default algorithm</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Azure.KeyVault.Core.IKey.VerifyAsync(System.Byte[],System.Byte[],System.String,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Verifies the specified signature value
|
||||
</summary>
|
||||
<param name="digest">The digest</param>
|
||||
<param name="signature">The signature value</param>
|
||||
<param name="algorithm">The algorithm to use</param>
|
||||
<param name="token">Cancellation token</param>
|
||||
<returns>A bool indicating whether the signature was successfully verified</returns>
|
||||
</member>
|
||||
<member name="P:Microsoft.Azure.KeyVault.Core.IKey.DefaultEncryptionAlgorithm">
|
||||
<summary>
|
||||
The default encryption algorithm for this key
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Azure.KeyVault.Core.IKey.DefaultKeyWrapAlgorithm">
|
||||
<summary>
|
||||
The default key wrap algorithm for this key
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Azure.KeyVault.Core.IKey.DefaultSignatureAlgorithm">
|
||||
<summary>
|
||||
The default signature algorithm for this key
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Azure.KeyVault.Core.IKey.Kid">
|
||||
<summary>
|
||||
The key identifier
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Azure.KeyVault.Core.IKeyResolver">
|
||||
<summary>
|
||||
Interface for key resolvers.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Azure.KeyVault.Core.IKeyResolver.ResolveKeyAsync(System.String,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Provides an IKey implementation for the specified key identifier.
|
||||
</summary>
|
||||
<param name="kid">The key identifier to resolve</param>
|
||||
<param name="token">Cancellation token</param>
|
||||
<returns>The resolved IKey implementation or null</returns>
|
||||
<remarks>Implementations should check the format of the kid to ensure that it is recognized. Null, rather than
|
||||
an exception, should be returned for unrecognized key identifiers to enable chaining of key resolvers.</remarks>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
Binary file not shown.
Binary file not shown.
@@ -40443,7 +40443,7 @@
|
||||
<param name="model">The model to use.</param>
|
||||
<param name="messageReaderSettings">The message reader settings to use.</param>
|
||||
<param name="version">The version of the payload being read.</param>
|
||||
<param name="typeKindFromPayloadFunc">A func to compute the type kind from the payload shape if it could not be determined from the expected type or the payload type.</param>
|
||||
<param name="typeKindPeekedFromPayloadFunc">A func to compute the type kind from the payload shape if it could not be determined from the expected type or the payload type.</param>
|
||||
<param name="targetTypeKind">The target type kind to be used to read the payload.</param>
|
||||
<param name="serializationTypeNameAnnotation">Potentially non-null instance of an annotation to put on the value reported from the reader.</param>
|
||||
<returns>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -4,19 +4,19 @@
|
||||
<name>Microsoft.WindowsAzure.Configuration</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:Microsoft.WindowsAzure.CloudConfigurationManager">
|
||||
<member name="T:Microsoft.Azure.CloudConfigurationManager">
|
||||
<summary>
|
||||
Configuration manager for accessing Windows Azure settings.
|
||||
Configuration manager for accessing Microsoft Azure settings.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.WindowsAzure.CloudConfigurationManager.GetSetting(System.String)">
|
||||
<member name="M:Microsoft.Azure.CloudConfigurationManager.GetSetting(System.String)">
|
||||
<summary>
|
||||
Gets a setting with the given name.
|
||||
</summary>
|
||||
<param name="name">Setting name.</param>
|
||||
<returns>Setting value or null if not found.</returns>
|
||||
</member>
|
||||
<member name="P:Microsoft.WindowsAzure.CloudConfigurationManager.AppSettings">
|
||||
<member name="P:Microsoft.Azure.CloudConfigurationManager.AppSettings">
|
||||
<summary>
|
||||
Gets application settings.
|
||||
</summary>
|
||||
@@ -42,17 +42,17 @@
|
||||
Looks up a localized string similar to Argument "{0}" cannot be an empty string..
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.WindowsAzure.AzureApplicationSettings">
|
||||
<member name="T:Microsoft.Azure.AzureApplicationSettings">
|
||||
<summary>
|
||||
Windows Azure settings.
|
||||
Microsoft Azure settings.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.WindowsAzure.AzureApplicationSettings.#ctor">
|
||||
<member name="M:Microsoft.Azure.AzureApplicationSettings.#ctor">
|
||||
<summary>
|
||||
Initializes the settings.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.WindowsAzure.AzureApplicationSettings.IsMissingSettingException(System.Exception)">
|
||||
<member name="M:Microsoft.Azure.AzureApplicationSettings.IsMissingSettingException(System.Exception)">
|
||||
<summary>
|
||||
Checks whether the given exception represents an exception throws
|
||||
for a missing setting.
|
||||
@@ -60,14 +60,14 @@
|
||||
<param name="e">Exception</param>
|
||||
<returns>True for the missing setting exception.</returns>
|
||||
</member>
|
||||
<member name="M:Microsoft.WindowsAzure.AzureApplicationSettings.GetSetting(System.String)">
|
||||
<member name="M:Microsoft.Azure.AzureApplicationSettings.GetSetting(System.String)">
|
||||
<summary>
|
||||
Gets a setting with the given name.
|
||||
</summary>
|
||||
<param name="name">Setting name.</param>
|
||||
<returns>Setting value or null if such setting does not exist.</returns>
|
||||
</member>
|
||||
<member name="M:Microsoft.WindowsAzure.AzureApplicationSettings.GetValue(System.String,System.String,System.Func{System.String,System.String})">
|
||||
<member name="M:Microsoft.Azure.AzureApplicationSettings.GetValue(System.String,System.String,System.Func{System.String,System.String})">
|
||||
<summary>
|
||||
Gets setting's value from the given provider.
|
||||
</summary>
|
||||
@@ -76,21 +76,21 @@
|
||||
<param name="getValue">Method to obtain given setting.</param>
|
||||
<returns>Setting value, or null if not found.</returns>
|
||||
</member>
|
||||
<member name="M:Microsoft.WindowsAzure.AzureApplicationSettings.GetServiceRuntimeSetting(System.String)">
|
||||
<member name="M:Microsoft.Azure.AzureApplicationSettings.GetServiceRuntimeSetting(System.String)">
|
||||
<summary>
|
||||
Gets a configuration setting from the service runtime.
|
||||
</summary>
|
||||
<param name="name">Setting name.</param>
|
||||
<returns>Setting value or null if not found.</returns>
|
||||
</member>
|
||||
<member name="M:Microsoft.WindowsAzure.AzureApplicationSettings.GetServiceRuntimeAssembly">
|
||||
<member name="M:Microsoft.Azure.AzureApplicationSettings.GetServiceRuntimeAssembly">
|
||||
<summary>
|
||||
Loads and returns the latest available version of the service
|
||||
runtime assembly.
|
||||
</summary>
|
||||
<returns>Loaded assembly, if any.</returns>
|
||||
</member>
|
||||
<member name="M:Microsoft.WindowsAzure.NativeMethods.GetAssemblyPath(System.String)">
|
||||
<member name="M:Microsoft.Azure.NativeMethods.GetAssemblyPath(System.String)">
|
||||
<summary>
|
||||
Gets an assembly path from the GAC given a partial name.
|
||||
</summary>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
lib/windowsazure/System.IdentityModel.Tokens.Jwt.dll
Normal file
BIN
lib/windowsazure/System.IdentityModel.Tokens.Jwt.dll
Normal file
Binary file not shown.
2502
lib/windowsazure/System.IdentityModel.Tokens.Jwt.xml
Normal file
2502
lib/windowsazure/System.IdentityModel.Tokens.Jwt.xml
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
202
src/Gulpfile.js
Normal file
202
src/Gulpfile.js
Normal file
@@ -0,0 +1,202 @@
|
||||
var glob = require("glob"),
|
||||
path = require("path-posix"),
|
||||
merge = require("merge-stream"),
|
||||
gulpif = require("gulp-if"),
|
||||
gulp = require("gulp"),
|
||||
newer = require("gulp-newer"),
|
||||
plumber = require("gulp-plumber"),
|
||||
sourcemaps = require("gulp-sourcemaps"),
|
||||
less = require("gulp-less"),
|
||||
autoprefixer = require("gulp-autoprefixer"),
|
||||
minify = require("gulp-minify-css"),
|
||||
typescript = require("gulp-typescript"),
|
||||
uglify = require("gulp-uglify"),
|
||||
rename = require("gulp-rename"),
|
||||
concat = require("gulp-concat"),
|
||||
header = require("gulp-header"),
|
||||
fs = require("fs");
|
||||
|
||||
/*
|
||||
** GULP TASKS
|
||||
*/
|
||||
|
||||
// Incremental build (each asset group is built only if one or more inputs are newer than the output).
|
||||
gulp.task("build", function () {
|
||||
var assetGroupTasks = getAssetGroups().map(function (assetGroup) {
|
||||
var doRebuild = false;
|
||||
return createAssetGroupTask(assetGroup, doRebuild);
|
||||
});
|
||||
return merge(assetGroupTasks);
|
||||
});
|
||||
|
||||
// Full rebuild (all assets groups are built regardless of timestamps).
|
||||
gulp.task("rebuild", function () {
|
||||
var assetGroupTasks = getAssetGroups().map(function (assetGroup) {
|
||||
var doRebuild = true;
|
||||
return createAssetGroupTask(assetGroup, doRebuild);
|
||||
});
|
||||
return merge(assetGroupTasks);
|
||||
});
|
||||
|
||||
|
||||
// Set "Watchers" as sub-processes in order to restart the task when Assets.json changes.
|
||||
gulp.task("watch", function () {
|
||||
var watchers;
|
||||
function restart() {
|
||||
if (watchers) {
|
||||
watchers.forEach(function (w) {
|
||||
w.remove();
|
||||
w.end();
|
||||
});
|
||||
}
|
||||
watchers = [];
|
||||
// Continuous watch (each asset group is built whenever one of its inputs changes).
|
||||
getAssetGroups().forEach(function (assetGroup) {
|
||||
var watchPaths = assetGroup.inputPaths.concat(assetGroup.watchPaths);
|
||||
var watcher = gulp.watch(watchPaths, function (event) {
|
||||
var isConcat = path.basename(assetGroup.outputFileName, path.extname(assetGroup.outputFileName)) !== "@";
|
||||
if (isConcat)
|
||||
console.log("Asset file '" + event.path + "' was " + event.type + ", rebuilding asset group with output '" + assetGroup.outputPath + "'.");
|
||||
else
|
||||
console.log("Asset file '" + event.path + "' was " + event.type + ", rebuilding asset group.");
|
||||
var doRebuild = true;
|
||||
var task = createAssetGroupTask(assetGroup, doRebuild);
|
||||
});
|
||||
watchers.push(watcher);
|
||||
});
|
||||
}
|
||||
var p;
|
||||
if (p) { p.exit(); }
|
||||
p = gulp.watch("Orchard.Web/{Core,Modules,Themes}/*/Assets.json", function (event) {
|
||||
console.log("Asset file '" + event.path + "' was " + event.type + ", resetting asset watchers.");
|
||||
restart();
|
||||
});
|
||||
restart();
|
||||
});
|
||||
|
||||
|
||||
/*
|
||||
** ASSET GROUPS
|
||||
*/
|
||||
function getAssetGroups() {
|
||||
var assetManifestPaths = glob.sync("Orchard.Web/{Core,Modules,Themes}/*/Assets.json", {});
|
||||
var assetGroups = [];
|
||||
assetManifestPaths.forEach(function (assetManifestPath) {
|
||||
var file = './' + assetManifestPath;
|
||||
var json = fs.readFileSync(file, 'utf8');
|
||||
assetManifest = eval(json);
|
||||
assetManifest.forEach(function (assetGroup) {
|
||||
resolveAssetGroupPaths(assetGroup, assetManifestPath);
|
||||
assetGroups.push(assetGroup);
|
||||
});
|
||||
});
|
||||
return assetGroups;
|
||||
}
|
||||
|
||||
function resolveAssetGroupPaths(assetGroup, assetManifestPath) {
|
||||
assetGroup.basePath = path.dirname(assetManifestPath);
|
||||
assetGroup.inputPaths = assetGroup.inputs.map(function (inputPath) {
|
||||
return path.resolve(path.join(assetGroup.basePath, inputPath));
|
||||
});
|
||||
assetGroup.watchPaths = [];
|
||||
if (!!assetGroup.watch) {
|
||||
assetGroup.watchPaths = assetGroup.watch.map(function (watchPath) {
|
||||
return path.resolve(path.join(assetGroup.basePath, watchPath));
|
||||
});
|
||||
}
|
||||
assetGroup.outputPath = path.resolve(path.join(assetGroup.basePath, assetGroup.output));
|
||||
assetGroup.outputDir = path.dirname(assetGroup.outputPath);
|
||||
assetGroup.outputFileName = path.basename(assetGroup.output);
|
||||
}
|
||||
|
||||
function createAssetGroupTask(assetGroup, doRebuild) {
|
||||
var outputExt = path.extname(assetGroup.output).toLowerCase();
|
||||
switch (outputExt) {
|
||||
case ".css":
|
||||
return buildCssPipeline(assetGroup, doRebuild);
|
||||
case ".js":
|
||||
return buildJsPipeline(assetGroup, doRebuild);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
** PROCESSING PIPELINES
|
||||
*/
|
||||
|
||||
function buildCssPipeline(assetGroup, doRebuild) {
|
||||
assetGroup.inputPaths.forEach(function (inputPath) {
|
||||
var ext = path.extname(inputPath).toLowerCase();
|
||||
if (ext !== ".less" && ext !== ".css")
|
||||
throw "Input file '" + inputPath + "' is not of a valid type for output file '" + assetGroup.outputPath + "'.";
|
||||
});
|
||||
var doConcat = path.basename(assetGroup.outputFileName, ".css") !== "@";
|
||||
var generateSourceMaps = assetGroup.hasOwnProperty("generateSourceMaps") ? assetGroup.generateSourceMaps : true;
|
||||
return gulp.src(assetGroup.inputPaths)
|
||||
.pipe(gulpif(!doRebuild,
|
||||
gulpif(doConcat,
|
||||
newer(assetGroup.outputPath),
|
||||
newer({
|
||||
dest: assetGroup.outputDir,
|
||||
ext: ".css"
|
||||
}))))
|
||||
.pipe(plumber())
|
||||
.pipe(gulpif(generateSourceMaps, sourcemaps.init()))
|
||||
.pipe(gulpif("*.less", less()))
|
||||
.pipe(gulpif(doConcat, concat(assetGroup.outputFileName)))
|
||||
.pipe(autoprefixer({ browsers: ["last 2 versions"] }))
|
||||
// TODO: Start using below whenever gulp-header supports sourcemaps.
|
||||
//.pipe(header(
|
||||
// "/*\n" +
|
||||
// "** NOTE: This file is generated by Gulp compilation and should not be edited directly!\n" +
|
||||
// "** Any changes made directly to this file will be overwritten next time the Gulp compilation runs.\n" +
|
||||
// "** For more information, see the Readme.txt file in the Gulp solution folder.\n" +
|
||||
// "*/\n\n"))
|
||||
.pipe(gulpif(generateSourceMaps, sourcemaps.write()))
|
||||
.pipe(gulp.dest(assetGroup.outputDir))
|
||||
.pipe(minify())
|
||||
.pipe(rename({
|
||||
suffix: ".min"
|
||||
}))
|
||||
.pipe(gulp.dest(assetGroup.outputDir));
|
||||
}
|
||||
|
||||
function buildJsPipeline(assetGroup, doRebuild) {
|
||||
assetGroup.inputPaths.forEach(function (inputPath) {
|
||||
var ext = path.extname(inputPath).toLowerCase();
|
||||
if (ext !== ".ts" && ext !== ".js")
|
||||
throw "Input file '" + inputPath + "' is not of a valid type for output file '" + assetGroup.outputPath + "'.";
|
||||
});
|
||||
var doConcat = path.basename(assetGroup.outputFileName, ".js") !== "@";
|
||||
var generateSourceMaps = assetGroup.hasOwnProperty("generateSourceMaps") ? assetGroup.generateSourceMaps : true;
|
||||
return gulp.src(assetGroup.inputPaths)
|
||||
.pipe(gulpif(!doRebuild,
|
||||
gulpif(doConcat,
|
||||
newer(assetGroup.outputPath),
|
||||
newer({
|
||||
dest: assetGroup.outputDir,
|
||||
ext: ".js"
|
||||
}))))
|
||||
.pipe(plumber())
|
||||
.pipe(gulpif(generateSourceMaps, sourcemaps.init()))
|
||||
.pipe(gulpif("*.ts", typescript({
|
||||
declaration: false,
|
||||
//noImplicitAny: true,
|
||||
noEmitOnError: true,
|
||||
sortOutput: true,
|
||||
}).js))
|
||||
.pipe(gulpif(doConcat, concat(assetGroup.outputFileName)))
|
||||
// TODO: Start using below whenever gulp-header supports sourcemaps.
|
||||
//.pipe(header(
|
||||
// "/*\n" +
|
||||
// "** NOTE: This file is generated by Gulp compilation and should not be edited directly!\n" +
|
||||
// "** Any changes made directly to this file will be overwritten next time the Gulp compilation runs.\n" +
|
||||
// "** For more information, see the Readme.txt file in the Gulp solution folder.\n" +
|
||||
// "*/\n\n"))
|
||||
.pipe(gulpif(generateSourceMaps, sourcemaps.write()))
|
||||
.pipe(gulp.dest(assetGroup.outputDir))
|
||||
.pipe(uglify())
|
||||
.pipe(rename({
|
||||
suffix: ".min"
|
||||
}))
|
||||
.pipe(gulp.dest(assetGroup.outputDir));
|
||||
}
|
||||
1038
src/Orchard.Azure/.vs/config/applicationhost.config
Normal file
1038
src/Orchard.Azure/.vs/config/applicationhost.config
Normal file
File diff suppressed because it is too large
Load Diff
@@ -4,7 +4,7 @@
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>2.5</ProductVersion>
|
||||
<ProductVersion>2.7</ProductVersion>
|
||||
<ProjectGuid>{03c5327d-4e8e-45a7-acd1-e18e7caa3c4a}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
@@ -35,8 +35,9 @@
|
||||
</PropertyGroup>
|
||||
<!-- Items for the project -->
|
||||
<ItemGroup>
|
||||
<ServiceConfiguration Include="ServiceConfiguration.Local.cscfg" />
|
||||
<ServiceDefinition Include="ServiceDefinition.csdef" />
|
||||
<ServiceConfiguration Include="ServiceConfiguration.cscfg" />
|
||||
<ServiceConfiguration Include="ServiceConfiguration.Cloud.cscfg" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Orchard.Azure.Web\Orchard.Azure.Web.csproj">
|
||||
@@ -65,7 +66,7 @@
|
||||
<!-- Import the target files for this project template -->
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
<CloudExtensionsDir Condition=" '$(CloudExtensionsDir)' == '' ">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Windows Azure Tools\2.5\</CloudExtensionsDir>
|
||||
<CloudExtensionsDir Condition=" '$(CloudExtensionsDir)' == '' ">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Windows Azure Tools\2.7\</CloudExtensionsDir>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(CloudExtensionsDir)Microsoft.WindowsAzure.targets" />
|
||||
<!-- The BeforeAddRoleContent override ensures that content in themes and modules get added
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ServiceConfiguration serviceName="OrchardCloudService" osFamily="4" osVersion="*" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" schemaVersion="2014-06.2.4">
|
||||
<Role name="Orchard.Azure.Web">
|
||||
<Instances count="1" />
|
||||
<ConfigurationSettings>
|
||||
<Setting name="Orchard.Azure.Media.StorageConnectionString" value="UseDevelopmentStorage=true" />
|
||||
<Setting name="Orchard.Azure.Settings.StorageConnectionString" value="UseDevelopmentStorage=true" />
|
||||
<Setting name="Orchard.Azure.OutputCache.HostIdentifier" value="Orchard.Azure.Web" />
|
||||
<Setting name="Orchard.Azure.OutputCache.CacheName" value="OutputCache" />
|
||||
<Setting name="Orchard.Azure.OutputCache.AuthorizationToken" value="" />
|
||||
<Setting name="Orchard.Azure.DatabaseCache.HostIdentifier" value="Orchard.Azure.Web" />
|
||||
<Setting name="Orchard.Azure.DatabaseCache.CacheName" value="DatabaseCache" />
|
||||
<Setting name="Orchard.Azure.DatabaseCache.AuthorizationToken" value="" />
|
||||
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.NamedCaches" value="{"caches":[{"name":"default","policy":{"eviction":{"type":0},"expiration":{"defaultTTL":10,"isExpirable":true,"type":1},"serverNotification":{"isEnabled":false}},"secondaries":0},{"name":"SessionStateCache","policy":{"eviction":{"type":0},"expiration":{"defaultTTL":60,"isExpirable":true,"type":2},"serverNotification":{"isEnabled":false}},"secondaries":0},{"name":"OutputCache","policy":{"eviction":{"type":0},"expiration":{"defaultTTL":5,"isExpirable":true,"type":1},"serverNotification":{"isEnabled":false}},"secondaries":0},{"name":"DatabaseCache","policy":{"eviction":{"type":0},"expiration":{"defaultTTL":5,"isExpirable":true,"type":1},"serverNotification":{"isEnabled":false}},"secondaries":0}]}" />
|
||||
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.DiagnosticLevel" value="1" />
|
||||
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.CacheSizePercentage" value="30" />
|
||||
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.ConfigStoreConnectionString" value="UseDevelopmentStorage=true" />
|
||||
</ConfigurationSettings>
|
||||
</Role>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ServiceConfiguration serviceName="OrchardCloudService" osFamily="4" osVersion="*" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" schemaVersion="2015-04.2.6">
|
||||
<Role name="Orchard.Azure.Web">
|
||||
<Instances count="1" />
|
||||
<ConfigurationSettings>
|
||||
<Setting name="Orchard.Azure.Media.StorageConnectionString" value="UseDevelopmentStorage=true" />
|
||||
<Setting name="Orchard.Azure.Settings.StorageConnectionString" value="UseDevelopmentStorage=true" />
|
||||
<Setting name="Orchard.Azure.OutputCache.HostIdentifier" value="Orchard.Azure.Web" />
|
||||
<Setting name="Orchard.Azure.OutputCache.CacheName" value="OutputCache" />
|
||||
<Setting name="Orchard.Azure.OutputCache.AuthorizationToken" value="" />
|
||||
<Setting name="Orchard.Azure.DatabaseCache.HostIdentifier" value="Orchard.Azure.Web" />
|
||||
<Setting name="Orchard.Azure.DatabaseCache.CacheName" value="DatabaseCache" />
|
||||
<Setting name="Orchard.Azure.DatabaseCache.AuthorizationToken" value="" />
|
||||
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.NamedCaches" value="{"caches":[{"name":"default","policy":{"eviction":{"type":0},"expiration":{"defaultTTL":10,"isExpirable":true,"type":1},"serverNotification":{"isEnabled":false}},"secondaries":0},{"name":"SessionStateCache","policy":{"eviction":{"type":0},"expiration":{"defaultTTL":60,"isExpirable":true,"type":2},"serverNotification":{"isEnabled":false}},"secondaries":0},{"name":"OutputCache","policy":{"eviction":{"type":0},"expiration":{"defaultTTL":5,"isExpirable":true,"type":1},"serverNotification":{"isEnabled":false}},"secondaries":0},{"name":"DatabaseCache","policy":{"eviction":{"type":0},"expiration":{"defaultTTL":5,"isExpirable":true,"type":1},"serverNotification":{"isEnabled":false}},"secondaries":0}]}" />
|
||||
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.DiagnosticLevel" value="1" />
|
||||
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.CacheSizePercentage" value="30" />
|
||||
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.ConfigStoreConnectionString" value="UseDevelopmentStorage=true" />
|
||||
<Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="UseDevelopmentStorage=true" />
|
||||
</ConfigurationSettings>
|
||||
</Role>
|
||||
</ServiceConfiguration>
|
||||
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ServiceConfiguration serviceName="OrchardCloudService" osFamily="4" osVersion="*" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" schemaVersion="2015-04.2.6">
|
||||
<Role name="Orchard.Azure.Web">
|
||||
<Instances count="1" />
|
||||
<ConfigurationSettings>
|
||||
<Setting name="Orchard.Azure.Media.StorageConnectionString" value="UseDevelopmentStorage=true" />
|
||||
<Setting name="Orchard.Azure.Settings.StorageConnectionString" value="UseDevelopmentStorage=true" />
|
||||
<Setting name="Orchard.Azure.OutputCache.HostIdentifier" value="Orchard.Azure.Web" />
|
||||
<Setting name="Orchard.Azure.OutputCache.CacheName" value="OutputCache" />
|
||||
<Setting name="Orchard.Azure.OutputCache.AuthorizationToken" value="" />
|
||||
<Setting name="Orchard.Azure.DatabaseCache.HostIdentifier" value="Orchard.Azure.Web" />
|
||||
<Setting name="Orchard.Azure.DatabaseCache.CacheName" value="DatabaseCache" />
|
||||
<Setting name="Orchard.Azure.DatabaseCache.AuthorizationToken" value="" />
|
||||
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.NamedCaches" value="{"caches":[{"name":"default","policy":{"eviction":{"type":0},"expiration":{"defaultTTL":10,"isExpirable":true,"type":1},"serverNotification":{"isEnabled":false}},"secondaries":0},{"name":"SessionStateCache","policy":{"eviction":{"type":0},"expiration":{"defaultTTL":60,"isExpirable":true,"type":2},"serverNotification":{"isEnabled":false}},"secondaries":0},{"name":"OutputCache","policy":{"eviction":{"type":0},"expiration":{"defaultTTL":5,"isExpirable":true,"type":1},"serverNotification":{"isEnabled":false}},"secondaries":0},{"name":"DatabaseCache","policy":{"eviction":{"type":0},"expiration":{"defaultTTL":5,"isExpirable":true,"type":1},"serverNotification":{"isEnabled":false}},"secondaries":0}]}" />
|
||||
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.DiagnosticLevel" value="1" />
|
||||
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.CacheSizePercentage" value="30" />
|
||||
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.ConfigStoreConnectionString" value="UseDevelopmentStorage=true" />
|
||||
<Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="UseDevelopmentStorage=true" />
|
||||
</ConfigurationSettings>
|
||||
</Role>
|
||||
</ServiceConfiguration>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ServiceDefinition name="OrchardCloudService" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2014-06.2.4">
|
||||
<ServiceDefinition name="OrchardCloudService" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2015-04.2.6">
|
||||
<WebRole name="Orchard.Azure.Web">
|
||||
<Sites>
|
||||
<Site name="Web">
|
||||
@@ -20,6 +20,7 @@
|
||||
<Setting name="Orchard.Azure.DatabaseCache.HostIdentifier" />
|
||||
<Setting name="Orchard.Azure.DatabaseCache.CacheName" />
|
||||
<Setting name="Orchard.Azure.DatabaseCache.AuthorizationToken" />
|
||||
<Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" />
|
||||
</ConfigurationSettings>
|
||||
<Endpoints>
|
||||
<InputEndpoint name="HttpIn" protocol="http" port="80" />
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<DiagnosticsConfiguration xmlns="http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration">
|
||||
<PublicConfig xmlns="http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration">
|
||||
<WadCfg>
|
||||
<DiagnosticMonitorConfiguration overallQuotaInMB="4096">
|
||||
<DiagnosticInfrastructureLogs scheduledTransferPeriod="PT1M" scheduledTransferLogLevelFilter="Warning" />
|
||||
<Directories scheduledTransferPeriod="PT1M">
|
||||
<IISLogs containerName="wad-iis-logfiles" />
|
||||
</Directories>
|
||||
<PerformanceCounters>
|
||||
<PerformanceCounterConfiguration counterSpecifier="\Memory\Available MBytes" sampleRate="PT3M" />
|
||||
<PerformanceCounterConfiguration counterSpecifier="\Web Service(_Total)\ISAPI Extension Requests/sec" sampleRate="PT3M" />
|
||||
<PerformanceCounterConfiguration counterSpecifier="\Web Service(_Total)\Bytes Total/Sec" sampleRate="PT3M" />
|
||||
<PerformanceCounterConfiguration counterSpecifier="\ASP.NET Applications(__Total__)\Requests/Sec" sampleRate="PT3M" />
|
||||
<PerformanceCounterConfiguration counterSpecifier="\ASP.NET Applications(__Total__)\Errors Total/Sec" sampleRate="PT3M" />
|
||||
<PerformanceCounterConfiguration counterSpecifier="\ASP.NET\Requests Queued" sampleRate="PT3M" />
|
||||
<PerformanceCounterConfiguration counterSpecifier="\ASP.NET\Requests Rejected" sampleRate="PT3M" />
|
||||
</PerformanceCounters>
|
||||
<WindowsEventLog scheduledTransferPeriod="PT1M">
|
||||
<DataSource name="Application!*" />
|
||||
</WindowsEventLog>
|
||||
<Logs scheduledTransferPeriod="PT1M" scheduledTransferLogLevelFilter="Warning" />
|
||||
</DiagnosticMonitorConfiguration>
|
||||
</WadCfg>
|
||||
<StorageAccount>devstoreaccount1</StorageAccount>
|
||||
</PublicConfig>
|
||||
<PrivateConfig xmlns="http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration">
|
||||
<StorageAccount name="devstoreaccount1" key="Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==" />
|
||||
</PrivateConfig>
|
||||
<IsEnabled>true</IsEnabled>
|
||||
</DiagnosticsConfiguration>
|
||||
@@ -1,98 +1,110 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<HostComponents>
|
||||
<Components>
|
||||
<Components>
|
||||
|
||||
<Component Type="Orchard.Environment.Extensions.ExtensionMonitoringCoordinator">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable new extensions monitoring -->
|
||||
<Property Name="Disabled" Value="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component Type="Orchard.Environment.Extensions.ExtensionMonitoringCoordinator">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable new extensions monitoring -->
|
||||
<Property Name="Disabled" Value="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.DisplayManagement.Descriptors.ShapePlacementStrategy.PlacementFileParser">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable Placement files monitoring (Placement.info) -->
|
||||
<Property Name="DisableMonitoring" Value="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component Type="Orchard.DisplayManagement.Descriptors.ShapePlacementStrategy.PlacementFileParser">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable Placement files monitoring (Placement.info) -->
|
||||
<Property Name="DisableMonitoring" Value="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.ShapeTemplateBindingStrategy">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable template views monitoring (Views\*.cshtml) -->
|
||||
<Property Name="DisableMonitoring" Value="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component Type="Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.ShapeTemplateBindingStrategy">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable template views monitoring (Views\*.cshtml) -->
|
||||
<Property Name="DisableMonitoring" Value="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.Environment.Extensions.Folders.ExtensionHarvester">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable extension folders monitoring (new files in modules and themes) -->
|
||||
<Property Name="DisableMonitoring" Value="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component Type="Orchard.Environment.Extensions.Folders.ExtensionHarvester">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable extension folders monitoring (new files in modules and themes) -->
|
||||
<Property Name="DisableMonitoring" Value="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.Environment.Extensions.Compilers.DefaultProjectFileParser">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable project files monitoring (/Modules/**/*.csproj) -->
|
||||
<Property Name="DisableMonitoring" Value="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component Type="Orchard.Environment.Extensions.Compilers.DefaultProjectFileParser">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable project files monitoring (/Modules/**/*.csproj) -->
|
||||
<Property Name="DisableMonitoring" Value="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.Environment.Extensions.Loaders.DynamicExtensionLoader">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable source files monitoring -->
|
||||
<Property Name="DisableMonitoring" Value="true"/>
|
||||
<!-- Set Value="true" to completely disable the Dynamic Extension Loader -->
|
||||
<Property Name="Disabled" Value="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component Type="Orchard.Environment.Extensions.Loaders.DynamicExtensionLoader">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable source files monitoring -->
|
||||
<Property Name="DisableMonitoring" Value="true"/>
|
||||
<!-- Set Value="true" to completely disable the Dynamic Extension Loader -->
|
||||
<Property Name="Disabled" Value="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.Environment.Extensions.Loaders.PrecompiledExtensionLoader">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable pre-compiled files monitoring (~/Modules/**/bin/*.dll) -->
|
||||
<Property Name="DisableMonitoring" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component Type="Orchard.Environment.Extensions.Loaders.PrecompiledExtensionLoader">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable pre-compiled files monitoring (~/Modules/**/bin/*.dll) -->
|
||||
<Property Name="DisableMonitoring" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.FileSystems.Dependencies.DefaultDependenciesFolder">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable the dependencies folder monitoring -->
|
||||
<Property Name="DisableMonitoring" Value="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component Type="Orchard.FileSystems.Dependencies.DefaultDependenciesFolder">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable the dependencies folder monitoring -->
|
||||
<Property Name="DisableMonitoring" Value="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.FileSystems.Dependencies.DefaultExtensionDependenciesManager">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable compiled dependencides files monitoring -->
|
||||
<Property Name="DisableMonitoring" Value="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component Type="Orchard.FileSystems.Dependencies.DefaultExtensionDependenciesManager">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable compiled dependencides files monitoring -->
|
||||
<Property Name="DisableMonitoring" Value="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.Localization.Services.DefaultLocalizedStringManager">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable localization files monitoring (*.po) -->
|
||||
<Property Name="DisableMonitoring" Value="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component Type="Orchard.Localization.Services.DefaultLocalizedStringManager">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable localization files monitoring (*.po) -->
|
||||
<Property Name="DisableMonitoring" Value="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.Caching.DefaultParallelCacheContext">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable parallel cache resolution -->
|
||||
<Property Name="Disabled" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component Type="Orchard.Caching.DefaultParallelCacheContext">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable parallel cache resolution -->
|
||||
<Property Name="Disabled" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.Data.SessionConfigurationCache">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable session configuration cache (mappings.bin). Recommended when using multiple instances. -->
|
||||
<Property Name="Disabled" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component Type="Orchard.Data.SessionConfigurationCache">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable session configuration cache (mappings.bin). Recommended when using multiple instances. -->
|
||||
<Property Name="Disabled" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.Alias.Implementation.Updater">
|
||||
<Properties>
|
||||
<Property Name="Disabled" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
</Components>
|
||||
<Component Type="Orchard.Environment.Descriptor.ShellDescriptorCache">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable shell descriptors cache (cache.dat). Recommended when using multiple instances. -->
|
||||
<Property Name="Disabled" Value="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.Services.ClientAddressAccessor">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to read the client host address from the specified HTTP header. -->
|
||||
<Property Name="EnableClientHostAddressHeader" Value="false"/>
|
||||
|
||||
<!-- Set Value to the HTTP header name from which to read the client host address. Only used when EnableClientHostAddressHeader="true".
|
||||
If the specified header was not found, the system will fall back to the client host address as provided by the Request object.-->
|
||||
<Property Name="ClientHostAddressHeaderName" Value="X-Forwarded-For"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
</Components>
|
||||
</HostComponents>
|
||||
|
||||
@@ -1,31 +1,50 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
|
||||
<configSections>
|
||||
<section name="autofac" type="Autofac.Configuration.SectionHandler, Autofac.Configuration"/>
|
||||
</configSections>
|
||||
<configSections>
|
||||
<section name="autofac" type="Autofac.Configuration.SectionHandler, Autofac.Configuration"/>
|
||||
</configSections>
|
||||
|
||||
<autofac defaultAssembly="Orchard.Framework">
|
||||
|
||||
<autofac defaultAssembly="Orchard.Framework">
|
||||
|
||||
<!--
|
||||
To create tenant specific configurations, copy this file to ~/Congig/Sites.{tenant}.config
|
||||
To create tenant specific configurations, copy this file to ~/Config/Sites.{tenant}.config
|
||||
where {tenant} is the technical name of the targetted tenant
|
||||
|
||||
Allowed scopes: per-dependency, single-instance or per-lifetime-scope
|
||||
|
||||
-->
|
||||
|
||||
|
||||
<components>
|
||||
<!--
|
||||
Uncomment to use ReadUncommitted as the default isolation level. Please not that
|
||||
Sql Server Ce doesn't support ReadUncommitted.
|
||||
-->
|
||||
<!--
|
||||
<component instance-scope="per-lifetime-scope"
|
||||
type="Orchard.Data.SessionLocator, Orchard.Framework"
|
||||
service="Orchard.Data.ISessionLocator">
|
||||
<properties>
|
||||
<property name="IsolationLevel" value="ReadUncommitted" />
|
||||
</properties>
|
||||
</component>
|
||||
-->
|
||||
</components>
|
||||
</autofac>
|
||||
Uncomment to use ReadUncommitted as the default isolation level. Please not that
|
||||
Sql Server Ce doesn't support ReadUncommitted.
|
||||
|
||||
</configuration>
|
||||
Isolation level for all database transaction.
|
||||
See http://msdn.microsoft.com/en-us/library/system.transactions.isolationlevel.aspx
|
||||
-->
|
||||
<!--
|
||||
<component instance-scope="per-lifetime-scope"
|
||||
type="Orchard.Data.SessionLocator, Orchard.Framework"
|
||||
service="Orchard.Data.ISessionLocator">
|
||||
<properties>
|
||||
<property name="IsolationLevel" value="ReadUncommitted" />
|
||||
</properties>
|
||||
</component>
|
||||
-->
|
||||
|
||||
<!--
|
||||
Delay between background services executions
|
||||
<component instance-scope="single-instance"
|
||||
type="Orchard.Tasks.SweepGenerator"
|
||||
service="Orchard.Tasks.ISweepGenerator">
|
||||
<properties>
|
||||
<property name="Interval" value="00:01:00" />
|
||||
</properties>
|
||||
</component>
|
||||
-->
|
||||
</components>
|
||||
</autofac>
|
||||
|
||||
</configuration>
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
<IISExpressWindowsAuthentication />
|
||||
<IISExpressUseClassicPipelineMode />
|
||||
<TargetFrameworkProfile />
|
||||
<UseGlobalApplicationHostFile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@@ -90,13 +91,13 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\windowsazure\Microsoft.WindowsAzure.Configuration.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.WindowsAzure.Diagnostics">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<Reference Include="Microsoft.WindowsAzure.Diagnostics, Version=2.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
|
||||
<HintPath>..\..\..\lib\windowsazure\Microsoft.WindowsAzure.Diagnostics.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.WindowsAzure.ServiceRuntime">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<Reference Include="Microsoft.WindowsAzure.ServiceRuntime, Version=2.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
|
||||
<HintPath>..\..\..\lib\windowsazure\Microsoft.WindowsAzure.ServiceRuntime.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.WindowsAzure.Storage">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
@@ -181,10 +182,6 @@
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="WebMatrix.Data">
|
||||
<HintPath>..\..\..\lib\aspnetmvc\WebMatrix.Data.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Global.asax.cs">
|
||||
@@ -564,6 +561,23 @@
|
||||
<Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
|
||||
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(WebProjectOutputDir)" />
|
||||
</Target>
|
||||
<Target Name="DeleteDebugFiles" AfterTargets="AfterBuild">
|
||||
<RemoveDir Directories="Themes;Core;Modules" />
|
||||
</Target>
|
||||
<Target Name="CopyDebugFiles" AfterTargets="DeleteDebugFiles" Condition="'$(Configuration)' == 'Debug'">
|
||||
<PropertyGroup>
|
||||
<SrcFolder>..\..</SrcFolder>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Excluded Include="$(SrcFolder)\**\bin\**\*;$(SrcFolder)\**\obj\**\*;$(SrcFolder)\**\*.user;$(SrcFolder)\**\*.cs;$(SrcFolder)\**\*.csproj;$(SrcFolder)\**\.hg\**\*" />
|
||||
<Src-Themes Include="$(SrcFolder)\Orchard.Web\Themes\**\*" Exclude="@(Excluded)" />
|
||||
<Src-Core Include="$(SrcFolder)\Orchard.Web\Core\**\*" Exclude="@(Excluded)" />
|
||||
<Src-Modules Include="$(SrcFolder)\Orchard.Web\Modules\**\*" Exclude="@(Excluded)" />
|
||||
</ItemGroup>
|
||||
<Copy SourceFiles="@(Src-Themes)" DestinationFolder="Themes\%(RecursiveDir)" />
|
||||
<Copy SourceFiles="@(Src-Core)" DestinationFolder="Core\%(RecursiveDir)" />
|
||||
<Copy SourceFiles="@(Src-Modules)" DestinationFolder="Modules\%(RecursiveDir)" />
|
||||
</Target>
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
||||
@@ -583,6 +597,11 @@
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>del "$(TargetDir)\Modules"
|
||||
del "$(TargetDir)\Themes"
|
||||
del "$(TargetDir)\Media"</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
|
||||
@@ -42,8 +42,9 @@
|
||||
<system.diagnostics>
|
||||
<trace>
|
||||
<listeners>
|
||||
<add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=2.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="AzureDiagnostics">
|
||||
<filter type=""/>
|
||||
<add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=2.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
|
||||
name="AzureDiagnostics">
|
||||
<filter type="" />
|
||||
</add>
|
||||
</listeners>
|
||||
</trace>
|
||||
@@ -147,7 +148,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.0.0"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35"/>
|
||||
@@ -191,19 +192,19 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.WindowsAzure.Storage" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.0.2.0" newVersion="5.0.2.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.6.3.0" newVersion="5.6.3.0"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.6.3.0" newVersion="5.6.3.0"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Data.Services.Client" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.6.3.0" newVersion="5.6.3.0"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0"/>
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2013
|
||||
VisualStudioVersion = 12.0.31101.0
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.23107.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Modules", "Modules", "{8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}"
|
||||
EndProject
|
||||
|
||||
@@ -20,6 +20,7 @@ using Orchard.DisplayManagement.Implementation;
|
||||
using Orchard.Environment;
|
||||
using Orchard.Environment.Extensions;
|
||||
using Orchard.Security;
|
||||
using Orchard.Tests.ContentManagement;
|
||||
using Orchard.Tests.Modules;
|
||||
using Orchard.Tests.Stubs;
|
||||
using Orchard.UI.Notify;
|
||||
@@ -35,7 +36,6 @@ namespace Orchard.Core.Tests.Body {
|
||||
builder.RegisterType<Signals>().As<ISignals>();
|
||||
builder.RegisterType<DefaultContentManagerSession>().As<IContentManagerSession>();
|
||||
builder.RegisterInstance(new Mock<IContentDefinitionManager>().Object);
|
||||
builder.RegisterInstance(new Mock<ITransactionManager>().Object);
|
||||
builder.RegisterInstance(new Mock<IAuthorizer>().Object);
|
||||
builder.RegisterInstance(new Mock<INotifier>().Object);
|
||||
builder.RegisterInstance(new Mock<IContentDisplay>().Object);
|
||||
|
||||
@@ -85,6 +85,7 @@
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\lib\sqlce\System.Data.SqlServerCe.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
|
||||
@@ -30,5 +30,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.9.1")]
|
||||
[assembly: AssemblyFileVersion("1.9.1")]
|
||||
[assembly: AssemblyVersion("1.9.2")]
|
||||
[assembly: AssemblyFileVersion("1.9.2")]
|
||||
|
||||
@@ -35,7 +35,6 @@ namespace Orchard.Core.Tests.Scheduling {
|
||||
public override void Register(ContainerBuilder builder) {
|
||||
_handler = new StubTaskHandler();
|
||||
builder.RegisterInstance(new Mock<IOrchardServices>().Object);
|
||||
builder.RegisterInstance(new Mock<ITransactionManager>().Object);
|
||||
builder.RegisterType<DefaultContentManager>().As<IContentManager>();
|
||||
builder.RegisterType<StubCacheManager>().As<ICacheManager>();
|
||||
builder.RegisterType<Signals>().As<ISignals>();
|
||||
|
||||
@@ -13,6 +13,7 @@ using Orchard.Core.Settings.Metadata;
|
||||
using Orchard.Core.Settings.Metadata.Records;
|
||||
using Orchard.Data;
|
||||
using Orchard.Tests;
|
||||
using Orchard.Tests.ContentManagement;
|
||||
using Orchard.Tests.Stubs;
|
||||
using Orchard.Tests.Utility;
|
||||
|
||||
@@ -23,6 +24,7 @@ namespace Orchard.Core.Tests.Settings.Metadata {
|
||||
private ISessionFactory _sessionFactory;
|
||||
private ISession _session;
|
||||
private IContainer _container;
|
||||
private ITransactionManager _transactionManager;
|
||||
|
||||
[TestFixtureSetUp]
|
||||
public void InitFixture() {
|
||||
@@ -39,6 +41,17 @@ namespace Orchard.Core.Tests.Settings.Metadata {
|
||||
|
||||
[SetUp]
|
||||
public void Init() {
|
||||
_session = _sessionFactory.OpenSession();
|
||||
foreach (var killType in new[] { typeof(ContentTypeDefinitionRecord), typeof(ContentPartDefinitionRecord), typeof(ContentFieldDefinitionRecord) }) {
|
||||
foreach (var killRecord in _session.CreateCriteria(killType).List()) {
|
||||
_session.Delete(killRecord);
|
||||
}
|
||||
}
|
||||
_session.Flush();
|
||||
_session.Close();
|
||||
_session.Dispose();
|
||||
_session = _sessionFactory.OpenSession();
|
||||
|
||||
var builder = new ContainerBuilder();
|
||||
builder.RegisterAutoMocking();
|
||||
builder.RegisterType<ContentDefinitionManager>().As<IContentDefinitionManager>();
|
||||
@@ -48,25 +61,15 @@ namespace Orchard.Core.Tests.Settings.Metadata {
|
||||
builder.RegisterType<StubCacheManager>().As<ICacheManager>();
|
||||
builder.RegisterType<StubParallelCacheContext>().As<IParallelCacheContext>();
|
||||
|
||||
_session = _sessionFactory.OpenSession();
|
||||
builder.RegisterInstance(_transactionManager = new TestTransactionManager(_session)).As<ITransactionManager>();
|
||||
|
||||
_container = builder.Build();
|
||||
|
||||
_container.Mock<ISessionLocator>()
|
||||
.Setup(x => x.For(It.IsAny<Type>()))
|
||||
.Returns(() => _session);
|
||||
|
||||
_session = _sessionFactory.OpenSession();
|
||||
foreach (var killType in new[] { typeof(ContentTypeDefinitionRecord), typeof(ContentPartDefinitionRecord), typeof(ContentFieldDefinitionRecord) }) {
|
||||
foreach (var killRecord in _session.CreateCriteria(killType).List()) {
|
||||
_session.Delete(killRecord);
|
||||
}
|
||||
}
|
||||
_session.Flush();
|
||||
}
|
||||
|
||||
void ResetSession() {
|
||||
_session.Flush();
|
||||
_session.Dispose();
|
||||
_session = _sessionFactory.OpenSession();
|
||||
_transactionManager.RequireNew();
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
|
||||
@@ -30,5 +30,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.9.1")]
|
||||
[assembly: AssemblyFileVersion("1.9.1")]
|
||||
[assembly: AssemblyVersion("1.9.2")]
|
||||
[assembly: AssemblyFileVersion("1.9.2")]
|
||||
|
||||
@@ -93,13 +93,14 @@ namespace Orchard.Specs.Bindings {
|
||||
_webHost = new WebHost(_orchardTemp);
|
||||
Host.Initialize(siteFolder, virtualDirectory ?? "/", _dynamicCompilationOption);
|
||||
var shuttle = new Shuttle();
|
||||
Host.Execute(() => {
|
||||
log4net.Config.BasicConfigurator.Configure(new CastleAppender());
|
||||
HostingTraceListener.SetHook(msg => shuttle._sink.Receive(msg));
|
||||
});
|
||||
Host.Execute(() => Executor(shuttle));
|
||||
_messages = shuttle._sink;
|
||||
}
|
||||
|
||||
private static void Executor(Shuttle shuttle) {
|
||||
HostingTraceListener.SetHook(msg => shuttle._sink.Receive(msg));
|
||||
}
|
||||
|
||||
private class CastleAppender : IAppender {
|
||||
public void Close() { }
|
||||
public string Name { get; set; }
|
||||
|
||||
@@ -203,7 +203,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.WindowsAzure.Storage" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.0.2.0" newVersion="5.0.2.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace Orchard.Specs.Hosting {
|
||||
TargetInstance = Activator.CreateInstance(classType);
|
||||
|
||||
foreach (FieldInfo field in classType.GetFields()) {
|
||||
if (typeof (Delegate).IsAssignableFrom(field.FieldType))
|
||||
if (typeof (TDelegate).IsAssignableFrom(field.FieldType))
|
||||
//If the field is a delegate
|
||||
field.SetValue(TargetInstance, ((SerializableDelegate<TDelegate>)info.GetValue(field.Name, typeof(SerializableDelegate<TDelegate>))).Delegate);
|
||||
else if (!field.FieldType.IsSerializable)
|
||||
@@ -86,8 +86,12 @@ namespace Orchard.Specs.Hosting {
|
||||
|
||||
foreach (FieldInfo field in targetType.GetFields()) {
|
||||
//See corresponding comments above
|
||||
if (typeof (Delegate).IsAssignableFrom(field.FieldType))
|
||||
info.AddValue(field.Name, new SerializableDelegate<TDelegate>((TDelegate)field.GetValue(TargetInstance)));
|
||||
if (typeof (TDelegate).IsAssignableFrom(field.FieldType)) {
|
||||
var value = (TDelegate)field.GetValue(TargetInstance);
|
||||
if (value != null) {
|
||||
info.AddValue(field.Name, new SerializableDelegate<TDelegate>(value));
|
||||
}
|
||||
}
|
||||
else if (!field.FieldType.IsSerializable)
|
||||
info.AddValue(field.Name, new AnonymousClassWrapper(field.FieldType, field.GetValue(TargetInstance)));
|
||||
else
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.WindowsAzure.Storage" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.0.2.0" newVersion="5.0.2.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
|
||||
|
||||
@@ -30,5 +30,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.9.1")]
|
||||
[assembly: AssemblyFileVersion("1.9.1")]
|
||||
[assembly: AssemblyVersion("1.9.2")]
|
||||
[assembly: AssemblyFileVersion("1.9.2")]
|
||||
|
||||
@@ -51,7 +51,6 @@ namespace Orchard.Tests.Modules.Comments.Services {
|
||||
builder.RegisterType<Signals>().As<ISignals>();
|
||||
builder.RegisterType<DefaultContentManagerSession>().As<IContentManagerSession>();
|
||||
builder.RegisterInstance(new Mock<IContentDefinitionManager>().Object);
|
||||
builder.RegisterInstance(new Mock<ITransactionManager>().Object);
|
||||
builder.RegisterInstance(new Mock<IAuthorizer>().Object);
|
||||
builder.RegisterInstance(new Mock<INotifier>().Object);
|
||||
builder.RegisterInstance(new Mock<IContentDisplay>().Object);
|
||||
|
||||
@@ -12,6 +12,7 @@ using Orchard.ContentManagement.Handlers;
|
||||
using Orchard.Data;
|
||||
using Orchard.Environment.Configuration;
|
||||
using Orchard.Services;
|
||||
using Orchard.Tests.ContentManagement;
|
||||
using Orchard.Tests.Data;
|
||||
using Orchard.Tests.Stubs;
|
||||
|
||||
@@ -52,6 +53,7 @@ namespace Orchard.Tests.Modules {
|
||||
builder.RegisterInstance(_clock).As<IClock>();
|
||||
builder.RegisterGeneric(typeof(Repository<>)).As(typeof(IRepository<>));
|
||||
builder.RegisterInstance(new ShellSettings { Name = ShellSettings.DefaultName, DataProvider = "SqlCe" });
|
||||
builder.RegisterInstance(new TestTransactionManager(_session)).As<ITransactionManager>();
|
||||
Register(builder);
|
||||
_container = builder.Build();
|
||||
|
||||
@@ -61,11 +63,6 @@ namespace Orchard.Tests.Modules {
|
||||
public void Cleanup() {
|
||||
if(_container != null)
|
||||
_container.Dispose();
|
||||
|
||||
_transaction.Commit();
|
||||
|
||||
if(_session != null)
|
||||
_session.Close();
|
||||
}
|
||||
|
||||
public abstract void Register(ContainerBuilder builder);
|
||||
|
||||
@@ -264,9 +264,6 @@ namespace Orchard.Tests.Modules.DesignerTools.Services
|
||||
new JProperty("name", "TestingPart"),
|
||||
new JProperty("value", "ContentPart"),
|
||||
new JProperty("children", new JArray(
|
||||
new JObject(
|
||||
new JProperty("name", "Zones"),
|
||||
new JProperty("value", "ZoneCollection")),
|
||||
new JObject(
|
||||
new JProperty("name", "Id"),
|
||||
new JProperty("value", "0")),
|
||||
@@ -327,9 +324,6 @@ namespace Orchard.Tests.Modules.DesignerTools.Services
|
||||
new JProperty("name", "TestingPart"),
|
||||
new JProperty("value", "ContentPart"),
|
||||
new JProperty("children", new JArray(
|
||||
new JObject(
|
||||
new JProperty("name", "Zones"),
|
||||
new JProperty("value", "ZoneCollection")),
|
||||
new JObject(
|
||||
new JProperty("name", "Id"),
|
||||
new JProperty("value", "0")),
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace Orchard.Tests.Modules.ImportExport.Services {
|
||||
builder.RegisterInstance(new Mock<ISettingsFormatter>().Object);
|
||||
builder.RegisterInstance(new Mock<IRecipeExecuteEventHandler>().Object);
|
||||
_session = _sessionFactory.OpenSession();
|
||||
builder.RegisterInstance(new DefaultContentManagerTests.TestSessionLocator(_session)).As<ISessionLocator>();
|
||||
builder.RegisterInstance(new TestTransactionManager(_session)).As<ITransactionManager>();
|
||||
|
||||
_container = builder.Build();
|
||||
_importExportService = _container.Resolve<IImportExportService>();
|
||||
|
||||
@@ -75,7 +75,6 @@ namespace Orchard.Tests.Modules.Indexing {
|
||||
builder.RegisterInstance(new Mock<IContentDisplay>().Object);
|
||||
|
||||
builder.RegisterType<DefaultContentManagerSession>().As<IContentManagerSession>();
|
||||
builder.RegisterInstance(new Mock<ITransactionManager>().Object);
|
||||
builder.RegisterInstance(new Mock<IAuthorizer>().Object);
|
||||
builder.RegisterType<OrchardServices>().As<IOrchardServices>();
|
||||
|
||||
|
||||
@@ -303,5 +303,24 @@ namespace Orchard.Tests.Modules.Indexing {
|
||||
_provider.Store("default", _provider.New(1).Add("field", "value2"));
|
||||
Assert.That(searchBuilder.WithField("id", "1").Count(), Is.EqualTo(1));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void IndexProviderShouldDeleteMoreThanMaxTermsCount() {
|
||||
_provider.CreateIndex("default");
|
||||
|
||||
var documents = Enumerable.Range(1, 1025).Select(i => _provider.New(i).Add("field", "value1"));
|
||||
_provider.Store("default", documents);
|
||||
|
||||
var searchBuilder = _provider.CreateSearchBuilder("default");
|
||||
|
||||
Assert.That(searchBuilder.Count(), Is.EqualTo(1025));
|
||||
Assert.That(searchBuilder.Get(1).ContentItemId, Is.EqualTo(1));
|
||||
Assert.That(searchBuilder.Get(1025).ContentItemId, Is.EqualTo(1025));
|
||||
|
||||
_provider.Delete("default", Enumerable.Range(1, 1025));
|
||||
|
||||
|
||||
Assert.That(searchBuilder.Count(), Is.EqualTo(0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ namespace Orchard.Tests.Modules.Migrations {
|
||||
builder.RegisterType<StubHostEnvironment>().As<IHostEnvironment>();
|
||||
|
||||
_session = _sessionFactory.OpenSession();
|
||||
builder.RegisterInstance(new DefaultContentManagerTests.TestSessionLocator(_session)).As<ISessionLocator>();
|
||||
builder.RegisterInstance(new TestTransactionManager(_session)).As<ITransactionManager>();
|
||||
|
||||
builder.RegisterInstance(new ShellBlueprint());
|
||||
|
||||
|
||||
@@ -30,5 +30,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.9.1")]
|
||||
[assembly: AssemblyFileVersion("1.9.1")]
|
||||
[assembly: AssemblyVersion("1.9.2")]
|
||||
[assembly: AssemblyFileVersion("1.9.2")]
|
||||
|
||||
@@ -98,23 +98,23 @@ namespace Orchard.Tests.Modules.Recipes.Services {
|
||||
|
||||
[Test]
|
||||
public void HarvestRecipesFailsToFindRecipesWhenCalledWithNotExistingExtension() {
|
||||
var recipes = (List<Recipe>) _recipeHarvester.HarvestRecipes("cantfindme");
|
||||
var recipes = _recipeHarvester.HarvestRecipes("cantfindme");
|
||||
|
||||
Assert.That(recipes.Count, Is.EqualTo(0));
|
||||
Assert.That(recipes.Count(), Is.EqualTo(0));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void HarvestRecipesShouldHarvestRecipeXmlFiles() {
|
||||
var recipes = (List<Recipe>)_recipeHarvester.HarvestRecipes("Sample1");
|
||||
Assert.That(recipes.Count, Is.EqualTo(1));
|
||||
var recipes = _recipeHarvester.HarvestRecipes("Sample1");
|
||||
Assert.That(recipes.Count(), Is.EqualTo(1));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ParseRecipeLoadsRecipeMetaDataIntoModel() {
|
||||
var recipes = (List<Recipe>) _recipeHarvester.HarvestRecipes("Sample1");
|
||||
Assert.That(recipes.Count, Is.EqualTo(1));
|
||||
var recipes = _recipeHarvester.HarvestRecipes("Sample1");
|
||||
Assert.That(recipes.Count(), Is.EqualTo(1));
|
||||
|
||||
var sampleRecipe = recipes[0];
|
||||
var sampleRecipe = recipes.First();
|
||||
Assert.That(sampleRecipe.Name, Is.EqualTo("cms"));
|
||||
Assert.That(sampleRecipe.Description, Is.EqualTo("a sample Orchard recipe describing a cms"));
|
||||
Assert.That(sampleRecipe.Author, Is.EqualTo("orchard"));
|
||||
|
||||
@@ -74,7 +74,6 @@ namespace Orchard.Tests.Modules.Users.Controllers {
|
||||
builder.RegisterType<UserPartHandler>().As<IContentHandler>();
|
||||
builder.RegisterType<OrchardServices>().As<IOrchardServices>();
|
||||
|
||||
builder.RegisterInstance(new DefaultContentManagerTests.TestSessionLocator(_session)).As<ITransactionManager>();
|
||||
builder.RegisterInstance(new Work<IEnumerable<IShapeTableEventHandler>>(resolve => _container.Resolve<IEnumerable<IShapeTableEventHandler>>())).AsSelf();
|
||||
builder.RegisterType<DefaultShapeTableManager>().As<IShapeTableManager>();
|
||||
builder.RegisterType<DefaultShapeFactory>().As<IShapeFactory>();
|
||||
|
||||
@@ -30,6 +30,7 @@ using Orchard.UI.PageClass;
|
||||
using Orchard.Users.Handlers;
|
||||
using Orchard.Users.Models;
|
||||
using Orchard.Users.Services;
|
||||
using Orchard.Tests.ContentManagement;
|
||||
|
||||
namespace Orchard.Tests.Modules.Users.Services {
|
||||
[TestFixture]
|
||||
@@ -39,19 +40,6 @@ namespace Orchard.Tests.Modules.Users.Services {
|
||||
private ISession _session;
|
||||
private IContainer _container;
|
||||
|
||||
|
||||
public class TestSessionLocator : ISessionLocator {
|
||||
private readonly ISession _session;
|
||||
|
||||
public TestSessionLocator(ISession session) {
|
||||
_session = session;
|
||||
}
|
||||
|
||||
public ISession For(Type entityType) {
|
||||
return _session;
|
||||
}
|
||||
}
|
||||
|
||||
[TestFixtureSetUp]
|
||||
public void InitFixture() {
|
||||
var databaseFileName = System.IO.Path.GetTempFileName();
|
||||
@@ -94,11 +82,18 @@ namespace Orchard.Tests.Modules.Users.Services {
|
||||
builder.RegisterType<InfosetHandler>().As<IContentHandler>();
|
||||
|
||||
_session = _sessionFactory.OpenSession();
|
||||
builder.RegisterInstance(new TestSessionLocator(_session)).As<ISessionLocator>();
|
||||
builder.RegisterInstance(new TestTransactionManager(_session)).As<ITransactionManager>();
|
||||
|
||||
_container = builder.Build();
|
||||
_membershipService = _container.Resolve<IMembershipService>();
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
public void Cleanup() {
|
||||
if (_container != null)
|
||||
_container.Dispose();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CreateUserShouldAllocateModelAndCreateRecords() {
|
||||
var user = _membershipService.CreateUser(new CreateUserParams("a", "b", "c", null, null, true));
|
||||
|
||||
@@ -34,6 +34,7 @@ using Orchard.Users.Services;
|
||||
using Orchard.Services;
|
||||
using Orchard.Tests.Messaging;
|
||||
using Orchard.Tests.Modules.Stubs;
|
||||
using Orchard.Tests.ContentManagement;
|
||||
|
||||
namespace Orchard.Tests.Modules.Users.Services {
|
||||
[TestFixture]
|
||||
@@ -47,19 +48,6 @@ namespace Orchard.Tests.Modules.Users.Services {
|
||||
private IContainer _container;
|
||||
private CultureInfo _currentCulture;
|
||||
|
||||
|
||||
public class TestSessionLocator : ISessionLocator {
|
||||
private readonly ISession _session;
|
||||
|
||||
public TestSessionLocator(ISession session) {
|
||||
_session = session;
|
||||
}
|
||||
|
||||
public ISession For(Type entityType) {
|
||||
return _session;
|
||||
}
|
||||
}
|
||||
|
||||
[TestFixtureSetUp]
|
||||
public void InitFixture() {
|
||||
_currentCulture = Thread.CurrentThread.CurrentCulture;
|
||||
@@ -109,9 +97,8 @@ namespace Orchard.Tests.Modules.Users.Services {
|
||||
builder.RegisterInstance(ShellSettingsUtility.CreateEncryptionEnabled());
|
||||
|
||||
_session = _sessionFactory.OpenSession();
|
||||
_session.BeginTransaction();
|
||||
builder.RegisterInstance(new TestTransactionManager(_session)).As<ITransactionManager>();
|
||||
|
||||
builder.RegisterInstance(new TestSessionLocator(_session)).As<ISessionLocator>();
|
||||
_container = builder.Build();
|
||||
_membershipService = _container.Resolve<IMembershipService>();
|
||||
_userService = _container.Resolve<IUserService>();
|
||||
@@ -119,8 +106,8 @@ namespace Orchard.Tests.Modules.Users.Services {
|
||||
|
||||
[TearDown]
|
||||
public void TearDown() {
|
||||
_session.Transaction.Commit();
|
||||
_session.Transaction.Dispose();
|
||||
if (_container != null)
|
||||
_container.Dispose();
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
@@ -93,7 +93,6 @@ namespace Orchard.Tests.Modules.Widgets.Services {
|
||||
builder.RegisterType<Signals>().As<ISignals>();
|
||||
builder.RegisterType<DefaultContentManagerSession>().As<IContentManagerSession>();
|
||||
builder.RegisterInstance(new Mock<IContentDefinitionManager>().Object);
|
||||
builder.RegisterInstance(new Mock<ITransactionManager>().Object);
|
||||
builder.RegisterInstance(new Mock<IAuthorizer>().Object);
|
||||
builder.RegisterInstance(new Mock<INotifier>().Object);
|
||||
builder.RegisterInstance(mockFeatureManager.Object);
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using Autofac;
|
||||
using NUnit.Framework;
|
||||
using Orchard.Caching;
|
||||
@@ -78,6 +80,42 @@ namespace Orchard.Tests.Caching {
|
||||
Is.Not.SameAs(c2.CacheManager.GetCache<string, string>()));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CacheManagerIsNotBlocking() {
|
||||
var hits = 0;
|
||||
string result = "";
|
||||
|
||||
Enumerable.Range(0, 5).AsParallel().ForAll(x =>
|
||||
result = _cacheManager.Get("testItem", ctx => {
|
||||
// by waiting for 100ms we expect all the calls to Get
|
||||
// to enter this lambda
|
||||
Thread.Sleep(100);
|
||||
hits++;
|
||||
return "testResult";
|
||||
})
|
||||
);
|
||||
|
||||
Assert.That(result, Is.EqualTo("testResult"));
|
||||
Assert.That(hits, Is.GreaterThan(1));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CacheManagerIsBlocking() {
|
||||
var hits = 0;
|
||||
string result = "";
|
||||
|
||||
Enumerable.Range(0, 5).AsParallel().ForAll(x =>
|
||||
result = _cacheManager.Get("testItem", true, ctx => {
|
||||
Thread.Sleep(100);
|
||||
hits++;
|
||||
return "testResult";
|
||||
})
|
||||
);
|
||||
|
||||
Assert.That(result, Is.EqualTo("testResult"));
|
||||
Assert.That(hits, Is.EqualTo(1));
|
||||
}
|
||||
|
||||
class ComponentOne {
|
||||
public ICacheManager CacheManager { get; set; }
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ namespace Orchard.Tests.ContentManagement {
|
||||
private IContentManager _manager;
|
||||
private ISessionFactory _sessionFactory;
|
||||
private ISession _session;
|
||||
private ITransactionManager _transactionManager;
|
||||
|
||||
[TestFixtureSetUp]
|
||||
public void InitFixture() {
|
||||
@@ -74,7 +75,7 @@ namespace Orchard.Tests.ContentManagement {
|
||||
builder.RegisterType<DefaultContentDisplay>().As<IContentDisplay>();
|
||||
|
||||
_session = _sessionFactory.OpenSession();
|
||||
builder.RegisterInstance(new DefaultContentManagerTests.TestSessionLocator(_session)).As<ISessionLocator>();
|
||||
builder.RegisterInstance(_transactionManager = new TestTransactionManager(_session)).As<ITransactionManager>();
|
||||
|
||||
_session.Delete(string.Format("from {0}", typeof(GammaRecord).FullName));
|
||||
_session.Delete(string.Format("from {0}", typeof(DeltaRecord).FullName));
|
||||
@@ -82,14 +83,19 @@ namespace Orchard.Tests.ContentManagement {
|
||||
_session.Delete(string.Format("from {0}", typeof(ContentItemVersionRecord).FullName));
|
||||
_session.Delete(string.Format("from {0}", typeof(ContentItemRecord).FullName));
|
||||
_session.Delete(string.Format("from {0}", typeof(ContentTypeRecord).FullName));
|
||||
_session.Flush();
|
||||
_session.Clear();
|
||||
_transactionManager.RequireNew();
|
||||
|
||||
_container = builder.Build();
|
||||
_manager = _container.Resolve<IContentManager>();
|
||||
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
public void Cleanup() {
|
||||
if (_container != null)
|
||||
_container.Dispose();
|
||||
}
|
||||
|
||||
private List<IContent> AddSampleData() {
|
||||
var items = new List<IContent> {
|
||||
_manager.Create<AlphaPart>("alpha", init => { }),
|
||||
@@ -98,7 +104,7 @@ namespace Orchard.Tests.ContentManagement {
|
||||
_manager.Create<DeltaPart>("delta", init => { init.Record.Quux = "the quux value"; })
|
||||
};
|
||||
|
||||
_session.Flush();
|
||||
_transactionManager.RequireNew();
|
||||
|
||||
return items;
|
||||
}
|
||||
@@ -212,7 +218,7 @@ namespace Orchard.Tests.ContentManagement {
|
||||
var twoId = _manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "two"; }).ContentItem.Id;
|
||||
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "three"; });
|
||||
var fourId = _manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "four"; }).ContentItem.Id;
|
||||
_session.Flush();
|
||||
_transactionManager.RequireNew();
|
||||
|
||||
|
||||
var two = _manager.Query()
|
||||
@@ -239,7 +245,7 @@ namespace Orchard.Tests.ContentManagement {
|
||||
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "two"; });
|
||||
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "three"; });
|
||||
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "four"; });
|
||||
_session.Flush();
|
||||
_transactionManager.RequireNew();
|
||||
|
||||
var twoOrFour = _manager.Query<GammaPart, GammaRecord>()
|
||||
.Where(x => x.Frap == "one" || x.Frap == "four")
|
||||
@@ -271,8 +277,7 @@ namespace Orchard.Tests.ContentManagement {
|
||||
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "two"; });
|
||||
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "three"; });
|
||||
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "four"; });
|
||||
_session.Flush();
|
||||
_session.Clear();
|
||||
_transactionManager.RequireNew();
|
||||
|
||||
var ascending = _manager.Query("gamma")
|
||||
.OrderBy<GammaRecord>(x => x.Frap)
|
||||
@@ -282,7 +287,7 @@ namespace Orchard.Tests.ContentManagement {
|
||||
Assert.That(ascending.First().Record.Frap, Is.EqualTo("four"));
|
||||
Assert.That(ascending.Last().Record.Frap, Is.EqualTo("two"));
|
||||
|
||||
_session.Clear();
|
||||
_transactionManager.RequireNew();
|
||||
|
||||
var descending = _manager.Query<GammaPart, GammaRecord>()
|
||||
.OrderByDescending(x => x.Frap)
|
||||
@@ -300,7 +305,7 @@ namespace Orchard.Tests.ContentManagement {
|
||||
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "two"; });
|
||||
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "three"; });
|
||||
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "four"; });
|
||||
_session.Flush();
|
||||
_transactionManager.RequireNew();
|
||||
|
||||
var reverseById = _manager.Query()
|
||||
.OrderByDescending<GammaRecord>(x => x.Id)
|
||||
@@ -346,8 +351,7 @@ namespace Orchard.Tests.ContentManagement {
|
||||
init.Record.Frap = "four";
|
||||
init.As<EpsilonPart>().Record.Quad = "4";
|
||||
});
|
||||
_session.Flush();
|
||||
_session.Clear();
|
||||
_transactionManager.RequireNew();
|
||||
|
||||
var results = _manager.Query<EpsilonPart, EpsilonRecord>()
|
||||
.Where(x => x.Quad == "2" || x.Quad == "3")
|
||||
@@ -365,21 +369,18 @@ namespace Orchard.Tests.ContentManagement {
|
||||
init.As<GammaPart>().Record.Frap = "one";
|
||||
init.As<EpsilonPart>().Record.Quad = "v1";
|
||||
});
|
||||
_session.Flush();
|
||||
_session.Clear();
|
||||
_transactionManager.RequireNew();
|
||||
|
||||
var gamma2 = _manager.Get(gamma1.Id, VersionOptions.DraftRequired);
|
||||
gamma2.As<GammaPart>().Record.Frap = "two";
|
||||
gamma2.As<EpsilonPart>().Record.Quad = "v2";
|
||||
_session.Flush();
|
||||
_session.Clear();
|
||||
_transactionManager.RequireNew();
|
||||
|
||||
var gamma3 = _manager.Create<ContentItem>("gamma", init => {
|
||||
init.As<GammaPart>().Record.Frap = "three";
|
||||
init.As<EpsilonPart>().Record.Quad = "v3";
|
||||
});
|
||||
_session.Flush();
|
||||
_session.Clear();
|
||||
_transactionManager.RequireNew();
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -562,7 +563,7 @@ namespace Orchard.Tests.ContentManagement {
|
||||
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "two"; });
|
||||
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "three"; });
|
||||
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "four"; });
|
||||
_session.Flush();
|
||||
_transactionManager.RequireNew();
|
||||
|
||||
var result = _manager.Query<GammaPart, GammaRecord>()
|
||||
.Where(x => x.Frap.StartsWith("t"))
|
||||
@@ -579,7 +580,7 @@ namespace Orchard.Tests.ContentManagement {
|
||||
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "two"; });
|
||||
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "three"; });
|
||||
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "four"; });
|
||||
_session.Flush();
|
||||
_transactionManager.RequireNew();
|
||||
|
||||
var result = _manager.Query<GammaPart, GammaRecord>()
|
||||
.Where(x => x.Frap.EndsWith("e"))
|
||||
@@ -596,7 +597,7 @@ namespace Orchard.Tests.ContentManagement {
|
||||
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "two"; });
|
||||
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "three"; });
|
||||
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "four"; });
|
||||
_session.Flush();
|
||||
_transactionManager.RequireNew();
|
||||
|
||||
var result = _manager.Query<GammaPart, GammaRecord>()
|
||||
.Where(x => x.Frap.Contains("o"))
|
||||
|
||||
@@ -86,84 +86,16 @@ namespace Orchard.Tests.ContentManagement {
|
||||
builder.RegisterGeneric(typeof(Repository<>)).As(typeof(IRepository<>));
|
||||
|
||||
_session = _sessionFactory.OpenSession();
|
||||
builder.RegisterInstance(new TestSessionLocator(_session)).As<ISessionLocator>();
|
||||
builder.RegisterInstance(new TestTransactionManager(_session)).As<ITransactionManager>();
|
||||
|
||||
_container = builder.Build();
|
||||
_manager = _container.Resolve<IContentManager>();
|
||||
}
|
||||
|
||||
public class TestSessionLocator : ISessionLocator, ITransactionManager, IDisposable {
|
||||
private readonly ISession _session;
|
||||
private ITransaction _transaction;
|
||||
private bool _cancelled;
|
||||
|
||||
public TestSessionLocator(ISession session) {
|
||||
_session = session;
|
||||
}
|
||||
|
||||
public ISession For(Type entityType) {
|
||||
return _session;
|
||||
}
|
||||
|
||||
void ITransactionManager.Demand() {
|
||||
EnsureSession();
|
||||
|
||||
if (_transaction == null) {
|
||||
_transaction = _session.BeginTransaction(IsolationLevel.ReadCommitted);
|
||||
}
|
||||
}
|
||||
|
||||
void ITransactionManager.RequireNew() {
|
||||
((ITransactionManager)this).RequireNew(IsolationLevel.ReadCommitted);
|
||||
}
|
||||
|
||||
void ITransactionManager.RequireNew(IsolationLevel level) {
|
||||
EnsureSession();
|
||||
|
||||
if (_cancelled) {
|
||||
_transaction.Rollback();
|
||||
_transaction.Dispose();
|
||||
_transaction = null;
|
||||
}
|
||||
else {
|
||||
if (_transaction != null) {
|
||||
_transaction.Commit();
|
||||
}
|
||||
}
|
||||
|
||||
_transaction = _session.BeginTransaction(level);
|
||||
}
|
||||
|
||||
void ITransactionManager.Cancel() {
|
||||
_cancelled = true;
|
||||
}
|
||||
|
||||
void IDisposable.Dispose() {
|
||||
if (_transaction != null) {
|
||||
try {
|
||||
if (!_cancelled) {
|
||||
_transaction.Commit();
|
||||
}
|
||||
else {
|
||||
_transaction.Rollback();
|
||||
}
|
||||
|
||||
_transaction.Dispose();
|
||||
}
|
||||
catch {
|
||||
}
|
||||
finally {
|
||||
_transaction = null;
|
||||
_cancelled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void EnsureSession() {
|
||||
if (_session != null) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
[TearDown]
|
||||
public void Cleanup() {
|
||||
if (_container != null)
|
||||
_container.Dispose();
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
@@ -76,5 +76,39 @@ namespace Orchard.Tests.ContentManagement {
|
||||
|
||||
Assert.That((object)testingPartDynamic, Is.AssignableTo<IEnumerable<ContentPart>>());
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void NullCheckingCanBeDoneOnProperties() {
|
||||
var contentItem = new ContentItem();
|
||||
var contentPart = new ContentPart { TypePartDefinition = new ContentTypePartDefinition(new ContentPartDefinition("FooPart"), new SettingsDictionary()) };
|
||||
var contentField = new ContentField { PartFieldDefinition = new ContentPartFieldDefinition(new ContentFieldDefinition("FooType"), "FooField", new SettingsDictionary()) };
|
||||
|
||||
dynamic item = contentItem;
|
||||
dynamic part = contentPart;
|
||||
|
||||
Assert.That(item.FooPart == null, Is.True);
|
||||
Assert.That(item.FooPart != null, Is.False);
|
||||
|
||||
contentItem.Weld(contentPart);
|
||||
|
||||
Assert.That(item.FooPart == null, Is.False);
|
||||
Assert.That(item.FooPart != null, Is.True);
|
||||
Assert.That(item.FooPart, Is.SameAs(contentPart));
|
||||
|
||||
Assert.That(part.FooField == null, Is.True);
|
||||
Assert.That(part.FooField != null, Is.False);
|
||||
Assert.That(item.FooPart.FooField == null, Is.True);
|
||||
Assert.That(item.FooPart.FooField != null, Is.False);
|
||||
|
||||
contentPart.Weld(contentField);
|
||||
|
||||
Assert.That(part.FooField == null, Is.False);
|
||||
Assert.That(part.FooField != null, Is.True);
|
||||
Assert.That(item.FooPart.FooField == null, Is.False);
|
||||
Assert.That(item.FooPart.FooField != null, Is.True);
|
||||
Assert.That(part.FooField, Is.SameAs(contentField));
|
||||
Assert.That(item.FooPart.FooField, Is.SameAs(contentField));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace Orchard.Tests.ContentManagement {
|
||||
builder.RegisterType<DefaultContentDisplay>().As<IContentDisplay>();
|
||||
|
||||
_session = _sessionFactory.OpenSession();
|
||||
builder.RegisterInstance(new DefaultContentManagerTests.TestSessionLocator(_session)).As<ISessionLocator>();
|
||||
builder.RegisterInstance(new TestTransactionManager(_session)).As<ITransactionManager>();
|
||||
|
||||
_session.Delete(string.Format("from {0}", typeof(GammaRecord).FullName));
|
||||
_session.Delete(string.Format("from {0}", typeof(DeltaRecord).FullName));
|
||||
@@ -88,6 +88,12 @@ namespace Orchard.Tests.ContentManagement {
|
||||
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
public void Cleanup() {
|
||||
if (_container != null)
|
||||
_container.Dispose();
|
||||
}
|
||||
|
||||
private void AddSampleData() {
|
||||
_manager.Create<AlphaPart>("alpha", init => { });
|
||||
_manager.Create<BetaPart>("beta", init => { });
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace Orchard.Tests.ContentManagement {
|
||||
builder.RegisterType<DefaultContentDisplay>().As<IContentDisplay>();
|
||||
|
||||
_session = _sessionFactory.OpenSession();
|
||||
builder.RegisterInstance(new DefaultContentManagerTests.TestSessionLocator(_session)).As<ISessionLocator>();
|
||||
builder.RegisterInstance(new TestTransactionManager(_session)).As<ITransactionManager>();
|
||||
|
||||
_session.Delete(string.Format("from {0}", typeof(GammaRecord).FullName));
|
||||
_session.Delete(string.Format("from {0}", typeof(DeltaRecord).FullName));
|
||||
@@ -97,6 +97,12 @@ namespace Orchard.Tests.ContentManagement {
|
||||
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
public void Cleanup() {
|
||||
if (_container != null)
|
||||
_container.Dispose();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AllDataTypesCanBeQueried() {
|
||||
var dt = DateTime.Now;
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using NHibernate;
|
||||
using Orchard.Data;
|
||||
|
||||
namespace Orchard.Tests.ContentManagement {
|
||||
public class TestTransactionManager : ITransactionManager, IDisposable {
|
||||
private ISession _session;
|
||||
private ITransaction _transaction;
|
||||
private bool _cancelled;
|
||||
|
||||
public TestTransactionManager(ISession session) {
|
||||
_session = session;
|
||||
RequireNew();
|
||||
}
|
||||
|
||||
public void Demand() {
|
||||
EnsureSession();
|
||||
}
|
||||
|
||||
public void RequireNew() {
|
||||
RequireNew(IsolationLevel.ReadCommitted);
|
||||
}
|
||||
|
||||
public void RequireNew(IsolationLevel level) {
|
||||
EnsureSession();
|
||||
|
||||
if (_cancelled) {
|
||||
_transaction.Rollback();
|
||||
_transaction.Dispose();
|
||||
_transaction = null;
|
||||
}
|
||||
else {
|
||||
if (_transaction != null) {
|
||||
_transaction.Commit();
|
||||
}
|
||||
}
|
||||
|
||||
_transaction = _session.BeginTransaction(level);
|
||||
}
|
||||
|
||||
public void Cancel() {
|
||||
_cancelled = true;
|
||||
}
|
||||
|
||||
public void Dispose() {
|
||||
if (_transaction != null) {
|
||||
try {
|
||||
if (!_cancelled) {
|
||||
_transaction.Commit();
|
||||
}
|
||||
else {
|
||||
_transaction.Rollback();
|
||||
}
|
||||
|
||||
_transaction.Dispose();
|
||||
}
|
||||
catch {
|
||||
}
|
||||
finally {
|
||||
_transaction = null;
|
||||
_cancelled = false;
|
||||
}
|
||||
}
|
||||
|
||||
_session.Close();
|
||||
_session.Dispose();
|
||||
_session = null;
|
||||
}
|
||||
|
||||
private void EnsureSession() {
|
||||
if (_session == null) {
|
||||
throw new ArgumentNullException("Session can't be null, ever");
|
||||
}
|
||||
}
|
||||
|
||||
public ISession GetSession() {
|
||||
EnsureSession();
|
||||
|
||||
return _session;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ using System.Linq;
|
||||
using NHibernate;
|
||||
using NUnit.Framework;
|
||||
using Orchard.Data;
|
||||
using Orchard.Tests.ContentManagement;
|
||||
using Orchard.Tests.Records;
|
||||
|
||||
namespace Orchard.Tests.Data {
|
||||
@@ -22,7 +23,7 @@ namespace Orchard.Tests.Data {
|
||||
_databaseFilePath = Path.GetTempFileName();
|
||||
_sessionFactory = DataUtility.CreateSessionFactory(_databaseFilePath, typeof(FooRecord));
|
||||
_session = _sessionFactory.OpenSession();
|
||||
_fooRepos = new Repository<FooRecord>(new StubLocator(_session));
|
||||
_fooRepos = new Repository<FooRecord>(new TestTransactionManager(_session));
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
|
||||
@@ -45,16 +45,22 @@ namespace Orchard.Tests.DataMigration {
|
||||
typeof(ContentTypeRecord));
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
public void InitDb() {
|
||||
foreach ( var record in _repository.Fetch(m => m != null) ) {
|
||||
_repository.Delete(record);
|
||||
}
|
||||
_repository.Flush();
|
||||
|
||||
_transactionManager.RequireNew();
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
public void CleanUp() {
|
||||
if (_container != null)
|
||||
_container.Dispose();
|
||||
}
|
||||
|
||||
public void Init(IEnumerable<Type> dataMigrations) {
|
||||
|
||||
|
||||
var builder = new ContainerBuilder();
|
||||
_folders = new StubFolders();
|
||||
var contentDefinitionManager = new Mock<IContentDefinitionManager>().Object;
|
||||
@@ -73,7 +79,7 @@ namespace Orchard.Tests.DataMigration {
|
||||
builder.RegisterType<StubParallelCacheContext>().As<IParallelCacheContext>();
|
||||
builder.RegisterType<StubAsyncTokenProvider>().As<IAsyncTokenProvider>();
|
||||
_session = _sessionFactory.OpenSession();
|
||||
builder.RegisterInstance(new DefaultContentManagerTests.TestSessionLocator(_session)).As<ISessionLocator>().As<ITransactionManager>();
|
||||
builder.RegisterInstance(new TestTransactionManager(_session)).As<ITransactionManager>();
|
||||
foreach(var type in dataMigrations) {
|
||||
builder.RegisterType(type).As<IDataMigration>();
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace Orchard.Tests.DataMigration {
|
||||
builder.RegisterType<SessionFactoryHolder>().As<ISessionFactoryHolder>();
|
||||
builder.RegisterType<DefaultDatabaseCacheConfiguration>().As<IDatabaseCacheConfiguration>();
|
||||
builder.RegisterType<StubHostEnvironment>().As<IHostEnvironment>();
|
||||
builder.RegisterInstance(new DefaultContentManagerTests.TestSessionLocator(_session)).As<ISessionLocator>();
|
||||
builder.RegisterInstance(new TestTransactionManager(_session)).As<ITransactionManager>();
|
||||
builder.RegisterInstance(new ShellBlueprint { Records = Enumerable.Empty<RecordBlueprint>() }).As<ShellBlueprint>();
|
||||
builder.RegisterInstance(new ShellSettings { Name = "temp", DataProvider = "SqlCe", DataTablePrefix = "TEST" }).As<ShellSettings>();
|
||||
builder.RegisterModule(new DataModule());
|
||||
|
||||
@@ -11,6 +11,7 @@ using Orchard.ContentManagement.Handlers;
|
||||
using Orchard.Data;
|
||||
using Orchard.Environment.Configuration;
|
||||
using Orchard.Services;
|
||||
using Orchard.Tests.ContentManagement;
|
||||
using Orchard.Tests.Data;
|
||||
using Orchard.Tests.Stubs;
|
||||
|
||||
@@ -48,7 +49,8 @@ namespace Orchard.Tests {
|
||||
builder.RegisterInstance(_clock).As<IClock>();
|
||||
builder.RegisterGeneric(typeof(Repository<>)).As(typeof(IRepository<>));
|
||||
builder.RegisterInstance(new ShellSettings { Name = ShellSettings.DefaultName, DataProvider = "SqlCe" });
|
||||
|
||||
builder.RegisterInstance(new TestTransactionManager(_session)).As<ITransactionManager>();
|
||||
|
||||
Register(builder);
|
||||
_container = builder.Build();
|
||||
}
|
||||
@@ -57,9 +59,6 @@ namespace Orchard.Tests {
|
||||
public void Cleanup() {
|
||||
if(_container != null)
|
||||
_container.Dispose();
|
||||
|
||||
if(_session != null)
|
||||
_session.Close();
|
||||
}
|
||||
|
||||
public abstract void Register(ContainerBuilder builder);
|
||||
|
||||
@@ -28,13 +28,6 @@ namespace Orchard.Tests.Environment {
|
||||
container.Mock<IHttpContextAccessor>()
|
||||
.Setup(x => x.Current())
|
||||
.Returns(() => _httpContextCurrent);
|
||||
|
||||
container.Mock<IHttpContextAccessor>()
|
||||
.Setup(x => x.CreateContext(It.IsAny<ILifetimeScope>()))
|
||||
.Returns(() => new StubHttpContext());
|
||||
|
||||
container.Mock<IWorkContextEvents>()
|
||||
.Setup(x => x.Started());
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
@@ -512,7 +512,7 @@ Features:
|
||||
Dependencies: Beta
|
||||
");
|
||||
|
||||
moduleExtensionFolder.Manifests.Add("Classic", @"
|
||||
themeExtensionFolder.Manifests.Add("Classic", @"
|
||||
Name: Classic
|
||||
Version: 1.0.3
|
||||
OrchardVersion: 1
|
||||
|
||||
@@ -160,6 +160,38 @@ namespace Orchard.Tests.Environment.ShellBuilders {
|
||||
public class TestDependency : ITestDependency {
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ComponentsImplementingMultipleContractsAreResolvableOnce() {
|
||||
var settings = CreateSettings();
|
||||
var blueprint = CreateBlueprint(
|
||||
WithDependency<MultipleDependency>()
|
||||
);
|
||||
|
||||
var factory = _container.Resolve<IShellContainerFactory>();
|
||||
var shellContainer = factory.CreateContainer(settings, blueprint);
|
||||
|
||||
var multipleDependency1 = shellContainer.Resolve<IMultipleDependency1>();
|
||||
var multipleDependency2 = shellContainer.Resolve<IMultipleDependency2>();
|
||||
|
||||
Assert.That(multipleDependency1, Is.Not.Null);
|
||||
Assert.That(multipleDependency2, Is.Not.Null);
|
||||
|
||||
Assert.That(multipleDependency1, Is.InstanceOf<MultipleDependency>());
|
||||
Assert.That(multipleDependency2, Is.InstanceOf<MultipleDependency>());
|
||||
|
||||
Assert.True(multipleDependency1 == multipleDependency2);
|
||||
}
|
||||
|
||||
public interface IMultipleDependency1 : IDependency {
|
||||
|
||||
}
|
||||
public interface IMultipleDependency2 : IDependency {
|
||||
|
||||
}
|
||||
public class MultipleDependency : IMultipleDependency1, IMultipleDependency2 {
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ExtraInformationCanDropIntoProperties() {
|
||||
var settings = CreateSettings();
|
||||
|
||||
@@ -56,11 +56,7 @@ namespace Orchard.Tests.Environment.ShellBuilders {
|
||||
|
||||
_container.Mock<IHttpContextAccessor>()
|
||||
.Setup(x => x.Current())
|
||||
.Returns(httpContext);
|
||||
|
||||
_container.Mock<IHttpContextAccessor>()
|
||||
.Setup(x => x.CreateContext(It.IsAny<ILifetimeScope>()))
|
||||
.Returns(httpContext);
|
||||
.Returns(default(HttpContextBase));
|
||||
|
||||
var factory = _container.Resolve<IShellContextFactory>();
|
||||
|
||||
|
||||
@@ -43,10 +43,6 @@ namespace Orchard.Tests.Environment.State {
|
||||
_container.Mock<IHttpContextAccessor>()
|
||||
.Setup(x=>x.Current())
|
||||
.Returns(httpContext);
|
||||
_container.Mock<IHttpContextAccessor>()
|
||||
.Setup(x => x.CreateContext(It.IsAny<ILifetimeScope>()))
|
||||
.Returns(httpContext);
|
||||
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user