Compare commits

..

1 Commits

Author SHA1 Message Date
Sebastien Ros
295e5e8785 Adding Multi-Tenant Commands feature 2015-08-07 17:40:47 -07:00
510 changed files with 2274 additions and 7003 deletions

View File

@@ -27,7 +27,6 @@
<BuildPlatform Condition="$(ProgramW6432) != ''">x64</BuildPlatform>
<BuildPlatform Condition="$(BuildPlatform) == ''">x86</BuildPlatform>
<Configuration Condition="$(Configuration) == ''">Release</Configuration>
<!-- TeamCity build number -->
<Version>$(BUILD_NUMBER)</Version>
@@ -116,7 +115,7 @@
<MSBuild
Projects="$(SrcFolder)\Orchard.sln"
Targets="Build"
Properties="Configuration=$(Configuration);OutputPath=$(CompileFolder)" />
Properties="Configuration=Release;OutputPath=$(CompileFolder)" />
<!-- Compile to "regular" output folder for devs using VS locally -->
<MSBuild
Projects="$(SrcFolder)\Orchard.sln"
@@ -127,7 +126,7 @@
<MSBuild
Projects="$(SrcFolder)\Tools\MSBuild.Orchard.Tasks\MSBuild.Orchard.Tasks.csproj"
Targets="Build"
Properties="Configuration=$(Configuration);OutputPath=$(MsBuildTasksFolder)" />
Properties="Configuration=Release;OutputPath=$(MsBuildTasksFolder)" />
</Target>
<Target Name="TypeScript" DependsOnTargets="CompileMsBuildTasks">
@@ -156,7 +155,7 @@
<Output TaskParameter="Include" ItemName="TestAssemblies" />
</CreateItem>
<NUnit Assemblies="@(TestAssemblies)" ToolPath="$(LibFolder)\nunit" WorkingDirectory="$(CompileFolder)" OutputXmlFile="$(BuildFolder)\Orchard.Tests.xml" ExcludeCategory="longrunning" />
<NUnit Assemblies="@(TestAssemblies)" ToolPath="$(LibFolder)\nunit" WorkingDirectory="$(CompileFolder)" OutputXmlFile="$(BuildFolder)\Orchard.Tests.xml" />
</Target>
<Target Name ="Spec" DependsOnTargets="Package-Stage">
@@ -274,19 +273,19 @@
<!-- extra processing of the staged config files -->
<TransformXml
Source="$(StageFolder)\Web.Config"
Transform="$(SrcFolder)\Orchard.Web\Web.$(Configuration).Config"
Transform="$(SrcFolder)\Orchard.Web\Web.Release.Config"
Destination="$(StageFolder)\Web.Config"
/>
<TransformXml
Source="$(StageFolder)\Config\HostComponents.Config"
Transform="$(SrcFolder)\Orchard.Web\Config\HostComponents.$(Configuration).Config"
Transform="$(SrcFolder)\Orchard.Web\Config\HostComponents.Release.Config"
Destination="$(StageFolder)\Config\HostComponents.Config"
/>
<TransformXml
Source="$(StageFolder)\Config\log4net.Config"
Transform="$(SrcFolder)\Orchard.Web\Config\log4net.$(Configuration).Config"
Transform="$(SrcFolder)\Orchard.Web\Config\log4net.Release.Config"
Destination="$(StageFolder)\Config\log4net.Config"
/>

View File

@@ -1,9 +0,0 @@
/**********************************************************************/
/* 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'

View File

@@ -1,15 +0,0 @@
/**********************************************************************/
/* 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

45
lib/msdeploy/install.sql Normal file
View File

@@ -0,0 +1,45 @@
/**********************************************************************/
/* 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

View File

@@ -1,13 +1,7 @@
<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" />
<!-- 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>
<dbFullSql path="install.sql" />
</MSDeploy.iisApp>

View File

@@ -23,20 +23,19 @@
<!-- 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="createuser.sql" match="PlaceHolderForUser" />
<parameterEntry type="TextFile" scope="createlogin.sql" match="PlaceHolderForUser" />
<parameterEntry type="TextFile" scope="install.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="createlogin.sql" match="PlaceHolderForPassword" />
<parameterEntry type="TextFile" scope="install.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.
@@ -48,17 +47,19 @@
<!-- 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="Password, SQL, dbAdminPassword">
<parameter name="Database Administrator Password" description="Password for the database administrator account." tags="New, Password, SQL, dbAdminPassword">
</parameter>
<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 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>
<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 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>
<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="(?&lt;=\s*DataConnectionString:\s+)[^\s].*[^\r\n]" />

Binary file not shown.

View File

@@ -161,237 +161,6 @@
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 ==, &amp;&amp;, >, 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.

View File

@@ -1,114 +0,0 @@
<?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>

View File

@@ -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="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="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="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>

View File

@@ -4,19 +4,19 @@
<name>Microsoft.WindowsAzure.Configuration</name>
</assembly>
<members>
<member name="T:Microsoft.Azure.CloudConfigurationManager">
<member name="T:Microsoft.WindowsAzure.CloudConfigurationManager">
<summary>
Configuration manager for accessing Microsoft Azure settings.
Configuration manager for accessing Windows Azure settings.
</summary>
</member>
<member name="M:Microsoft.Azure.CloudConfigurationManager.GetSetting(System.String)">
<member name="M:Microsoft.WindowsAzure.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.Azure.CloudConfigurationManager.AppSettings">
<member name="P:Microsoft.WindowsAzure.CloudConfigurationManager.AppSettings">
<summary>
Gets application settings.
</summary>
@@ -42,17 +42,17 @@
Looks up a localized string similar to Argument &quot;{0}&quot; cannot be an empty string..
</summary>
</member>
<member name="T:Microsoft.Azure.AzureApplicationSettings">
<member name="T:Microsoft.WindowsAzure.AzureApplicationSettings">
<summary>
Microsoft Azure settings.
Windows Azure settings.
</summary>
</member>
<member name="M:Microsoft.Azure.AzureApplicationSettings.#ctor">
<member name="M:Microsoft.WindowsAzure.AzureApplicationSettings.#ctor">
<summary>
Initializes the settings.
</summary>
</member>
<member name="M:Microsoft.Azure.AzureApplicationSettings.IsMissingSettingException(System.Exception)">
<member name="M:Microsoft.WindowsAzure.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.Azure.AzureApplicationSettings.GetSetting(System.String)">
<member name="M:Microsoft.WindowsAzure.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.Azure.AzureApplicationSettings.GetValue(System.String,System.String,System.Func{System.String,System.String})">
<member name="M:Microsoft.WindowsAzure.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.Azure.AzureApplicationSettings.GetServiceRuntimeSetting(System.String)">
<member name="M:Microsoft.WindowsAzure.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.Azure.AzureApplicationSettings.GetServiceRuntimeAssembly">
<member name="M:Microsoft.WindowsAzure.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.Azure.NativeMethods.GetAssemblyPath(System.String)">
<member name="M:Microsoft.WindowsAzure.NativeMethods.GetAssemblyPath(System.String)">
<summary>
Gets an assembly path from the GAC given a partial name.
</summary>

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -4,17 +4,16 @@ var glob = require("glob"),
gulpif = require("gulp-if"),
gulp = require("gulp"),
newer = require("gulp-newer"),
plumber = require("gulp-plumber"),
plumber = require("gulp-plumber"),
sourcemaps = require("gulp-sourcemaps"),
less = require("gulp-less"),
autoprefixer = require("gulp-autoprefixer"),
minify = require("gulp-minify-css"),
autoprefixer = require("gulp-autoprefixer"),
minify = require("gulp-minify-css"),
typescript = require("gulp-typescript"),
uglify = require("gulp-uglify"),
rename = require("gulp-rename"),
uglify = require("gulp-uglify"),
rename = require("gulp-rename"),
concat = require("gulp-concat"),
header = require("gulp-header"),
fs = require("fs");
header = require("gulp-header")
/*
** GULP TASKS
@@ -38,53 +37,25 @@ gulp.task("rebuild", function () {
return merge(assetGroupTasks);
});
// Set "Watchers" as sub-processes in order to restart the task when Assets.json changes.
// Continuous watch (each asset group is built whenever one of its inputs 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);
getAssetGroups().forEach(function (assetGroup) {
gulp.watch(assetGroup.inputPaths, function (event) {
console.log("Asset file '" + event.path + "' was " + event.type + ", rebuilding output '" + assetGroup.outputPath + "'.");
var task = createAssetGroupTask(assetGroup);
});
}
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 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);
var assetManifest = require("./" + assetManifestPath);
assetManifest.forEach(function (assetGroup) {
resolveAssetGroupPaths(assetGroup, assetManifestPath);
assetGroups.push(assetGroup);
@@ -96,15 +67,9 @@ function getAssetGroups() {
function resolveAssetGroupPaths(assetGroup, assetManifestPath) {
assetGroup.basePath = path.dirname(assetManifestPath);
assetGroup.inputPaths = assetGroup.inputs.map(function (inputPath) {
return path.resolve(path.join(assetGroup.basePath, inputPath));
return 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.outputPath = path.join(assetGroup.basePath, assetGroup.output);
assetGroup.outputDir = path.dirname(assetGroup.outputPath);
assetGroup.outputFileName = path.basename(assetGroup.output);
}
@@ -130,7 +95,6 @@ function buildCssPipeline(assetGroup, doRebuild) {
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,
@@ -140,7 +104,7 @@ function buildCssPipeline(assetGroup, doRebuild) {
ext: ".css"
}))))
.pipe(plumber())
.pipe(gulpif(generateSourceMaps, sourcemaps.init()))
.pipe(sourcemaps.init())
.pipe(gulpif("*.less", less()))
.pipe(gulpif(doConcat, concat(assetGroup.outputFileName)))
.pipe(autoprefixer({ browsers: ["last 2 versions"] }))
@@ -151,7 +115,7 @@ function buildCssPipeline(assetGroup, doRebuild) {
// "** 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(sourcemaps.write())
.pipe(gulp.dest(assetGroup.outputDir))
.pipe(minify())
.pipe(rename({
@@ -167,7 +131,6 @@ function buildJsPipeline(assetGroup, doRebuild) {
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,
@@ -177,14 +140,14 @@ function buildJsPipeline(assetGroup, doRebuild) {
ext: ".js"
}))))
.pipe(plumber())
.pipe(gulpif(generateSourceMaps, sourcemaps.init()))
.pipe(sourcemaps.init())
.pipe(gulpif("*.ts", typescript({
declaration: false,
//noImplicitAny: true,
noEmitOnError: true,
sortOutput: true,
}).js))
.pipe(gulpif(doConcat, concat(assetGroup.outputFileName)))
.pipe(gulpif(doConcat, concat(assetGroup.outputFileName)))
// TODO: Start using below whenever gulp-header supports sourcemaps.
//.pipe(header(
// "/*\n" +
@@ -192,11 +155,11 @@ function buildJsPipeline(assetGroup, doRebuild) {
// "** 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(sourcemaps.write())
.pipe(gulp.dest(assetGroup.outputDir))
.pipe(uglify())
.pipe(rename({
suffix: ".min"
}))
.pipe(gulp.dest(assetGroup.outputDir));
}
.pipe(uglify())
.pipe(rename({
suffix: ".min"
}))
.pipe(gulp.dest(assetGroup.outputDir));
}

File diff suppressed because it is too large Load Diff

View File

@@ -4,7 +4,7 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>2.7</ProductVersion>
<ProductVersion>2.5</ProductVersion>
<ProjectGuid>{03c5327d-4e8e-45a7-acd1-e18e7caa3c4a}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
@@ -35,9 +35,8 @@
</PropertyGroup>
<!-- Items for the project -->
<ItemGroup>
<ServiceConfiguration Include="ServiceConfiguration.Local.cscfg" />
<ServiceDefinition Include="ServiceDefinition.csdef" />
<ServiceConfiguration Include="ServiceConfiguration.Cloud.cscfg" />
<ServiceConfiguration Include="ServiceConfiguration.cscfg" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Orchard.Azure.Web\Orchard.Azure.Web.csproj">
@@ -66,7 +65,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.7\</CloudExtensionsDir>
<CloudExtensionsDir Condition=" '$(CloudExtensionsDir)' == '' ">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Windows Azure Tools\2.5\</CloudExtensionsDir>
</PropertyGroup>
<Import Project="$(CloudExtensionsDir)Microsoft.WindowsAzure.targets" />
<!-- The BeforeAddRoleContent override ensures that content in themes and modules get added

View File

@@ -1,21 +0,0 @@
<?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="{&quot;caches&quot;:[{&quot;name&quot;:&quot;default&quot;,&quot;policy&quot;:{&quot;eviction&quot;:{&quot;type&quot;:0},&quot;expiration&quot;:{&quot;defaultTTL&quot;:10,&quot;isExpirable&quot;:true,&quot;type&quot;:1},&quot;serverNotification&quot;:{&quot;isEnabled&quot;:false}},&quot;secondaries&quot;:0},{&quot;name&quot;:&quot;SessionStateCache&quot;,&quot;policy&quot;:{&quot;eviction&quot;:{&quot;type&quot;:0},&quot;expiration&quot;:{&quot;defaultTTL&quot;:60,&quot;isExpirable&quot;:true,&quot;type&quot;:2},&quot;serverNotification&quot;:{&quot;isEnabled&quot;:false}},&quot;secondaries&quot;:0},{&quot;name&quot;:&quot;OutputCache&quot;,&quot;policy&quot;:{&quot;eviction&quot;:{&quot;type&quot;:0},&quot;expiration&quot;:{&quot;defaultTTL&quot;:5,&quot;isExpirable&quot;:true,&quot;type&quot;:1},&quot;serverNotification&quot;:{&quot;isEnabled&quot;:false}},&quot;secondaries&quot;:0},{&quot;name&quot;:&quot;DatabaseCache&quot;,&quot;policy&quot;:{&quot;eviction&quot;:{&quot;type&quot;:0},&quot;expiration&quot;:{&quot;defaultTTL&quot;:5,&quot;isExpirable&quot;:true,&quot;type&quot;:1},&quot;serverNotification&quot;:{&quot;isEnabled&quot;:false}},&quot;secondaries&quot;: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>

View File

@@ -1,21 +1,20 @@
<?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="{&quot;caches&quot;:[{&quot;name&quot;:&quot;default&quot;,&quot;policy&quot;:{&quot;eviction&quot;:{&quot;type&quot;:0},&quot;expiration&quot;:{&quot;defaultTTL&quot;:10,&quot;isExpirable&quot;:true,&quot;type&quot;:1},&quot;serverNotification&quot;:{&quot;isEnabled&quot;:false}},&quot;secondaries&quot;:0},{&quot;name&quot;:&quot;SessionStateCache&quot;,&quot;policy&quot;:{&quot;eviction&quot;:{&quot;type&quot;:0},&quot;expiration&quot;:{&quot;defaultTTL&quot;:60,&quot;isExpirable&quot;:true,&quot;type&quot;:2},&quot;serverNotification&quot;:{&quot;isEnabled&quot;:false}},&quot;secondaries&quot;:0},{&quot;name&quot;:&quot;OutputCache&quot;,&quot;policy&quot;:{&quot;eviction&quot;:{&quot;type&quot;:0},&quot;expiration&quot;:{&quot;defaultTTL&quot;:5,&quot;isExpirable&quot;:true,&quot;type&quot;:1},&quot;serverNotification&quot;:{&quot;isEnabled&quot;:false}},&quot;secondaries&quot;:0},{&quot;name&quot;:&quot;DatabaseCache&quot;,&quot;policy&quot;:{&quot;eviction&quot;:{&quot;type&quot;:0},&quot;expiration&quot;:{&quot;defaultTTL&quot;:5,&quot;isExpirable&quot;:true,&quot;type&quot;:1},&quot;serverNotification&quot;:{&quot;isEnabled&quot;:false}},&quot;secondaries&quot;: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>
<?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="{&quot;caches&quot;:[{&quot;name&quot;:&quot;default&quot;,&quot;policy&quot;:{&quot;eviction&quot;:{&quot;type&quot;:0},&quot;expiration&quot;:{&quot;defaultTTL&quot;:10,&quot;isExpirable&quot;:true,&quot;type&quot;:1},&quot;serverNotification&quot;:{&quot;isEnabled&quot;:false}},&quot;secondaries&quot;:0},{&quot;name&quot;:&quot;SessionStateCache&quot;,&quot;policy&quot;:{&quot;eviction&quot;:{&quot;type&quot;:0},&quot;expiration&quot;:{&quot;defaultTTL&quot;:60,&quot;isExpirable&quot;:true,&quot;type&quot;:2},&quot;serverNotification&quot;:{&quot;isEnabled&quot;:false}},&quot;secondaries&quot;:0},{&quot;name&quot;:&quot;OutputCache&quot;,&quot;policy&quot;:{&quot;eviction&quot;:{&quot;type&quot;:0},&quot;expiration&quot;:{&quot;defaultTTL&quot;:5,&quot;isExpirable&quot;:true,&quot;type&quot;:1},&quot;serverNotification&quot;:{&quot;isEnabled&quot;:false}},&quot;secondaries&quot;:0},{&quot;name&quot;:&quot;DatabaseCache&quot;,&quot;policy&quot;:{&quot;eviction&quot;:{&quot;type&quot;:0},&quot;expiration&quot;:{&quot;defaultTTL&quot;:5,&quot;isExpirable&quot;:true,&quot;type&quot;:1},&quot;serverNotification&quot;:{&quot;isEnabled&quot;:false}},&quot;secondaries&quot;: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>
</ServiceConfiguration>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<ServiceDefinition name="OrchardCloudService" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2015-04.2.6">
<ServiceDefinition name="OrchardCloudService" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2014-06.2.4">
<WebRole name="Orchard.Azure.Web">
<Sites>
<Site name="Web">
@@ -20,7 +20,6 @@
<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" />

View File

@@ -1,31 +0,0 @@
<?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>

View File

@@ -1,110 +1,98 @@
<?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.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>
<Component Type="Orchard.Alias.Implementation.Updater">
<Properties>
<Property Name="Disabled" Value="false"/>
</Properties>
</Component>
</Components>
</HostComponents>

View File

@@ -1,50 +1,31 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="autofac" type="Autofac.Configuration.SectionHandler, Autofac.Configuration"/>
</configSections>
<autofac defaultAssembly="Orchard.Framework">
<configSections>
<section name="autofac" type="Autofac.Configuration.SectionHandler, Autofac.Configuration"/>
</configSections>
<autofac defaultAssembly="Orchard.Framework">
<!--
To create tenant specific configurations, copy this file to ~/Config/Sites.{tenant}.config
To create tenant specific configurations, copy this file to ~/Congig/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.
Isolation level for all database transaction.
See http://msdn.microsoft.com/en-us/library/system.transactions.isolationlevel.aspx
-->
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>
-->
<!--
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>
-->
<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>
</autofac>
</configuration>
</configuration>

View File

@@ -20,7 +20,6 @@
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<TargetFrameworkProfile />
<UseGlobalApplicationHostFile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -91,13 +90,13 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\lib\windowsazure\Microsoft.WindowsAzure.Configuration.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Diagnostics, Version=2.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<Reference Include="Microsoft.WindowsAzure.Diagnostics">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\lib\windowsazure\Microsoft.WindowsAzure.Diagnostics.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.WindowsAzure.ServiceRuntime, Version=2.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<Reference Include="Microsoft.WindowsAzure.ServiceRuntime">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\lib\windowsazure\Microsoft.WindowsAzure.ServiceRuntime.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Storage">
<SpecificVersion>False</SpecificVersion>
@@ -182,6 +181,10 @@
<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">
@@ -561,23 +564,6 @@
<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}">
@@ -597,11 +583,6 @@
</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">

View File

@@ -42,9 +42,8 @@
<system.diagnostics>
<trace>
<listeners>
<add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=2.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
name="AzureDiagnostics">
<filter type="" />
<add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=2.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="AzureDiagnostics">
<filter type=""/>
</add>
</listeners>
</trace>
@@ -192,19 +191,19 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.WindowsAzure.Storage" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-5.0.2.0" newVersion="5.0.2.0"/>
<bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0"/>
<bindingRedirect oldVersion="0.0.0.0-5.6.3.0" newVersion="5.6.3.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0"/>
<bindingRedirect oldVersion="0.0.0.0-5.6.3.0" newVersion="5.6.3.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Data.Services.Client" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0"/>
<bindingRedirect oldVersion="0.0.0.0-5.6.3.0" newVersion="5.6.3.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>

View File

@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.23107.0
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Modules", "Modules", "{8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}"
EndProject

View File

@@ -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.2")]
[assembly: AssemblyFileVersion("1.9.2")]
[assembly: AssemblyVersion("1.9.1")]
[assembly: AssemblyFileVersion("1.9.1")]

View File

@@ -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.2")]
[assembly: AssemblyFileVersion("1.9.2")]
[assembly: AssemblyVersion("1.9.1")]
[assembly: AssemblyFileVersion("1.9.1")]

View File

@@ -203,7 +203,7 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.WindowsAzure.Storage" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-5.0.2.0" newVersion="5.0.2.0"/>
<bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31BF3856AD364E35" culture="neutral"/>

View File

@@ -199,7 +199,7 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.WindowsAzure.Storage" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-5.0.2.0" newVersion="5.0.2.0"/>
<bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31BF3856AD364E35" culture="neutral"/>

View File

@@ -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.2")]
[assembly: AssemblyFileVersion("1.9.2")]
[assembly: AssemblyVersion("1.9.1")]
[assembly: AssemblyFileVersion("1.9.1")]

View File

@@ -264,6 +264,9 @@ 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")),
@@ -324,6 +327,9 @@ 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")),

View File

@@ -303,24 +303,5 @@ 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));
}
}
}

View File

@@ -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.2")]
[assembly: AssemblyFileVersion("1.9.2")]
[assembly: AssemblyVersion("1.9.1")]
[assembly: AssemblyFileVersion("1.9.1")]

View File

@@ -98,23 +98,23 @@ namespace Orchard.Tests.Modules.Recipes.Services {
[Test]
public void HarvestRecipesFailsToFindRecipesWhenCalledWithNotExistingExtension() {
var recipes = _recipeHarvester.HarvestRecipes("cantfindme");
var recipes = (List<Recipe>) _recipeHarvester.HarvestRecipes("cantfindme");
Assert.That(recipes.Count(), Is.EqualTo(0));
Assert.That(recipes.Count, Is.EqualTo(0));
}
[Test]
public void HarvestRecipesShouldHarvestRecipeXmlFiles() {
var recipes = _recipeHarvester.HarvestRecipes("Sample1");
Assert.That(recipes.Count(), Is.EqualTo(1));
var recipes = (List<Recipe>)_recipeHarvester.HarvestRecipes("Sample1");
Assert.That(recipes.Count, Is.EqualTo(1));
}
[Test]
public void ParseRecipeLoadsRecipeMetaDataIntoModel() {
var recipes = _recipeHarvester.HarvestRecipes("Sample1");
Assert.That(recipes.Count(), Is.EqualTo(1));
var recipes = (List<Recipe>) _recipeHarvester.HarvestRecipes("Sample1");
Assert.That(recipes.Count, Is.EqualTo(1));
var sampleRecipe = recipes.First();
var sampleRecipe = recipes[0];
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"));

View File

@@ -1,6 +1,4 @@
using System;
using System.Linq;
using System.Threading;
using Autofac;
using NUnit.Framework;
using Orchard.Caching;
@@ -80,42 +78,6 @@ 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; }

View File

@@ -76,39 +76,5 @@ 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));
}
}
}

View File

@@ -28,6 +28,13 @@ 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]

View File

@@ -512,7 +512,7 @@ Features:
Dependencies: Beta
");
themeExtensionFolder.Manifests.Add("Classic", @"
moduleExtensionFolder.Manifests.Add("Classic", @"
Name: Classic
Version: 1.0.3
OrchardVersion: 1

View File

@@ -56,7 +56,11 @@ namespace Orchard.Tests.Environment.ShellBuilders {
_container.Mock<IHttpContextAccessor>()
.Setup(x => x.Current())
.Returns(default(HttpContextBase));
.Returns(httpContext);
_container.Mock<IHttpContextAccessor>()
.Setup(x => x.CreateContext(It.IsAny<ILifetimeScope>()))
.Returns(httpContext);
var factory = _container.Resolve<IShellContextFactory>();

View File

@@ -43,6 +43,10 @@ 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]

View File

@@ -4,7 +4,7 @@ using Orchard.Localization.Models;
namespace Orchard.Tests.Localization {
[TestFixture()]
[TestFixture]
public class DateTimePartsTests {
[Test]

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
@@ -12,8 +13,7 @@ using Orchard.Localization.Services;
namespace Orchard.Tests.Localization {
[TestFixture()]
[Category("longrunning")]
[TestFixture]
public class DefaultDateFormatterTests {
[SetUp]
@@ -87,16 +87,9 @@ namespace Orchard.Tests.Localization {
var container = TestHelpers.InitializeContainer(culture.Name, "GregorianCalendar", TimeZoneInfo.Utc);
var formats = container.Resolve<IDateTimeFormatProvider>();
var target = container.Resolve<IDateFormatter>();
var hoursToTest = new[] { 0, 6, 12, 18 };
// Fix for some cultures on Windows 10 where both designators for some reason
// are empty strings. A 24-hour time cannot possibly be round-tripped without any
// way to distinguish AM from PM, so for these cases test only 12-hour time.
if (culture.DateTimeFormat.AMDesignator == culture.DateTimeFormat.PMDesignator)
hoursToTest = new[] { 1, 6, 9, 12 };
foreach (var dateTimeFormat in formats.AllDateTimeFormats) { // All date and time formats supported by the culture.
foreach (var hour in hoursToTest) { // Enough hours to cover all code paths (AM/PM, 12<->00, etc).
foreach (var hour in new[] { 0, 6, 12, 18 }) { // Enough hours to cover all code paths (AM/PM, 12<->00, etc).
DateTime dateTime = new DateTime(1998, 1, 1, hour, 30, 30, DateTimeKind.Utc);
@@ -327,16 +320,9 @@ namespace Orchard.Tests.Localization {
var container = TestHelpers.InitializeContainer(culture.Name, null, TimeZoneInfo.Utc);
var formats = container.Resolve<IDateTimeFormatProvider>();
var target = container.Resolve<IDateFormatter>();
var hoursToTest = Enumerable.Range(0, 23);
// Fix for some cultures on Windows 10 where both designators for some reason
// are empty strings. A 24-hour time cannot possibly be round-tripped without any
// way to distinguish AM from PM, so for these cases test only 12-hour time.
if (culture.DateTimeFormat.AMDesignator == culture.DateTimeFormat.PMDesignator)
hoursToTest = Enumerable.Range(1, 12);
foreach (var timeFormat in formats.AllTimeFormats) { // All time formats supported by the culture.
foreach (var hour in hoursToTest) { // All hours in the day.
for (var hour = 0; hour <= 23; hour++) { // All hours in the day.
DateTime time = new DateTime(1998, 1, 1, hour, 30, 30);
var timeString = time.ToString(timeFormat, culture);

View File

@@ -33,5 +33,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.2")]
[assembly: AssemblyFileVersion("1.9.2")]
[assembly: AssemblyVersion("1.9.1")]
[assembly: AssemblyFileVersion("1.9.1")]

View File

@@ -1,4 +1,5 @@
using System.Web;
using Autofac;
using Orchard.Mvc;
namespace Orchard.Tests.Stubs {
@@ -16,6 +17,10 @@ namespace Orchard.Tests.Stubs {
return _httpContext;
}
public HttpContextBase CreateContext(ILifetimeScope lifetimeScope) {
return _httpContext;
}
public void Set(HttpContextBase httpContext) {
_httpContext = httpContext;
}

View File

@@ -23,6 +23,10 @@ namespace Orchard.Tests.Tasks {
.Setup(x => x.Current())
.Returns(() => null);
container.Mock<IHttpContextAccessor>()
.Setup(x => x.CreateContext(It.IsAny<ILifetimeScope>()))
.Returns(() => new StubHttpContext());
container.Mock<IWorkContextEvents>()
.Setup(x => x.Started());
}

View File

@@ -32,8 +32,8 @@ using System.Security;
// 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.2")]
[assembly: AssemblyFileVersion("1.9.2")]
[assembly: AssemblyVersion("1.9.1")]
[assembly: AssemblyFileVersion("1.9.1")]
// Enable web application to call this assembly in Full Trust
[assembly: AllowPartiallyTrustedCallers]

View File

@@ -89,9 +89,9 @@ namespace Orchard.WarmupStarter {
var result = _initialization(application);
_initializationResult = result;
}
catch (Exception ex) {
catch (Exception e) {
lock (_synLock) {
_error = ex;
_error = e;
_previousError = null;
}
}

View File

@@ -33,5 +33,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.9.2")]
[assembly: AssemblyFileVersion("1.9.2")]
[assembly: AssemblyVersion("1.9.1")]
[assembly: AssemblyFileVersion("1.9.1")]

View File

@@ -8,7 +8,7 @@
<autofac defaultAssembly="Orchard.Framework">
<!--
To create tenant specific configurations, copy this file to ~/Config/Sites.{tenant}.config
To create tenant specific configurations, copy this file to ~/Congig/Sites.{tenant}.config
where {tenant} is the technical name of the targetted tenant
Allowed scopes: per-dependency, single-instance or per-lifetime-scope
@@ -47,4 +47,4 @@
</components>
</autofac>
</configuration>
</configuration>

View File

@@ -63,14 +63,10 @@ namespace Orchard.Core.Common.Drivers {
}
protected override void Importing(BodyPart part, ContentManagement.Handlers.ImportContentContext context) {
// Don't do anything if the tag is not specified.
if (context.Data.Element(part.PartDefinition.Name) == null) {
return;
var importedText = context.Attribute(part.PartDefinition.Name, "Text");
if (importedText != null) {
part.Text = importedText;
}
context.ImportAttribute(part.PartDefinition.Name, "Text", importedText =>
part.Text = importedText
);
}
protected override void Exporting(BodyPart part, ContentManagement.Handlers.ExportContentContext context) {

View File

@@ -68,35 +68,35 @@ namespace Orchard.Core.Common.Drivers {
}
protected override void Importing(CommonPart part, ImportContentContext context) {
// Don't do anything if the tag is not specified.
if (context.Data.Element(part.PartDefinition.Name) == null) {
return;
var owner = context.Attribute(part.PartDefinition.Name, "Owner");
if (owner != null) {
var contentIdentity = new ContentIdentity(owner);
part.Owner = _membershipService.GetUser(contentIdentity.Get("User.UserName"));
}
// use the super user if the referenced one doesn't exist
else {
part.Owner = _membershipService.GetUser(Services.WorkContext.CurrentSite.SuperUser);
}
context.ImportAttribute(part.PartDefinition.Name, "Owner", owner => {
var contentIdentity = new ContentIdentity(owner);
var container = context.Attribute(part.PartDefinition.Name, "Container");
if (container != null) {
part.Container = context.GetItemFromSession(container);
}
// use the super user if the referenced one doesn't exist;
part.Owner =
_membershipService.GetUser(contentIdentity.Get("User.UserName"))
?? _membershipService.GetUser(Services.WorkContext.CurrentSite.SuperUser);
});
var createdUtc = context.Attribute(part.PartDefinition.Name, "CreatedUtc");
if (createdUtc != null) {
part.CreatedUtc = XmlConvert.ToDateTime(createdUtc, XmlDateTimeSerializationMode.Utc);
}
context.ImportAttribute(part.PartDefinition.Name, "Container", container =>
part.Container = context.GetItemFromSession(container)
);
var publishedUtc = context.Attribute(part.PartDefinition.Name, "PublishedUtc");
if (publishedUtc != null) {
part.PublishedUtc = XmlConvert.ToDateTime(publishedUtc, XmlDateTimeSerializationMode.Utc);
}
context.ImportAttribute(part.PartDefinition.Name, "CreatedUtc", createdUtc =>
part.CreatedUtc = XmlConvert.ToDateTime(createdUtc, XmlDateTimeSerializationMode.Utc)
);
context.ImportAttribute(part.PartDefinition.Name, "PublishedUtc", publishedUtc =>
part.PublishedUtc = XmlConvert.ToDateTime(publishedUtc, XmlDateTimeSerializationMode.Utc)
);
context.ImportAttribute(part.PartDefinition.Name, "ModifiedUtc", modifiedUtc =>
part.ModifiedUtc = XmlConvert.ToDateTime(modifiedUtc, XmlDateTimeSerializationMode.Utc)
);
var modifiedUtc = context.Attribute(part.PartDefinition.Name, "ModifiedUtc");
if (modifiedUtc != null) {
part.ModifiedUtc = XmlConvert.ToDateTime(modifiedUtc, XmlDateTimeSerializationMode.Utc);
}
}
protected override void Exporting(CommonPart part, ExportContentContext context) {

View File

@@ -17,14 +17,10 @@ namespace Orchard.Core.Common.Drivers {
}
protected override void Importing(IdentityPart part, ContentManagement.Handlers.ImportContentContext context) {
// Don't do anything if the tag is not specified.
if (context.Data.Element(part.PartDefinition.Name) == null) {
return;
var identity = context.Attribute(part.PartDefinition.Name, "Identifier");
if (identity != null) {
part.Identifier = identity;
}
context.ImportAttribute(part.PartDefinition.Name, "Identifier", identity =>
part.Identifier = identity
);
}
protected override void Exporting(IdentityPart part, ContentManagement.Handlers.ExportContentContext context) {

View File

@@ -2,7 +2,7 @@
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.9.2
Version: 1.9.1
OrchardVersion: 1.9
Description: The common module introduces content parts that are going to be used by most content types (common, body, identity).
FeatureDescription: Core content parts.

View File

@@ -52,7 +52,7 @@ namespace Orchard.Core.Containers.Drivers {
if (updater != null) {
var oldContainerId = model.ContainerId;
updater.TryUpdateModel(model, "Containable", null, new[] { "ShowContainerPicker", "ShowPositionEditor" });
if (oldContainerId != model.ContainerId && settings.ShowContainerPicker) {
if (oldContainerId != model.ContainerId) {
if (commonPart != null) {
var containerItem = _contentManager.Get(model.ContainerId, VersionOptions.Latest);
commonPart.Container = containerItem;
@@ -61,23 +61,20 @@ namespace Orchard.Core.Containers.Drivers {
part.Position = model.Position;
}
if (settings.ShowContainerPicker) {
var containers = _contentManager
.Query<ContainerPart, ContainerPartRecord>(VersionOptions.Latest)
.List()
.Where(container => container.ItemContentTypes.Any(type => type.Name == part.TypeDefinition.Name));
var containers = _contentManager
.Query<ContainerPart, ContainerPartRecord>(VersionOptions.Latest)
.List()
.Where(container => container.ItemContentTypes.Any(type => type.Name == part.TypeDefinition.Name));
var listItems = new[] { new SelectListItem { Text = T("(None)").Text, Value = "0" } }
.Concat(containers.Select(x => new SelectListItem {
Value = Convert.ToString(x.Id),
Text = x.ContentItem.TypeDefinition.DisplayName + ": " + _contentManager.GetItemMetadata(x.ContentItem).DisplayText,
Selected = x.Id == model.ContainerId,
}))
.ToList();
model.AvailableContainers = new SelectList(listItems, "Value", "Text", model.ContainerId);
}
var listItems = new[] { new SelectListItem { Text = T("(None)").Text, Value = "0" } }
.Concat(containers.Select(x => new SelectListItem {
Value = Convert.ToString(x.Id),
Text = x.ContentItem.TypeDefinition.DisplayName + ": " + _contentManager.GetItemMetadata(x.ContentItem).DisplayText,
Selected = x.Id == model.ContainerId,
}))
.ToList();
model.AvailableContainers = new SelectList(listItems, "Value", "Text", model.ContainerId);
model.Position = part.Position;
return shapeHelper.EditorTemplate(TemplateName: "Containable", Model: model, Prefix: "Containable");
@@ -85,11 +82,6 @@ namespace Orchard.Core.Containers.Drivers {
}
protected override void Importing(ContainablePart part, ImportContentContext context) {
// Don't do anything if the tag is not specified.
if (context.Data.Element(part.PartDefinition.Name) == null) {
return;
}
context.ImportAttribute(part.PartDefinition.Name, "Position", s => part.Position = XmlConvert.ToInt32(s));
}

View File

@@ -88,10 +88,6 @@ namespace Orchard.Core.Containers.Drivers {
protected override DriverResult Editor(ContainerPart part, IUpdateModel updater, dynamic shapeHelper) {
return ContentShape("Parts_Container_Edit", () => {
if(!part.ContainerSettings.DisplayContainerEditor) {
return null;
}
var containables = !part.ContainerSettings.RestrictItemContentTypes ? _containerService.GetContainableTypes().ToList() : new List<ContentTypeDefinition>(0);
var model = new ContainerViewModel {
AdminMenuPosition = part.AdminMenuPosition,
@@ -133,16 +129,12 @@ namespace Orchard.Core.Containers.Drivers {
}
protected override void Importing(ContainerPart part, ImportContentContext context) {
// Don't do anything if the tag is not specified.
if (context.Data.Element(part.PartDefinition.Name) == null) {
return;
}
context.ImportAttribute(part.PartDefinition.Name, "ItemContentTypes", itemContentType => {
var itemContentType = context.Attribute(part.PartDefinition.Name, "ItemContentTypes");
if (itemContentType != null) {
if (_contentDefinitionManager.GetTypeDefinition(itemContentType) != null) {
part.Record.ItemContentTypes = itemContentType;
}
});
}
context.ImportAttribute(part.PartDefinition.Name, "ItemsShown", s => part.ItemsShown = XmlConvert.ToBoolean(s));
context.ImportAttribute(part.PartDefinition.Name, "Paginated", s => part.Paginated = XmlConvert.ToBoolean(s));

View File

@@ -81,25 +81,23 @@ namespace Orchard.Core.Containers.Drivers {
}
protected override void Importing(ContainerWidgetPart part, ImportContentContext context) {
// Don't do anything if the tag is not specified.
if (context.Data.Element(part.PartDefinition.Name) == null) {
return;
}
context.ImportAttribute(part.PartDefinition.Name, "Container", containerIdentity => {
var containerIdentity = context.Attribute(part.PartDefinition.Name, "Container");
if (containerIdentity != null) {
var container = context.GetItemFromSession(containerIdentity);
if (container != null) {
part.Record.ContainerId = container.Id;
}
});
}
context.ImportAttribute(part.PartDefinition.Name, "PageSize", pageSize =>
part.Record.PageSize = Convert.ToInt32(pageSize)
);
var pageSize = context.Attribute(part.PartDefinition.Name, "PageSize");
if (pageSize != null) {
part.Record.PageSize = Convert.ToInt32(pageSize);
}
context.ImportAttribute(part.PartDefinition.Name, "FilterByValue", filterByValue =>
part.Record.FilterByValue = filterByValue
);
var filterByValue = context.Attribute(part.PartDefinition.Name, "FilterByValue");
if (filterByValue != null) {
part.Record.FilterByValue = filterByValue;
}
}
protected override void Exporting(ContainerWidgetPart part, ExportContentContext context) {

View File

@@ -24,22 +24,20 @@ namespace Orchard.Core.Containers.Drivers {
}
protected override void Importing(CustomPropertiesPart part, ImportContentContext context) {
// Don't do anything if the tag is not specified.
if (context.Data.Element(part.PartDefinition.Name) == null) {
return;
var customOne = context.Attribute(part.PartDefinition.Name, "CustomOne");
if (customOne != null) {
part.Record.CustomOne = customOne;
}
context.ImportAttribute(part.PartDefinition.Name, "CustomOne", customOne =>
part.Record.CustomOne = customOne
);
var customTwo = context.Attribute(part.PartDefinition.Name, "CustomTwo");
if (customTwo != null) {
part.Record.CustomTwo = customTwo;
}
context.ImportAttribute(part.PartDefinition.Name, "CustomTwo", customTwo =>
part.Record.CustomTwo = customTwo
);
context.ImportAttribute(part.PartDefinition.Name, "CustomThree", customThree =>
part.Record.CustomThree = customThree
);
var customThree = context.Attribute(part.PartDefinition.Name, "CustomThree");
if (customThree != null) {
part.Record.CustomThree = customThree;
}
}
protected override void Exporting(CustomPropertiesPart part, ExportContentContext context) {

View File

@@ -2,7 +2,7 @@
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.9.2
Version: 1.9.1
OrchardVersion: 1.9
Description: The containers module introduces container and containable behaviors for content items.
FeatureDescription: Container and containable parts to enable parent-child relationships between content items.

View File

@@ -48,10 +48,6 @@ namespace Orchard.Core.Containers.Settings {
}
public class ContainerTypePartSettings {
public ContainerTypePartSettings() {
DisplayContainerEditor = true;
}
public bool? ItemsShownDefault { get; set; }
public int? PageSizeDefault { get; set; }
public bool? PaginatedDefault { get; set; }
@@ -59,7 +55,6 @@ namespace Orchard.Core.Containers.Settings {
public bool RestrictItemContentTypes { get; set; }
public bool? EnablePositioning { get; set; }
public string AdminListViewName { get; set; }
public bool DisplayContainerEditor { get; set; }
}
public class ContainerSettingsHooks : ContentDefinitionEditorEventsBase {
@@ -98,8 +93,7 @@ namespace Orchard.Core.Containers.Settings {
EnablePositioning = model.EnablePositioning,
AdminListViewName = model.AdminListViewName,
AvailableItemContentTypes = _containerService.GetContainableTypes().ToList(),
ListViewProviders = _listViewService.Providers.ToList(),
DisplayContainerEditor = model.DisplayContainerEditor
ListViewProviders = _listViewService.Providers.ToList()
};
yield return DefinitionTemplate(viewModel);
@@ -128,7 +122,6 @@ namespace Orchard.Core.Containers.Settings {
builder.WithSetting("ContainerTypePartSettings.RestrictItemContentTypes", viewModel.RestrictItemContentTypes.ToString());
builder.WithSetting("ContainerTypePartSettings.EnablePositioning", viewModel.EnablePositioning.ToString());
builder.WithSetting("ContainerTypePartSettings.AdminListViewName", viewModel.AdminListViewName);
builder.WithSetting("ContainerTypePartSettings.DisplayContainerEditor", viewModel.DisplayContainerEditor.ToString());
yield return DefinitionTemplate(viewModel);
}

View File

@@ -16,6 +16,5 @@ namespace Orchard.Core.Containers.ViewModels {
[UIHint("ListViewPicker")]
public string AdminListViewName { get; set; }
public bool DisplayContainerEditor { get; set; }
}
}

View File

@@ -2,11 +2,6 @@
@{
Script.Require("ShapesBase");
}
<fieldset>
@Html.CheckBoxFor(m => m.DisplayContainerEditor)
@Html.LabelFor(m => m.DisplayContainerEditor, @T("Display settings editor").ToString(), new { @class = "forcheckbox" })
<span class="hint">@T("When checked, users can change the settings for each content item.")</span>
</fieldset>
<fieldset>
<label for="@Html.FieldIdFor(m => m.ItemsShownDefault)">@T("Default Items Shown")</label>
@Html.EditorFor(m => m.ItemsShownDefault)

View File

@@ -65,7 +65,8 @@ namespace Orchard.Core.Contents.Controllers {
Pager pager = new Pager(_siteService.GetSiteSettings(), pagerParameters);
var versionOptions = VersionOptions.Latest;
switch (model.Options.ContentsStatus) {
switch (model.Options.ContentsStatus)
{
case ContentsStatus.Published:
versionOptions = VersionOptions.Published;
break;
@@ -111,10 +112,6 @@ namespace Orchard.Core.Contents.Controllers {
query = _cultureFilter.FilterCulture(query, model.Options.SelectedCulture);
}
if(model.Options.ContentsStatus == ContentsStatus.Owner) {
query = query.Where<CommonPartRecord>(cr => cr.OwnerId == Services.WorkContext.CurrentUser.Id);
}
model.Options.SelectedFilter = model.TypeName;
model.Options.FilterOptions = GetListableTypes(false)
.Select(ctd => new KeyValuePair<string, string>(ctd.Name, ctd.DisplayName))

View File

@@ -2,7 +2,7 @@
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.9.2
Version: 1.9.1
OrchardVersion: 1.9
Description: The contents module enables the creation of custom content types.
Features:

View File

@@ -49,12 +49,12 @@ namespace Orchard.Core.Contents.ViewModels {
Created
}
public enum ContentsStatus {
public enum ContentsStatus
{
Draft,
Published,
AllVersions,
Latest,
Owner
Latest
}
public enum ContentsBulkAction {

View File

@@ -4,8 +4,9 @@
@{
ContentItem contentItem = Model.ContentItem;
var typeDisplayName = contentItem.TypeDefinition.DisplayName ?? contentItem.ContentType.CamelFriendly();
var pageTitle = T("New {0}", typeDisplayName);
Layout.Title = T("New {0}", Html.Raw(typeDisplayName)).Text;
Layout.Title = (string)pageTitle.Text;
}
@using (Html.BeginFormAntiForgeryPost(Url.Action("Create", new { ReturnUrl = Request.QueryString["ReturnUrl"] }), FormMethod.Post, new { enctype = "multipart/form-data" })) {

View File

@@ -4,13 +4,13 @@
var pageTitle = T("Manage Content");
var createLinkText = T("Create New Content");
if (!string.IsNullOrWhiteSpace(typeDisplayName)) {
pageTitle = T("Manage {0} Content", Html.Raw(typeDisplayName));
createLinkText = T("Create New {0}", Html.Raw(typeDisplayName));
pageTitle = T("Manage {0} Content", typeDisplayName);
createLinkText = T("Create New {0}", typeDisplayName);
}
IEnumerable<string> cultures = Model.Options.Cultures;
Layout.Title = pageTitle.Text;
Layout.Title = pageTitle;
}
<div class="manage">
@@ -54,7 +54,6 @@
</select>
<label for="contentResults" class="bulk-order">@T("Filter by")</label>
<select id="contentResults" name="Options.ContentsStatus">
@Html.SelectOption((ContentsStatus)Model.Options.ContentsStatus, ContentsStatus.Owner, T("owned by me").ToString())
@Html.SelectOption((ContentsStatus)Model.Options.ContentsStatus, ContentsStatus.Latest, T("latest").ToString())
@Html.SelectOption((ContentsStatus)Model.Options.ContentsStatus, ContentsStatus.Published, T("published").ToString())
@Html.SelectOption((ContentsStatus)Model.Options.ContentsStatus, ContentsStatus.Draft, T("unpublished").ToString())

View File

@@ -2,7 +2,7 @@
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.9.2
Version: 1.9.1
OrchardVersion: 1.9
Description: The dashboard module is providing the dashboard screen of the admininstration UI of the application.
FeatureDescription: Standard admin dashboard.

View File

@@ -2,7 +2,7 @@
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.9.2
Version: 1.9.1
OrchardVersion: 1.9
Description: The Feeds module is providing RSS feeds to content items.
FeatureDescription: RSS feeds for content items.

View File

@@ -17,7 +17,6 @@ using Orchard.UI.Navigation;
using Orchard.Utility;
using System;
using Orchard.Logging;
using Orchard.Exceptions;
namespace Orchard.Core.Navigation.Controllers {
[ValidateInput(false)]
@@ -180,10 +179,6 @@ namespace Orchard.Core.Navigation.Controllers {
return View(model);
}
catch (Exception exception) {
if (exception.IsFatal()) {
throw;
}
Logger.Error(T("Creating menu item failed: {0}", exception.Message).Text);
Services.Notifier.Error(T("Creating menu item failed: {0}", exception.Message));
return this.RedirectLocal(returnUrl, () => RedirectToAction("Index"));

View File

@@ -73,22 +73,20 @@ namespace Orchard.Core.Navigation.Drivers {
}
protected override void Importing(AdminMenuPart part, ContentManagement.Handlers.ImportContentContext context) {
// Don't do anything if the tag is not specified.
if (context.Data.Element(part.PartDefinition.Name) == null) {
return;
var adminMenuText = context.Attribute(part.PartDefinition.Name, "AdminMenuText");
if (adminMenuText != null) {
part.AdminMenuText = adminMenuText;
}
context.ImportAttribute(part.PartDefinition.Name, "AdminMenuText", adminMenuText =>
part.AdminMenuText = adminMenuText
);
var position = context.Attribute(part.PartDefinition.Name, "AdminMenuPosition");
if (position != null) {
part.AdminMenuPosition = position;
}
context.ImportAttribute(part.PartDefinition.Name, "AdminMenuPosition", position =>
part.AdminMenuPosition = position
);
context.ImportAttribute(part.PartDefinition.Name, "OnAdminMenu", onAdminMenu =>
part.OnAdminMenu = Convert.ToBoolean(onAdminMenu)
);
var onAdminMenu = context.Attribute(part.PartDefinition.Name, "OnAdminMenu");
if (onAdminMenu != null) {
part.OnAdminMenu = Convert.ToBoolean(onAdminMenu);
}
}
protected override void Exporting(AdminMenuPart part, ContentManagement.Handlers.ExportContentContext context) {

View File

@@ -37,14 +37,10 @@ namespace Orchard.Core.Navigation.Drivers {
}
protected override void Importing(MenuItemPart part, ContentManagement.Handlers.ImportContentContext context) {
// Don't do anything if the tag is not specified.
if (context.Data.Element(part.PartDefinition.Name) == null) {
return;
var url = context.Attribute(part.PartDefinition.Name, "Url");
if (url != null) {
part.Url = url;
}
context.ImportAttribute(part.PartDefinition.Name, "Url", url =>
part.Url = url
);
}
protected override void Exporting(MenuItemPart part, ContentManagement.Handlers.ExportContentContext context) {

View File

@@ -82,25 +82,23 @@ namespace Orchard.Core.Navigation.Drivers {
}
protected override void Importing(MenuPart part, ContentManagement.Handlers.ImportContentContext context) {
// Don't do anything if the tag is not specified.
if (context.Data.Element(part.PartDefinition.Name) == null) {
return;
var menuText = context.Attribute(part.PartDefinition.Name, "MenuText");
if (menuText != null) {
part.MenuText = menuText;
}
context.ImportAttribute(part.PartDefinition.Name, "MenuText", menuText =>
part.MenuText = menuText
);
var position = context.Attribute(part.PartDefinition.Name, "MenuPosition");
if (position != null) {
part.MenuPosition = position;
}
context.ImportAttribute(part.PartDefinition.Name, "MenuPosition", position =>
part.MenuPosition = position
);
context.ImportAttribute(part.PartDefinition.Name, "Menu", menuIdentity => {
var menuIdentity = context.Attribute(part.PartDefinition.Name, "Menu");
if (menuIdentity != null) {
var menu = context.GetItemFromSession(menuIdentity);
if (menu != null) {
part.Menu = menu;
}
});
}
}
protected override void Exporting(MenuPart part, ContentManagement.Handlers.ExportContentContext context) {

Some files were not shown because too many files have changed in this diff Show More