Compare commits

..

246 Commits

Author SHA1 Message Date
Sebastien Ros
63be17f440 Upgrading Lucene dll 2015-11-10 10:50:38 -08:00
Sipke Schoorstra
06ee7849c1 Removed tokenization from dynamic form error messages. 2015-11-03 22:34:11 +01:00
Sipke Schoorstra
61c91ff858 Merge pull request #5884 from phillipsj/1.9.x
Resolves #5878 : URL Field for Dynamic Forms
2015-11-03 22:08:22 +01:00
Lombiq
92cbf8925b Merge branch 'master' into 1.9.x 2015-11-03 21:38:19 +01:00
Lombiq
c8b7c64d93 Changing DotNest casing to the official one in the Readme 2015-11-03 21:37:13 +01:00
Lombiq
9572ef9ad3 Removing unnecessary Web.config file from the unused "Orchard.Dashboards" module folder, #6010
Fixes #6010
2015-11-03 21:25:51 +01:00
Sipke Schoorstra
388932b41f Merge pull request #5992 from harmony7/LayoutEditorSaveJquery
With the Element editor dialog, use dialog iframe's jQuery for form submission
2015-10-29 14:27:57 +01:00
Katsuyuki Ohmuro
829f69198c With the Element editor dialog, use dialog frame's jQuery for form submission. 2015-10-29 21:40:47 +09:00
Jamie Phillips
4648a252b9 Correcting formatting and handling of error message.
Corrected the formatting and correct the handling of the error message.
2015-10-23 17:12:24 -04:00
Sébastien Ros
219f29cd20 Merge pull request #5972 from rtpHarry/patch-4
Revamp readme.md and update version to 1.9.2
2015-10-22 12:20:48 -07:00
Sébastien Ros
51003bf582 Merge pull request #5967 from carlwoodhouse/redis-patch
[Fixes #5958] Improving Redis extensions use of keys
2015-10-22 12:19:26 -07:00
Sebastien Ros
0d5cff66a9 Fixing Azure Portal integration 2015-10-21 14:41:41 -07:00
Lombiq
7e66c98dd5 Adding the ability to add a menu item under another item directly, #4009 2015-10-21 19:52:03 +02:00
Jamie Phillips
14c2ee7944 Updating Validation Message for URL Field
This change is made to now be in sync with the recent changes to how validation messages are being handled.
2015-10-20 20:34:23 -04:00
Matthew Harris
9ae372a920 revamp and update version to 1.9.2
It was still talking about the project in the context of v1 and had a duplicate section about getting involved
2015-10-21 00:11:42 +01:00
Carl Woodhouse
eecb61a132 Redis extensions use of keys #5958 2015-10-20 12:35:34 +01:00
Sébastien Ros
4574a9fb0b Merge pull request #5915 from rtpHarry/patch-1
[Fixes #5912] Improve warning css in multi-tenant edit
2015-10-19 16:35:44 -07:00
Matthew Harris
bec9a6d792 Merge branch '1.9.x' into patch-1
Conflicts:
	src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Admin/Edit.cshtml
2015-10-20 00:09:16 +01:00
Kegan Maher
dbe89d0a82 avoid null exception in AzureBlobStorageProvider.GetStoragePath, fixes #4402 2015-10-16 14:19:39 -07:00
Sipke Schoorstra
255547288b Fixed T usage in ValidationRules, round 2. 2015-10-16 10:45:08 +02:00
Lombiq
a9abc294e3 Fixing that module tests codegen created projects with the old .NET framework version 2015-10-15 15:51:44 -07:00
Sebastien Ros
101d61b808 Merge branch 'master' into 1.9.x 2015-10-15 15:00:14 -07:00
Sipke Schoorstra
054925c297 Fixed T usage in ValidationRules. 2015-10-15 21:47:01 +02:00
Sébastien Ros
ff97d1e975 Merge pull request #5918 from rtpHarry/patch-3
[Fixes #5908] Triple columns don't fit on small screens
2015-10-15 12:22:16 -07:00
Sébastien Ros
e26fee3d6c Merge pull request #5844 from escofieldnaxos/feature/Content-Picker-MultiSelect
Enhancement to allow multi-select for the content picker
2015-10-15 12:09:10 -07:00
Sebastien Ros
ec0ea5e321 Updating ManageOwnMedia defaults
Fixes #5894
2015-10-15 11:41:07 -07:00
Sébastien Ros
dd9d67fe48 Merge pull request #5952 from dcinzona/patch-2
Fixes #5896 - AzureFileStorageProvider
2015-10-15 11:36:49 -07:00
Sébastien Ros
9105187f78 Merge pull request #5950 from mattcowen/1.9.2
Fix for orchard issue #5869
2015-10-15 11:19:12 -07:00
Nicholas Mayne
1da6066e83 Merge pull request #5921 from rtpHarry/fix-m-ui-glitch
fix multitenancy ui glitch - fixes #5913
2015-10-15 08:41:56 +01:00
Sébastien Ros
52c6debc97 Merge pull request #5937 from dcinzona/patch-1
Fixes for #5936 #5938 #5941 and #5891
2015-10-14 09:11:08 -07:00
Sébastien Ros
f3be4fa2c7 Merge pull request #5946 from dcinzona/azure.storage-5.0.2.0
[Fixes #5935] Updates Azure.Storage to 5.0.2.0
2015-10-14 09:08:56 -07:00
Gustavo Tandeciarz
d64541d47a Fixes #5896 - AzureFileStorageProvider
Needs verification that this will not break anything else - don't think it will.
2015-10-14 10:15:06 -04:00
mattcowen
9714c2c5f0 Fix for orchard issue 5869 2015-10-14 11:47:56 +01:00
dcinzona
855d183be3 Fixes #5935 Updates Azure.Storage to 5.0.2.0 2015-10-13 15:38:57 -04:00
Gustavo Tandeciarz
a37e548b25 Update media-library.js
Fixed typo
2015-10-13 07:26:52 -04:00
Gustavo Tandeciarz
99695f07cc Update media-library.js
Adjusted for default dimention based on window width (css media query)
fixed class lookup as .thumbnail has 0 height on load.
2015-10-13 07:26:13 -04:00
Gustavo Tandeciarz
63ca6ee2d8 Media Library Recents - Fixes issue #5938
The Recents link doesn't work when rootMediaFolder is null.
2015-10-12 15:07:57 -04:00
Gustavo Tandeciarz
042c47cc3f Media Library - Fixes issue #5941
Sets the opacity of the list items in the media library to .3 when new items are loading.
2015-10-12 15:05:39 -04:00
Gustavo Tandeciarz
49ab41d4dc Fixes issue #5936 - page count = infinity
Sets defaults to 200 if any dimension = 0
2015-10-12 14:15:50 -04:00
Erik Scofield
7fb63fd9eb Fix incorrect project reference probably from a merge from the Naxos branch to this feature. 2015-10-09 11:08:15 -05:00
Matthew Harris
e853550bda fix multitenancy ui glitch 2015-10-09 10:45:17 +01:00
Matthew Harris
24c68bebe4 fix triple columns not fitting on small screens 2015-10-08 21:33:18 +01:00
Matthew Harris
0a82363187 fix css issue 2015-10-08 21:26:37 +01:00
Sébastien Ros
1e87eee2e4 Merge pull request #5852 from Codinlab/issue/5737
[Fixes #5737] ChangeListView throws NRE on unpublished Lists
2015-10-08 12:27:02 -07:00
Sébastien Ros
53244d702c Merge pull request #5851 from mjy78/issue/5125
[Fixes #5125] Ensure the modified taxonomy items are not lost if a model validation…
2015-10-08 12:26:25 -07:00
Sébastien Ros
07cc3a6bad Merge pull request #5804 from mvarblow/patch-2
Prevent no-op tasks for taxonomy field updates.
2015-10-08 12:19:11 -07:00
Sébastien Ros
6f4762a30c Merge pull request #5785 from mjy78/issue/21244
[Fixes #5073] Display warning when insecure custom forms are created
2015-10-08 12:12:53 -07:00
Sébastien Ros
ce3179307d Merge pull request #5784 from mjy78/issue/20514
[Fixes #4343] Remove id from custom form returnUrl hidden field
2015-10-08 12:11:06 -07:00
Erik Scofield
2620dc820d ~Fix resource include
~Rename javascript resource from RecentContentTab to SelectableContentTab for use in Search content picker as well.
+Add Selectable to Search Content Picker
+Add Select All to Search Content Picker
2015-10-06 23:27:30 -05:00
Sebastien Ros
9c88c7fcd1 Fixing draft indexation 2015-10-02 15:44:35 +02:00
Jamie Phillips
a01b7dde23 URL Field for Dynamic Forms
Created this because I was binding to a content type that had a
URL
field.  Need to do this validation when submitting the dynamic form.
2015-09-30 21:35:44 -04:00
Sebastien Ros
62136eb59f Updating to Azure SDK 2.7 2015-09-30 15:50:05 -07:00
Sébastien Ros
8ed39703e5 Merge pull request #5864 from Garpo001/patch-1
Serialization error is thrown when creating layout or page in the dashboard when using Layouts in a Web Farm.
2015-09-28 09:38:04 -07:00
Gert Smith
a3ded18eb6 Update ElementSessionState.cs
Make Model Serializable for use in Web Farms with session state stored in a database. Currently a Serialization error is thrown when creating layout or page in the dashboard.
2015-09-26 10:52:39 +02:00
Sebastien Ros
5b0efdba58 Excluding long running tests from Test step 2015-09-25 16:00:10 -07:00
Sebastien Ros
8865041a8b [Fixes #5820] Fixing default layout support
The default layout was just set in the text editor, and would not be
taken into account if the Part settings were not saved. A user would
then think the default template was there but actually not.

The change here is to leave the text editor empty, and if the setting is
empty load the default from the service. To actually have an empty template
a user needs to provide an empty object.
2015-09-25 15:07:56 -07:00
Sebastien Ros
d9e833ba58 [Fixes #5112] Removing Layout dependency on TinyMce 2015-09-25 15:05:33 -07:00
Sebastien Ros
9137414305 [Fixes #5819] Fixing column element default size 2015-09-25 15:04:06 -07:00
myates
65ae99abd4 Ensure the modified taxonomy items are not lost if a model validation error occurs. 2015-09-25 15:43:44 +10:00
Sebastien Ros
eb9bfa0d29 Merge branch 'feature/webpi' into 1.9.2 2015-09-24 09:10:44 -07:00
Sebastien Ros
1724be5c72 Bumping version number 2015-09-23 17:23:54 -07:00
Sebastien Ros
7a289ca1ad [Fixes #5846] Saving settings would reset Markdown part settings 2015-09-23 17:12:59 -07:00
Sebastien Ros
b7a0b007e4 [Fixes #5835] Restoring cache invalidation propagation 2015-09-23 16:14:19 -07:00
Sebastien Ros
f2fb1d520d Preventing concurrency when monitoring extensions 2015-09-23 10:17:17 -07:00
Erik Scofield
59d95f11ee Enhancement to allow multi-select for the content picker 2015-09-23 00:11:43 -05:00
Sebastien Ros
248cc7ecde Updating webpi package files 2015-09-21 15:29:31 -07:00
Sébastien Ros
bb41f1f559 Merge pull request #5831 from OrchardCMS/feature/ownmedia
Implementing own media management
2015-09-21 15:08:19 -07:00
Sébastien Ros
5903f75665 Merge pull request #5828 from OrchardCMS/feature/layoutpermission
Adding ManageLayout permission
2015-09-21 15:07:57 -07:00
Sébastien Ros
46182edc5d Merge pull request #5827 from rtpHarry/1.9.x
[Fixes #5826] Restore placements confirmation message fix
2015-09-21 14:36:44 -07:00
Sebastien Ros
accd4196dc Implementing own media management 2015-09-21 14:09:37 -07:00
Sebastien Ros
d3d85f3519 Adding ManageLayout permission 2015-09-21 14:04:37 -07:00
Sébastien Ros
6e90f704f8 Merge pull request #5833 from mjy78/issue/5829
[Fixes #5829] Cannot delete spam comment when viewing comment details
2015-09-21 13:02:32 -07:00
Sébastien Ros
497b782a6a Merge pull request #5837 from mjy78/issue/5836
#5836 Fix null ref exception in CommentPartDriver
2015-09-21 12:58:01 -07:00
Sebastien Ros
bc935f18b3 Fixing unit tests 2015-09-21 12:45:57 -07:00
Sebastien Ros
12a51ea7af [Fixes #5751, #5794] Removing Edit inline 2015-09-21 12:08:19 -07:00
Sebastien Ros
f0b1639143 [Fixes #5616] Revert "Using master content item to create translations"
This reverts commit fa09e2e83a.
2015-09-21 11:27:46 -07:00
myates
9bb95efaaa #5836 Fix null ref exception in CommentPartDriver 2015-09-21 10:26:14 +10:00
myates
e6c042d1a0 Fix build error 2015-09-19 22:03:12 +10:00
myates
df583ea571 Merge branch 'Orchard-1.9.x' into issue/5829 2015-09-19 21:20:21 +10:00
mvarblow
c7fde5bc72 Update TermCountProcessor.cs
Don't process the same term multiple times if it happens to be the parent of multiple terms on the list.
2015-09-18 10:59:32 -04:00
mvarblow
d080037af9 Update TaxonomyService.cs 2015-09-18 10:45:16 -04:00
mvarblow
5a6ba5ddd6 Update ITermCountProcessor.cs 2015-09-18 10:43:53 -04:00
mvarblow
658a5601a5 Update TermsPartHandler.cs
Queue a single task to process all terms updated within this work context.
2015-09-18 10:42:54 -04:00
myates
adbab55ffc Comment service now fetches latest (instead of published) when deleting a comment. 2015-09-18 16:45:10 +10:00
Matthew Harris
20fbd99658 updated all instances of RemoveUrl checks 2015-09-17 22:58:58 +01:00
Matthew Harris
d9a0e040c1 don't overwrite confirmRemoveMessage 2015-09-17 22:54:47 +01:00
Matthew Harris
4aaf4d34d0 amends based on PR feedback 2015-09-17 21:58:12 +01:00
Matthew Harris
7143792c0e fix #5826 2015-09-17 19:44:25 +01:00
Sebastien Ros
4214329a1f Prevent unnecessary db calls for containers 2015-09-16 17:52:33 -07:00
Sebastien Ros
921b2472f1 Adding filter for own content 2015-09-16 17:52:27 -07:00
Sebastien Ros
9e9e19c439 Add setting to hide Container editor 2015-09-16 17:52:13 -07:00
Sebastien Ros
f3595881fe Hide taxonomy link if permission is not granted 2015-09-16 17:52:04 -07:00
Sebastien Ros
ba36eae848 Prevent MediaLibrary popup without permissions
If the user doesn't have ManageMedia permissions,
the markdown editor will use a specific image editor.
2015-09-16 17:51:50 -07:00
Sebastien Ros
0bf76dc7ac Implementing a positioned wrapper for text elements
When adding a text directly to a zone, the position will now
be taken into account. This is also useful for the Capture feature.

Conflicts:
	src/Orchard/Orchard.Framework.csproj
2015-09-16 17:51:23 -07:00
Sipke Schoorstra
66ff5d36e9 Merge pull request #5810 from Codinlab/issue/5809
Fixes #5809 : Layouts : DisplayText encoded twice in Design mode
2015-09-15 14:03:55 +01:00
Thierry Fleury
749ff5dc72 Fixes #5809 : Layouts : DisplayText encoded twice in Design mode 2015-09-15 14:53:52 +02:00
mvarblow
d958df3041 Update TermsPartHandler.cs 2015-09-14 17:03:30 -04:00
mvarblow
8690278bed Update TaxonomyService.cs
Improves, but does not fully resolve, the performance problems described in issue #5663.
2015-09-14 17:01:08 -04:00
Nicholas Mayne
85c4a99c13 Merge pull request #5798 from mvarblow/patch-4
Fixed typo in Sites.Config comment.
2015-09-13 17:35:28 +01:00
Sipke Schoorstra
a3fe3592c6 Merge pull request #5799 from mvarblow/patch-5
Code clean-up in TermCountProcessor.cs
2015-09-13 13:42:39 +01:00
mvarblow
a2c31a1e5c Code clean-up in TermCountProcessor.cs
Removed an unused field and unused using statements.
2015-09-13 08:33:08 -04:00
mvarblow
3f6dfa3dec Fixed typo in Sites.Config comment. 2015-09-12 20:54:54 -04:00
Sébastien Ros
f9ef297777 Merge pull request #5780 from mjy78/issue/5779
[Fixes #5779] Query and Taxonomy Elements should include value attribute for default option
2015-09-11 15:07:51 -07:00
Sébastien Ros
801b8998db Merge pull request #5783 from mjy78/issue/20377
[Fixes #4206] Ensure comment tokens available to anti-spam module.
2015-09-11 15:03:45 -07:00
myates
a28b966685 Issue 21244 - Display warning when insecure custom forms are created 2015-09-11 17:52:19 +10:00
myates
3656e5e466 Issue 20514 - Remove id from custom form returnUrl hidden field 2015-09-11 17:31:45 +10:00
myates
92b7ad7554 Issue 20377 - Ensure comment tokens available to antispam module. 2015-09-11 17:15:42 +10:00
myates
18bb847488 Force empty value attribute on default option label in taxonomy and query element dropdown lists. 2015-09-11 14:19:52 +10:00
Sébastien Ros
47133604c3 Merge pull request #5676 from RoyalVeterinaryCollege/3404
[Fixes #3404] Added Required attribute to Enumeration and Numeric Fields
2015-09-10 12:24:28 -07:00
Sebastien Ros
80b93e412a Supporting custom display type for search results 2015-09-09 15:44:53 -07:00
Sebastien Ros
e839f84537 Fixing unit test
The ThemeExtensionFolder stub should have been used
2015-09-09 14:53:16 -07:00
Sebastien Ros
a548e47f90 [Fixes #5283] Adding some documentation for ResourceDefinition.SetVersion
It has to be a vallid SermVer format.
2015-09-09 14:52:41 -07:00
Sebastien Ros
89e8658f49 Improving protected zones in settings UI
Protecting MaxPagedCount
Protecting BaseUrl
Unhiding BaseUrl and SuperUser so that users can see what the values are
2015-09-09 11:27:18 -07:00
Sebastien Ros
6d255f24ab Fixing exception when the Default layer doesn't exist 2015-09-09 09:25:01 -07:00
Sebastien Ros
e8f0ba6ec7 Fixing RecipeManagerTests 2015-09-08 17:12:44 -07:00
Sebastien Ros
60798f9346 Fixing TokenManagerTests 2015-09-08 17:09:53 -07:00
Sebastien Ros
c83f5d88cb Supporting lazy cache manager resolution 2015-09-08 17:04:45 -07:00
Sebastien Ros
2f2134412e [Fixes #5492] Adding JavaScriptEncode token 2015-09-08 16:13:55 -07:00
Sébastien Ros
1e6b6bb24f Merge pull request #5568 from Codinlab/Tokens
Token chaining improvements
2015-09-08 16:08:17 -07:00
Sébastien Ros
16de29dabd Merge pull request #5652 from Codinlab/issues/5614
Fixes #5614 : ContentPickerField and LayoutPart issue
2015-09-08 15:57:38 -07:00
Sebastien Ros
691809cd85 [Fixes #5733] Update default Layout state settings 2015-09-08 15:40:28 -07:00
Sébastien Ros
ce1df8d794 Merge pull request #5677 from dcinzona/Gulpfile-watch-assets.json
Enables gulp watch of Assets.json
2015-09-08 11:37:54 -07:00
Sébastien Ros
74be36d8a3 Merge pull request #5763 from phillipsj/1.9.x
Updating DynamicForms Module.txt
2015-09-08 11:11:12 -07:00
Jamie Phillips
2bb7eb2f91 Updating DynamicForms Module.txt
The CustomForms module name and website were listed.
2015-09-08 13:06:04 -04:00
Sebastien Ros
c4592aa65f Selecting the layer "Default" on the widgets start screen
Fixes a specflow bug which expect "Default" to be the default
selected layer. Appeared since layers are ordered alphabetically.
2015-09-08 09:27:36 -07:00
Sebastien Ros
9bac35b3f1 Removing duplicated using 2015-09-08 09:12:26 -07:00
Lombiq
2a0f866f26 Fixing exception when importing Projection Elements with the default layout selected
Fixed the export of this previously, this was remaining.
2015-09-08 01:01:23 +02:00
Thierry Fleury
371238a882 Add parameterized tokens tests 2015-09-07 15:14:20 +02:00
Thierry Fleury
67e7d1074e Allow Text token chaining when possible.
Correct some errors on token descriptions.
2015-09-07 11:57:20 +02:00
Thierry Fleury
25c34d8bca Fixes #5563 : Allow token chaining on DynamicForms submissions. 2015-09-07 11:57:19 +02:00
Thierry Fleury
75f3a618f0 Enhances TaxonomyField's token chaining. 2015-09-07 11:57:18 +02:00
Thierry Fleury
9947f3973e Add new Chain method for tokens
The new method allows working with parameterized tokens.
2015-09-07 11:57:17 +02:00
Lombiq
a685517118 Normalizing all catch (Exception ex) lines and adding exception fatality check where applicable, fixes #3949 2015-09-07 00:17:57 +02:00
Daniel Stolt
14482162fd Marked some tests as long-running. Fixes #5702. 2015-09-06 00:31:15 +02:00
Sébastien Ros
0f757655b8 Merge pull request #5736 from Codinlab/issue/5735
Fixes #5735 : ContentType name encoding in Lists
2015-09-04 16:35:03 -07:00
Sebastien Ros
39fb266221 Skipping DateTime tests until the right solution is found
c.f. #5702
2015-09-04 15:59:24 -07:00
Sebastien Ros
9b91b1b260 Removing unnecessary resolution 2015-09-04 13:20:08 -07:00
Sebastien Ros
c2194381f8 Removing unused usings 2015-09-04 12:12:13 -07:00
Sebastien Ros
c860b89e23 Removed erroneous HttpContextBase registrations 2015-09-04 12:12:02 -07:00
Sebastien Ros
04f29ba70c Revert "Cherry picked ce630f980c7a79ae17b36598f3834c4ffd523739."
This reverts commit aba53e122d.

Conflicts:
	src/Orchard.Web/Modules/Orchard.Layouts/Handlers/LayoutPartHandler.cs
	src/Orchard/Mvc/HttpContextAccessor.cs
	src/Orchard/Mvc/IHttpContextAccessor.cs
	src/Orchard/Mvc/MvcModule.cs
	src/Orchard/Orchard.Framework.csproj
	src/Orchard/Tasks/BackgroundService.cs
2015-09-04 10:59:31 -07:00
Sébastien Ros
e118695ea7 Merge pull request #5738 from harmony7/4852-orchardshellevents-workcontext
#4852: Wrap IOrchardShellEvents in a work context
2015-09-04 10:09:36 -07:00
Thierry Fleury
894e90f485 Use new ActionLink extension method. 2015-09-04 15:08:30 +02:00
Thierry Fleury
97bb52bbdd Add LinkExtensions
Allows using IHtmlString as linkText
2015-09-04 15:05:25 +02:00
Sébastien Ros
f3d08d61c4 Merge pull request #5741 from mvarblow/patch-2
Mark the npm repository as private
2015-09-03 14:24:05 -07:00
Sébastien Ros
22697edeec Merge pull request #5742 from mvarblow/patch-3
Suppressed warning CS0436 in Orchard.Framework
2015-09-03 14:23:26 -07:00
mvarblow
e0fc576f9e Suppressed warning CS0436 in Orchard.Framework
Daniel changed the Orchaard.Framework project to ignore the JetBrains.Annotations conflicts for debug builds several months back. See http://orchard.codeplex.com/workitem/21056 and 78901ba . However, the problem still exists for release builds. This pull request applies the same fix (ignoring the warning) to release builds.
2015-09-03 16:07:06 -04:00
mvarblow
ef9e5de8f4 Mark the npm repository as private
'npm install' was generating several warnings about missing properties in package.json. Marking the repository as private clears up the warnings.
2015-09-03 16:03:39 -04:00
harmony7@pex2.jp
5878611817 Wrap IOrchardShellEvents in a work context. 2015-09-03 22:19:21 +09:00
Thierry Fleury
2b61e3368d Fixes #5737 : ChangeListView throws NRE on unpublished Lists 2015-09-03 11:01:18 +02:00
Thierry Fleury
f5772334e1 Fixes #5735 : ContentType name encoding in Lists 2015-09-03 10:05:02 +02:00
Lombiq
fcc4a944bb Fixing that Projection Elements with the Default Layout selected weren't exported 2015-08-30 22:29:12 +02:00
Sebastien Ros
a0d61c67b8 Refactoring Import methods 2015-08-28 17:06:34 -07:00
Lombiq
42ff708da8 #5664: Lucene should page operations with the highest possible page size 2015-08-28 23:38:30 +02:00
Sebastien Ros
b52a846c5f #5664: Lucene should page operations
Fixes #5664
2015-08-27 15:31:39 -07:00
Sébastien Ros
9a8b64393e Merge pull request #5671 from RoyalVeterinaryCollege/4352
#4352: orphaned awaitingactivities

Fixes #4352
2015-08-27 12:39:24 -07:00
Jeff
bd1f14eeb0 Fix Issue #4352: Added prompt on workflow save to give choice of stopping running workflows. 2015-08-27 10:59:50 +01:00
Sebastien Ros
4b59569013 #5490 Fixing HttpRequestBase DependenciesShouldBeUpgradedFirst
Fixes #5490
2015-08-26 17:19:04 -07:00
Sébastien Ros
a603c7e07a Merge pull request #5678 from jchenga/issues/5618
#5618 taxonomy in autoroute needs to be saved twice

Fixes #5618
2015-08-26 16:48:13 -07:00
Sebastien Ros
96f6cb36fd Reverting session factory changes 2015-08-26 16:40:02 -07:00
Sébastien Ros
3d63c6d333 Merge pull request #5544 from yw80/patch-2
Remove the blank line at the bottom of every page after the default theme rendering.
2015-08-26 16:11:35 -07:00
Sébastien Ros
4cdb081c9d Merge pull request #5543 from yw80/patch-1
Correct CSS class name of MediaLibraryPickerField field
2015-08-26 16:05:16 -07:00
Sébastien Ros
9ed6b4261d Merge pull request #5542 from jtkech/patch-2
##5369: Allows simple properties null checking on a dynamic ContentItem or ContentPart

Fixes #5369
2015-08-26 16:04:09 -07:00
Sébastien Ros
a0e78f2eb0 Merge pull request #5571 from jersiovic/patch-6
Fixed #5140 Recipe from Migrations didn't work
2015-08-26 15:59:03 -07:00
Sébastien Ros
af4e41a717 Merge pull request #5667 from qt1/IBN-Labs/ItemEditLink_htmlAttributes
Support htmlAttributes in ItemEditLink

Fixes #5666
2015-08-26 15:54:13 -07:00
Sebastien Ros
7f91e787de Adding debug log when content item is imported 2015-08-26 14:44:56 -07:00
Sebastien Ros
6810cf473f Updating indexing tasks when content is imported or restored 2015-08-26 14:44:50 -07:00
Sebastien Ros
79a0ae86e8 Create index command should not delete existing index 2015-08-26 14:44:40 -07:00
Sebastien Ros
4cec35daf8 Disposing the session when a transaction is rolled back 2015-08-26 14:44:32 -07:00
Sebastien Ros
8d4cb98d59 Adding missing content handler Restore events 2015-08-26 14:44:25 -07:00
Sebastien Ros
e6424e2589 Removing empty folder 2015-08-26 14:44:15 -07:00
Sebastien Ros
dcc7783f12 Adding storage filter events for Import/Export 2015-08-26 09:47:39 -07:00
Sebastien Ros
d35ebe04e7 Adding User identity resolver
To improve import step for Users
2015-08-26 09:47:26 -07:00
Sebastien Ros
c80f2d4baa Fixing Search settings export 2015-08-26 09:46:46 -07:00
Sébastien Ros
9a4e0c1741 Merge pull request #5694 from dcinzona/patch-2
Fixes #5693 - DisableTheme Part breaks admin theme
2015-08-25 09:56:31 -07:00
Gustavo Tandeciarz
47d3d2b738 Fixes #5693
Will not disable the admin theme.
2015-08-25 12:54:26 -04:00
Sipke Schoorstra
e0e600a6ce Merge pull request #5688 from Codinlab/issue/5475
Fixes #5475 : Add missing properties to HttpRequestPlaceholder
2015-08-24 10:42:51 +01:00
Thierry Fleury
21875b98cc Fixes #5475 : Add missing properties to HttpRequestPlaceholder 2015-08-24 11:39:01 +02:00
Jack Cheng
28a1b4d663 #5618 taxonomy in autoroute needs to be saved twice
Fixes 5618
2015-08-21 19:27:29 -07:00
Gustavo Tandeciarz
bbcdd67b95 Cleanup
gulp-util was previously used during development and is no longer required.
2015-08-21 20:15:51 -04:00
Gustavo Tandeciarz
cfc1dc2379 Enables gulp watch of Assets.json
Will restart the watch task when Assets.json is changed.
2015-08-21 20:08:41 -04:00
Sebastien Ros
9e95f96195 Supporting .. syntax in watched assets 2015-08-21 16:01:44 -07:00
Jeff
770704f3a7 Added required attribute to enumeration and numeric fields.
Fixes #3404.
2015-08-21 16:40:01 +01:00
qt1
d9a3db1ebf Support htmlAttributes in ItemEditLink 2015-08-21 03:09:50 +03:00
Thierry Fleury
9980633ac3 Use Enumerable.Empty 2015-08-20 23:57:38 +02:00
Sébastien Ros
5b42c707b1 Merge pull request #5627 from Codinlab/fixes/ContentTypeEncoding
Fixes 5591 : ContentType's name encoding
2015-08-20 13:03:28 -07:00
Sébastien Ros
83a35f89cf Merge pull request #5644 from mvarblow/patch-1
Allow for packaging a debug build
2015-08-20 12:22:00 -07:00
Thierry Fleury
746d3d54c2 Fixes 5614 : ContentPickerField and LayoutPart throws argument null exception. 2015-08-18 12:46:09 +02:00
Daniel Stolt
f19b57c1e6 Fixed one remaining unit datetime localization unit test on Windows 10. 2015-08-17 00:25:34 +01:00
Daniel Stolt
7533cd8879 Improved DateTime localization and unit tests on Windows 10.
Added support for era names to date formatting/parsing framework. Added handling of cultures with missing AM/PM designators. Fixes failing unit tests on Windows 10. Fixes #5595.
2015-08-17 00:01:32 +01:00
Daniel Stolt
75609bf2ce Excluded private locator URLs from JSON serialization in Azure Media Services. Fixes #4686. 2015-08-16 20:13:33 +01:00
Daniel Stolt
4b44827f2a Added skeleton Assets.json to codegen theme template. 2015-08-16 17:50:47 +01:00
Daniel Stolt
a04195ee0e Added a simple skeleton Assets.json to codegen module template. Fixes #5606. 2015-08-16 17:38:16 +01:00
Daniel Stolt
b2c131f516 Refactored watch task in Gulpfile.js. 2015-08-16 16:15:46 +01:00
Daniel Stolt
359d25c1f2 Merge branch 'patch-5' of https://github.com/dcinzona/Orchard into 1.9.x 2015-08-16 14:43:36 +01:00
Lombiq
6552735df3 Media Library now correctly handles files with a # character in their name, fixes #5421. 2015-08-16 02:23:11 +02:00
Lombiq
59b3d50e03 Fixing that the empty username validation message wasn't shown on the Lost Password page, fixes #5353 2015-08-16 02:08:12 +02:00
Daniel Stolt
f2bf75328e Merge pull request #5642 from paynecrl97/5520/tenantAwareConfig
#5520 AppConfigurationAccessor is now tenant aware.

Fixes #5520.
2015-08-14 11:43:09 +01:00
Chris Payne
0213524317 AppConfigurationAccessor is now tenant aware 2015-08-14 11:34:28 +01:00
mvarblow
fd931397a4 Allow for packing a debug build
We use the orchard packaging script for continuous deployments to QA servers where we'd like to run debug builds.
2015-08-13 12:01:35 -04:00
Lombiq
64585223ee Fixing that Layouts couldn't be export/imported properly because they lacked an identity 2015-08-13 17:02:50 +02:00
Sipke Schoorstra
564fdc27be #5636: Fixed a bug with AliasStorage.Remove method.
Fixes #5636
2015-08-13 13:48:37 +01:00
Lombiq
06e4d2f7f8 Fixing typo/language 2015-08-11 02:04:57 +02:00
Thierry Fleury
cc70480126 Fixes 5591 : ContentType's name encoding 2015-08-10 15:28:19 +02:00
Gustavo Tandeciarz
7bcb6b83fb Update Package.json
Removed Gulp Notify as it is not required.
2015-08-10 08:08:29 -04:00
Gustavo Tandeciarz
e72471f020 Moved watchPaths in gulpfile
Moved the watchPaths generation to the watch task.
Cleaned up some spacing
2015-08-10 08:07:49 -04:00
Gustavo Tandeciarz
de74c00378 Updates to gulpfile.js
Removed comments and notify, as well as console.logs.
2015-08-10 07:53:19 -04:00
Sébastien Ros
b206a656e8 Merge pull request #5603 from mahsaro/WidgetLayersOrder_1.9.x
Ordered layers alphabetically in Widget admin UI.
2015-08-06 12:41:19 -07:00
Sébastien Ros
32669d347a Merge pull request #5610 from psenechal/1.9.x
Update Module.txt
2015-08-06 12:40:44 -07:00
Sébastien Ros
5bdfb6e98a Merge pull request #5476 from dcinzona/patch-1
Added mimetype declarations to root web.config
2015-08-06 12:40:01 -07:00
Lombiq
85fd5c8320 Fixing registration settings infoset migration 2015-08-06 21:30:35 +02:00
Sebastien Ros
41bd9ce9bc Adding a file system backed output cache provider 2015-08-05 16:59:34 -07:00
Sebastien Ros
e346170f24 Adding some documentation for IAppDataFolder 2015-08-05 14:21:22 -07:00
Gustavo Tandeciarz
b399925368 Updated Gulpfile.js
Switched property check to use `hasOwnProperty` instead of `!== undefined`
2015-08-05 08:42:08 -04:00
Gustavo Tandeciarz
ecbd485fd8 Updated Gulpfile.js
Removed variable option for rebuildAlways
Set watch task to always check `watchPaths` and populated that based on `watch` variable option (if the option is present, it will watch files designated in `watch` as well as files designated in `input`.  Otherwise, it will only watch files designated in `input`.
2015-08-05 08:28:08 -04:00
Gustavo Tandeciarz
0fcf8c7409 Updating gulpfile.js per request
Including some help text / comments
Set rebuildAlways to default to true when not specified
Set generateSourceMaps to default to true when not specified
Including files specified in 'inputs' into the watch list.
2015-08-05 06:37:46 -04:00
Sebastien Ros
430c3de460 Compressing output cache content in Redis 2015-08-04 17:28:49 -07:00
Philip Senechal
a6f5e4fb01 Update Module.txt
Spelling corrections
2015-08-04 16:25:30 -07:00
Philip Senechal
ff1fe79016 Update Module.txt
Language correction
2015-08-04 16:22:56 -07:00
Gustavo Tandeciarz
8e9f6ce8bd Adding gulp-notify package
required for gulpfile.js updates
2015-08-04 18:33:37 -04:00
Gustavo Tandeciarz
47e0b96725 Fixes #5607
Added optional properties to the Assets.json to support separating watch and build lists.
Also added support for excluding sourcemaps as well as forcing rebuild.

Requires gulp-notify (added fancier notification for process completion).
2015-08-04 18:31:55 -04:00
Sebastien Ros
f25758cc05 Refactoring connection multiplexer usage
For consistency with other services using Redis
2015-08-04 10:30:23 -07:00
Sebastien Ros
bb6a44634d Handling output cache provider exceptions 2015-08-04 10:29:46 -07:00
mahsaro
3657cfecab Ordered layers alphabetically in Widget admin UI. 2015-08-04 15:02:08 +01:00
Sebastien Ros
8a08680a74 Localizing RedisTagCache keys 2015-08-03 14:37:25 -07:00
Sebastien Ros
25670b9620 Fixing pager text encoding
Fixes #5359
2015-07-31 17:00:31 -07:00
Sebastien Ros
fa09e2e83a Using master content item to create translations
Fixes #5535
2015-07-31 16:19:34 -07:00
Sebastien Ros
a9a1413331 Fixing unit tests 2015-07-31 16:12:36 -07:00
Sebastien Ros
637cea6a02 Fixing Redis connection creation
With the previous code, when multiple threads tried to create
a Redis connection, the ConcurrentDictionary would have
called the factory delegate multiple times and added only one
of the resulting connections. This is by design, and a solution
is to use a Lazy object to defer the creation of the connection.
Multiple Lazy objects will be created but it doesn't have any impact.
2015-07-31 15:10:08 -07:00
Sebastien Ros
cc82bfcca0 Fixing duplicate session creation 2015-07-30 15:49:13 -07:00
Daniel Stolt
faa216147d Merge pull request #5575 from Codinlab/issue/5519
Fixes #5519 : DynamicForms client validation issue
2015-07-29 16:59:40 +01:00
Sipke Schoorstra
cbf10216b0 Merge pull request #5581 from dcinzona/patch-4
Updated README.md Orchard version to 1.9.1
2015-07-28 15:14:00 +01:00
Gustavo Tandeciarz
bb560f9cdf Updated README.md Orchard version to 1.9.1
Was listing 1.8.1 as latest version in the readme. Minor update.
2015-07-28 08:57:49 -04:00
Thierry Fleury
bc2e0607ef DynamicForms : Mark css & js assets as content
MsBuild raise errors when ccs or js files have "None" BuildAction
2015-07-27 13:30:29 +02:00
Thierry Fleury
cd5ca49b32 Fixes #5519 : DynamicForms client validation issue
jQuery validate script order is important
2015-07-27 11:31:47 +02:00
Daniel Stolt
6da6c5c214 #5450: Implemented generalized Gulp automation.
Fixes #5446.
2015-07-26 01:14:14 +01:00
Lombiq
37a5a7effc Wrapping ITokenizer injection into Work<> for shape methods to prevent possible DependencyResolutionException.
Not doing this can cause "No scope with a Tag matching 'work' is visible from the scope in which the instance was requested." errors with certain token providers.
2015-07-26 00:53:19 +02:00
Nicholas Mayne
baad84ee7b Merge pull request #5570 from jtkech/patch-3
Incorrect plus characters break the compilation in DefaultDataMigrationInterpreter.cs
2015-07-25 21:23:58 +01:00
Sergio Navarro
8a8b0f91c6 Fixed #5140 Recipe from Migrations didn't work 2015-07-25 08:54:31 +02:00
jtkech
93476c321a Update DefaultDataMigrationInterpreter.cs
Remove incorrect plus characters that break the compilation
2015-07-24 20:31:25 +02:00
yw80
879e35dcc0 Correct CSS class name of MediaLibraryPickerField field
Field CSS class name should use the technical name, rather than the display name.
2015-07-24 12:21:31 +08:00
jtkech
e8111cef5e Update DynamicContentItemTests.cs
Adds an unit test for null checking on dynamic ContentItem / ContentPart properties
2015-07-24 02:54:01 +02:00
yw80
a0f42632e0 Remove the blank line at the bottom of every page after the default theme rendering.
Set a background color to #layout-footer In Site.css, you can clearly see the blank line at the bottom.
2015-07-20 15:43:23 +08:00
jtkech
28643ae7b8 Update ContentPart.cs 2015-07-20 02:23:56 +02:00
jtkech
70ea2df334 Update ContentItem.cs 2015-07-20 02:11:49 +02:00
yw80
30a95ed773 Correct CSS class name of MediaLibraryPickerField field
Field CSS class name should use the technical name, rather than the
display name.
2015-07-17 17:58:18 +08:00
Gustavo Tandeciarz
b76306dfb3 Added mimeMaps to root web.config
I'm not sure that this is something that we want to include globally, but I have had some issues with the following mime maps on Azure.
Specifically, SVG files getting returned as binary, breaking embeds in media library, editors and UI (front and admin).

This may also be directly related to storing media files in azure blob storage (and setting the mimetype when uploading files to blob storage)
2015-07-06 08:14:08 -04:00
628 changed files with 8490 additions and 29894 deletions

View File

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

View File

@@ -1,6 +1,13 @@
# Orchard
Orchard is a free, open source, community-focused Content Management System built on the ASP.NET MVC platform.
[![Join the chat at https://gitter.im/OrchardCMS/Orchard](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/OrchardCMS/Orchard?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
You can try it for free on [DotNest.com](https://dotnest.com) or on Microsoft Azure by clicking on this button
[![Deploy to Azure](https://azuredeploy.net/deploybutton.png)](https://ms.portal.azure.com/#create/OutercurveFoundation.OrchardCMS.0.5.9)
## About The Orchard Project
#### Please visit our website at http://orchardproject.net for the most current information about this project.
@@ -13,26 +20,29 @@ Orchard is delivered under the [.NET Foundation](http://www.dotnetfoundation.org
Our mission is to empower our users and foster a dedicated and diverse community that builds the CMS that we all want to use.
There are many ways you can [contribute to Orchard](http://orchardproject.net/contribution): you can [fix bugs](https://github.com/OrchardCMS/Orchard/issues), contribute modules and themes to [our gallery](http://gallery.orchardproject.net/), [write documentation](https://github.com/OrchardCMS/OrchardDoc), [translate Orchard](http://orchardproject.net/localize), or answer questions [on our forums](http://orchard.codeplex.com/discussions) and [on Stack Overflow](http://stackoverflow.com/questions/tagged/orchardcms).
## Project Status
Orchard is currently in version 1.8.1. We invite participation by the developer community in shaping the projects direction, so that we can publicly validate our designs and development approach.
Our 1.8.1 release is available from our Downloads page, and is easy to [Install Orchard using the Web Platform Installer](http://www.orchardproject.net/docs/Installing-Orchard.ashx). We encourage interested developers to check out the source code on the Orchard Github site and get involved with the project.
Orchard is currently in version 1.9.2. We invite participation by the developer community in shaping the projects direction, so that we can publicly validate our designs and development approach.
Our 1.9.2 release is available from our Downloads page, and is easy to [Install Orchard using the Web Platform Installer](http://docs.orchardproject.net/Documentation/Installing-Orchard). We encourage interested developers to check out the source code on the Orchard Github site and get involved with the project.
* [Download the latest release](https://github.com/OrchardCMS/Orchard/releases)
* [Feature roadmap](http://www.orchardproject.net/docs/feature-roadmap.ashx)
* [Feature roadmap](http://docs.orchardproject.net/Documentation/feature-roadmap)
* [Docs and designs/specs](http://www.orchardproject.net/docs)
* [About us](http://www.orchardproject.net/about)
* [Contact us](mailto:ofeedbk@microsoft.com)
## How To Get Involved
We hope that by engaging with the community in the very early stages of the project that we will be able to shape Orchard into a valuable set of tools and applications for the community. The Orchard team is committed to open community participation and accepts code contributions today. We encourage community participation at all levels from general project feedback to bug fixes and patches.
We hope that by engaging with the community we will continue to shape Orchard into a valuable set of tools and applications. The Orchard team is committed to open community participation and accepts code contributions. We encourage community participation at all levels from general project feedback to bug fixes and patches.
There are many ways you can [contribute to Orchard](http://orchardproject.net/contribution):
* [Check out the code](https://github.com/OrchardCMS/Orchard)
* [Check out the docs](http://orchardproject.net/docs)
* [Write documentation](https://github.com/OrchardCMS/OrchardDoc)
* [Find and file a bug](https://github.com/OrchardCMS/Orchard/issues)
* [Propose a feature idea](http://orchard.uservoice.com)
* [Ask and answer questions](http://www.orchardproject.net/discussions)
* [Ask and answer questions in our forums](http://www.orchardproject.net/discussions) and [on Stack Overflow](http://stackoverflow.com/questions/tagged/orchardcms)
* [Participate in our gitter.im chatroom](https://gitter.im/OrchardCMS/Orchard)
* [Participate in forum discussions](http://orchard.codeplex.com/discussions)
* [Submit a patch](http://www.orchardproject.net/docs/Contributing-patches.ashx)
* [Submit a pull request](http://docs.orchardproject.net/Documentation/Contributing-patches)
* [Translate Orchard](http://orchardproject.net/localize)
* [Contribute modules and themes to our gallery](http://gallery.orchardproject.net/)
* [Send us feedback](mailto:ofeedbk@microsoft.com)

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -1 +0,0 @@
This is a modified version including a [assembly: SecutiryTransparent] attribute in AssemblyInfo.cs

View File

@@ -0,0 +1,9 @@
/**********************************************************************/
/* Install.SQL */
/* Creates a login and makes the user a member of db roles */
/* */
/* Modifications for SQL AZURE - ON MASTER */
/**********************************************************************/
CREATE LOGIN PlaceHolderForUser WITH PASSWORD = 'PlaceHolderForPassword'

View File

@@ -0,0 +1,15 @@
/**********************************************************************/
/* CreateUser.SQL */
/* Creates a user and makes the user a member of db roles */
/* This script runs against the User database and requires connection string */
/* Supports SQL Server and SQL AZURE */
/**********************************************************************/
-- Create database user and map to login
-- and add user to the datareader, datawriter, ddladmin and securityadmin roles
--
CREATE USER PlaceHolderForUser FOR LOGIN PlaceHolderForUser;
GO
EXEC sp_addrolemember 'db_owner', PlaceHolderForUser;
GO

View File

@@ -1,45 +0,0 @@
/**********************************************************************/
/* Install.SQL */
/* Creates a login and makes the user a member of db roles */
/* */
/**********************************************************************/
-- Declare variables for database name, username and password
DECLARE @dbName sysname,
@dbUser sysname,
@dbPwd nvarchar(max);
-- Set variables for database name, username and password
SET @dbName = 'PlaceHolderForDb';
SET @dbUser = 'PlaceHolderForUser';
SET @dbPwd = 'PlaceHolderForPassword';
DECLARE @cmd nvarchar(max)
-- Create login
IF( SUSER_SID(@dbUser) is null )
BEGIN
print '-- Creating login '
SET @cmd = N'CREATE LOGIN ' + quotename(@dbUser) + N' WITH PASSWORD ='''+ replace(@dbPwd, '''', '''''') + N''''
EXEC(@cmd)
END
-- Create database user and map to login
-- and add user to the datareader, datawriter, ddladmin and securityadmin roles
--
SET @cmd = N'USE ' + quotename(@DBName) + N';
IF( NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = ''' + replace(@dbUser, '''', '''''') + N'''))
BEGIN
print ''-- Creating user'';
CREATE USER ' + quotename(@dbUser) + N' FOR LOGIN ' + quotename(@dbUser) + N';
print ''-- Adding user'';
EXEC sp_addrolemember ''db_ddladmin'', ''' + replace(@dbUser, '''', '''''') + N''';
print ''-- Adding user'';
EXEC sp_addrolemember ''db_securityadmin'', ''' + replace(@dbUser, '''', '''''') + N''';
print ''-- Adding user'';
EXEC sp_addrolemember ''db_datareader'', ''' + replace(@dbUser, '''', '''''') + N''';
print ''-- Adding user'';
EXEC sp_addrolemember ''db_datawriter'', ''' + replace(@dbUser, '''', '''''') + N''';
END'
EXEC(@cmd)
GO

View File

@@ -1,7 +1,13 @@
<MSDeploy.iisApp>
<iisapp path="Orchard" managedRuntimeVersion="v4.0" />
<iisapp path="Orchard" managedRuntimeVersion="v4.0" />
<setAcl path="Orchard/App_Data" setAclAccess="Modify" />
<setAcl path="Orchard/Media" setAclAccess="Modify" />
<setAcl path="Orchard/bin/HostRestart" setAclAccess="Modify" />
<dbFullSql path="install.sql" />
</MSDeploy.iisApp>
<!-- Runs SQL script to create login and assign permissions, requires transacted="false"
This script runs as the database administrator provided in parameters.xml
-->
<dbfullsql path="createlogin.sql" transacted="false" />
<dbfullsql path="createuser.sql" transacted="false" />
</MSDeploy.iisApp>

View File

@@ -23,19 +23,20 @@
<!-- Prompts for the database name and fills it into the database scripts -->
<parameter name="Database Name" description="Name of the database for Orchard." defaultValue="orchard" tags="SQL, dbName">
<parameterEntry type="TextFile" scope="install.sql" match="PlaceHolderForDb" />
</parameter>
<!-- Prompts for the database username and fills it into the database scripts.
The SQL tag indicates it is a parameter required for SQL, the DbUsername tag indicates this is a Db username -->
<parameter name="Database Username" description="User name to access you application database." defaultValue="orcharduser" tags="SQL, DbUsername">
<parameterEntry type="TextFile" scope="install.sql" match="PlaceHolderForUser" />
<parameterEntry type="TextFile" scope="createuser.sql" match="PlaceHolderForUser" />
<parameterEntry type="TextFile" scope="createlogin.sql" match="PlaceHolderForUser" />
</parameter>
<!-- Prompts for the database password and fills it into the database scripts.
The SQL tag indicates it is a parameter required for SQL, the DbUserPassword tag indicates this is a Db password -->
<parameter name="Database Password" description="Password for the Database Username." tags="New, Password, SQL, DbUserPassword">
<parameterEntry type="TextFile" scope="install.sql" match="PlaceHolderForPassword" />
<parameterEntry type="TextFile" scope="createlogin.sql" match="PlaceHolderForPassword" />
</parameter>
<!-- Prompts for the admin creds and uses it for the administrator connection string. This is used to create a login and assign permissions.
@@ -47,19 +48,17 @@
<!-- Prompts for the admin password and uses it for the administrator connection string.
This is use to create a login and assign permissions. The SQL tag indicates it is a parameter required for SQL.
The DbAdminPassword tag indicates it should be used when the user is creating a new database. If they're not, it can be filled in with the DbUserPassword value. -->
<parameter name="Database Administrator Password" description="Password for the database administrator account." tags="New, Password, SQL, dbAdminPassword">
<parameter name="Database Administrator Password" description="Password for the database administrator account." tags="Password, SQL, dbAdminPassword">
</parameter>
<parameter name="Admin Connection String SqlServer"
tags="SQLConnectionString, AdminConnectionString, Hidden, Validate" description="Automatically sets the connection string for the connection request."
defaultValue="Data Source={Database Server};Initial Catalog={Database Name};User Id={Database Administrator};Password={Database Administrator Password}">
<parameterEntry type="ProviderPath" scope="dbfullsql" match="install.sql" />
<parameter name="Admin Connection String SqlServer1" tags="SQLConnectionString, sql, Hidden" description="Automatically sets the connection string for the connection request." defaultValue="Data Source={Database Server};Initial Catalog=MASTER;User Id={Database Administrator};Password={Database Administrator Password}">
<parameterEntry type="ProviderPath" scope="dbfullsql" match="createlogin.sql" />
</parameter>
<parameter name="Non-Admin Connection String SqlServer"
tags="SQLConnectionString, UserConnectionString, Hidden" description="Automatically sets the connection string for the connection request."
defaultValue="Data Source={Database Server};Initial Catalog={Database Name};User Id={Database Username};Password={Database Password}">
<parameter name="Admin Connection String SqlServer2" tags="SQLConnectionString, SQL, Hidden" description="Automatically sets the connection string for the connection request." defaultValue="Data Source={Database Server};Initial Catalog={Database Name};User Id={Database Administrator};Password={Database Administrator Password}">
<parameterEntry type="ProviderPath" scope="dbfullsql" match="createuser.sql" />
</parameter>
<parameter name="Orchard Connection String" friendlyName="Orchard Connection String" description="Orchard SQL Data Connection String Setting" defaultValue="" tags="Sql, SqlCE, SingleLineConnectionString, Hidden">
<parameterEntry kind="TextFile" scope="\\Settings\.txt$" match="(?&lt;=\s*DataConnectionString:\s+)[^\s].*[^\r\n]" />

Binary file not shown.

View File

@@ -161,6 +161,237 @@
asynchronous request failed.
</summary>
</member>
<member name="T:Microsoft.Azure.ResourceBase">
<summary>
Resource information.
</summary>
</member>
<member name="M:Microsoft.Azure.ResourceBase.#ctor">
<summary>
Initializes a new instance of the ResourceBase class.
</summary>
</member>
<member name="M:Microsoft.Azure.ResourceBase.#ctor(System.String)">
<summary>
Initializes a new instance of the ResourceBase class with required
arguments.
</summary>
</member>
<member name="P:Microsoft.Azure.ResourceBase.Location">
<summary>
Required. Gets or sets the location of the resource.
</summary>
</member>
<member name="P:Microsoft.Azure.ResourceBase.Tags">
<summary>
Optional. Gets or sets the tags attached to the resource.
</summary>
</member>
<member name="T:Microsoft.Azure.ResourceBaseExtended">
<summary>
Resource information with extended details.
</summary>
</member>
<member name="M:Microsoft.Azure.ResourceBaseExtended.#ctor">
<summary>
Initializes a new instance of the ResourceBaseExtended class.
</summary>
</member>
<member name="M:Microsoft.Azure.ResourceBaseExtended.#ctor(System.String)">
<summary>
Initializes a new instance of the ResourceBaseExtended class with
required arguments.
</summary>
</member>
<member name="P:Microsoft.Azure.ResourceBaseExtended.Id">
<summary>
Optional. Gets or sets the ID of the resource.
</summary>
</member>
<member name="P:Microsoft.Azure.ResourceBaseExtended.Name">
<summary>
Optional. Gets or sets the name of the resource.
</summary>
</member>
<member name="P:Microsoft.Azure.ResourceBaseExtended.Type">
<summary>
Optional. Gets or sets the type of the resource.
</summary>
</member>
<member name="T:Microsoft.Azure.ResourceIdentity">
<summary>
Resource identity.
</summary>
</member>
<member name="M:Microsoft.Azure.ResourceIdentity.#ctor">
<summary>
Initializes a new instance of the ResourceIdentity class.
</summary>
</member>
<member name="M:Microsoft.Azure.ResourceIdentity.#ctor(System.String,System.String,System.String)">
<summary>
Initializes a new instance of the ResourceIdentity class.
</summary>
</member>
<member name="M:Microsoft.Azure.ResourceIdentity.GetProviderFromResourceType(System.String)">
<summary>
Returns provider string from resource type.
</summary>
<param name="resourceType">Resource type.</param>
<returns>Provider</returns>
</member>
<member name="M:Microsoft.Azure.ResourceIdentity.GetTypeFromResourceType(System.String)">
<summary>
Returns type string from resource type.
</summary>
<param name="resourceType">Resource type.</param>
<returns>Type</returns>
</member>
<member name="P:Microsoft.Azure.ResourceIdentity.ParentResourcePath">
<summary>
Optional. Gets or sets parent resource path (optional).
</summary>
</member>
<member name="P:Microsoft.Azure.ResourceIdentity.ResourceName">
<summary>
Required. Gets or sets resource name.
</summary>
</member>
<member name="P:Microsoft.Azure.ResourceIdentity.ResourceProviderApiVersion">
<summary>
Required. Gets or sets API version of the resource provider.
</summary>
</member>
<member name="P:Microsoft.Azure.ResourceIdentity.ResourceProviderNamespace">
<summary>
Required. Gets or sets namespace of the resource provider.
</summary>
</member>
<member name="P:Microsoft.Azure.ResourceIdentity.ResourceType">
<summary>
Required. Gets or sets resource type.
</summary>
</member>
<member name="T:Microsoft.Azure.Common.OData.FilterParameterAttribute">
<summary>
Parameter attribute used with OData filters.
</summary>
</member>
<member name="M:Microsoft.Azure.Common.OData.FilterParameterAttribute.#ctor(System.String)">
<summary>
Initializes a new instance of the <see cref="T:Microsoft.Azure.Common.OData.FilterParameterAttribute"/> class.
</summary>
<param name="name">Property name to use in the filter.</param>
</member>
<member name="M:Microsoft.Azure.Common.OData.FilterParameterAttribute.#ctor(System.String,System.String)">
<summary>
Initializes a new instance of the <see cref="T:Microsoft.Azure.Common.OData.FilterParameterAttribute"/> class.
</summary>
<param name="name">Property name to use in the filter.</param>
<param name="format">Format of the value.</param>
</member>
<member name="P:Microsoft.Azure.Common.OData.FilterParameterAttribute.Name">
<summary>
Property name to use in the filter.
</summary>
</member>
<member name="P:Microsoft.Azure.Common.OData.FilterParameterAttribute.Format">
<summary>
Format of the value.
</summary>
</member>
<member name="T:Microsoft.Azure.Common.OData.FilterString">
<summary>
Handles OData filter generation.
</summary>
</member>
<member name="M:Microsoft.Azure.Common.OData.FilterString.Generate``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})">
<summary>
Generates an OData filter from a specified Linq expression.
</summary>
<typeparam name="T">Filter type</typeparam>
<param name="filter">Entity to use for filter generation</param>
<returns></returns>
</member>
<member name="T:Microsoft.Azure.Common.OData.UrlExpressionVisitor">
<summary>
Expression visitor class that generates OData style $filter parameter.
</summary>
</member>
<member name="M:Microsoft.Azure.Common.OData.UrlExpressionVisitor.VisitBinary(System.Linq.Expressions.BinaryExpression)">
<summary>
Visits binary expression like ==, &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.

Binary file not shown.

View File

@@ -0,0 +1,114 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>Microsoft.Azure.KeyVault.Core</name>
</assembly>
<members>
<member name="T:Microsoft.Azure.KeyVault.Core.IKey">
<summary>
Interface for Keys
</summary>
</member>
<member name="M:Microsoft.Azure.KeyVault.Core.IKey.DecryptAsync(System.Byte[],System.Byte[],System.Byte[],System.Byte[],System.String,System.Threading.CancellationToken)">
<summary>
Decrypts the specified cipher text.
</summary>
<param name="ciphertext">The cipher text to decrypt</param>
<param name="iv">The initialization vector</param>
<param name="authenticationData">The authentication data</param>
<param name="algorithm">The algorithm to use</param>
<param name="token">Cancellation token</param>
<returns>The plain text</returns>
<remarks>If algorithm is not specified, an implementation should use its default algorithm.
Not all algorithms require, or support, all parameters.</remarks>
</member>
<member name="M:Microsoft.Azure.KeyVault.Core.IKey.EncryptAsync(System.Byte[],System.Byte[],System.Byte[],System.String,System.Threading.CancellationToken)">
<summary>
Encrypts the specified plain text.
</summary>
<param name="plaintext">The plain text to encrypt</param>
<param name="iv">The initialization vector</param>
<param name="authenticationData">The authentication data</param>
<param name="algorithm">The algorithm to use</param>
<param name="token">Cancellation token</param>
<returns>A Tuple consisting of the cipher text, the authentication tag (if applicable), the algorithm used</returns>
<remarks>If the algorithm is not specified, an implementation should use its default algorithm.
Not all algorithyms require, or support, all parameters.</remarks>
</member>
<member name="M:Microsoft.Azure.KeyVault.Core.IKey.WrapKeyAsync(System.Byte[],System.String,System.Threading.CancellationToken)">
<summary>
Encrypts the specified key material.
</summary>
<param name="key">The key material to encrypt</param>
<param name="algorithm">The algorithm to use</param>
<param name="token">Cancellation token</param>
<returns>A Tuple consisting of the encrypted key and the algorithm used</returns>
<remarks>If the algorithm is not specified, an implementation should use its default algorithm</remarks>
</member>
<member name="M:Microsoft.Azure.KeyVault.Core.IKey.UnwrapKeyAsync(System.Byte[],System.String,System.Threading.CancellationToken)">
<summary>
Decrypts the specified key material.
</summary>
<param name="encryptedKey">The encrypted key material</param>
<param name="algorithm">The algorithm to use</param>
<param name="token">Cancellation token</param>
<returns>The decrypted key material</returns>
<remarks>If the algorithm is not specified, an implementation should use its default algorithm</remarks>
</member>
<member name="M:Microsoft.Azure.KeyVault.Core.IKey.SignAsync(System.Byte[],System.String,System.Threading.CancellationToken)">
<summary>
Signs the specified digest.
</summary>
<param name="digest">The digest to sign</param>
<param name="algorithm">The algorithm to use</param>
<param name="token">Cancellation token</param>
<returns>A Tuple consisting of the signature and the algorithm used</returns>
<remarks>If the algorithm is not specified, an implementation should use its default algorithm</remarks>
</member>
<member name="M:Microsoft.Azure.KeyVault.Core.IKey.VerifyAsync(System.Byte[],System.Byte[],System.String,System.Threading.CancellationToken)">
<summary>
Verifies the specified signature value
</summary>
<param name="digest">The digest</param>
<param name="signature">The signature value</param>
<param name="algorithm">The algorithm to use</param>
<param name="token">Cancellation token</param>
<returns>A bool indicating whether the signature was successfully verified</returns>
</member>
<member name="P:Microsoft.Azure.KeyVault.Core.IKey.DefaultEncryptionAlgorithm">
<summary>
The default encryption algorithm for this key
</summary>
</member>
<member name="P:Microsoft.Azure.KeyVault.Core.IKey.DefaultKeyWrapAlgorithm">
<summary>
The default key wrap algorithm for this key
</summary>
</member>
<member name="P:Microsoft.Azure.KeyVault.Core.IKey.DefaultSignatureAlgorithm">
<summary>
The default signature algorithm for this key
</summary>
</member>
<member name="P:Microsoft.Azure.KeyVault.Core.IKey.Kid">
<summary>
The key identifier
</summary>
</member>
<member name="T:Microsoft.Azure.KeyVault.Core.IKeyResolver">
<summary>
Interface for key resolvers.
</summary>
</member>
<member name="M:Microsoft.Azure.KeyVault.Core.IKeyResolver.ResolveKeyAsync(System.String,System.Threading.CancellationToken)">
<summary>
Provides an IKey implementation for the specified key identifier.
</summary>
<param name="kid">The key identifier to resolve</param>
<param name="token">Cancellation token</param>
<returns>The resolved IKey implementation or null</returns>
<remarks>Implementations should check the format of the kid to ensure that it is recognized. Null, rather than
an exception, should be returned for unrecognized key identifiers to enable chaining of key resolvers.</remarks>
</member>
</members>
</doc>

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="typeKindFromPayloadFunc">A func to compute the type kind from the payload shape if it could not be determined from the expected type or the payload type.</param>
<param name="typeKindPeekedFromPayloadFunc">A func to compute the type kind from the payload shape if it could not be determined from the expected type or the payload type.</param>
<param name="targetTypeKind">The target type kind to be used to read the payload.</param>
<param name="serializationTypeNameAnnotation">Potentially non-null instance of an annotation to put on the value reported from the reader.</param>
<returns>

View File

@@ -4,19 +4,19 @@
<name>Microsoft.WindowsAzure.Configuration</name>
</assembly>
<members>
<member name="T:Microsoft.WindowsAzure.CloudConfigurationManager">
<member name="T:Microsoft.Azure.CloudConfigurationManager">
<summary>
Configuration manager for accessing Windows Azure settings.
Configuration manager for accessing Microsoft Azure settings.
</summary>
</member>
<member name="M:Microsoft.WindowsAzure.CloudConfigurationManager.GetSetting(System.String)">
<member name="M:Microsoft.Azure.CloudConfigurationManager.GetSetting(System.String)">
<summary>
Gets a setting with the given name.
</summary>
<param name="name">Setting name.</param>
<returns>Setting value or null if not found.</returns>
</member>
<member name="P:Microsoft.WindowsAzure.CloudConfigurationManager.AppSettings">
<member name="P:Microsoft.Azure.CloudConfigurationManager.AppSettings">
<summary>
Gets application settings.
</summary>
@@ -42,17 +42,17 @@
Looks up a localized string similar to Argument &quot;{0}&quot; cannot be an empty string..
</summary>
</member>
<member name="T:Microsoft.WindowsAzure.AzureApplicationSettings">
<member name="T:Microsoft.Azure.AzureApplicationSettings">
<summary>
Windows Azure settings.
Microsoft Azure settings.
</summary>
</member>
<member name="M:Microsoft.WindowsAzure.AzureApplicationSettings.#ctor">
<member name="M:Microsoft.Azure.AzureApplicationSettings.#ctor">
<summary>
Initializes the settings.
</summary>
</member>
<member name="M:Microsoft.WindowsAzure.AzureApplicationSettings.IsMissingSettingException(System.Exception)">
<member name="M:Microsoft.Azure.AzureApplicationSettings.IsMissingSettingException(System.Exception)">
<summary>
Checks whether the given exception represents an exception throws
for a missing setting.
@@ -60,14 +60,14 @@
<param name="e">Exception</param>
<returns>True for the missing setting exception.</returns>
</member>
<member name="M:Microsoft.WindowsAzure.AzureApplicationSettings.GetSetting(System.String)">
<member name="M:Microsoft.Azure.AzureApplicationSettings.GetSetting(System.String)">
<summary>
Gets a setting with the given name.
</summary>
<param name="name">Setting name.</param>
<returns>Setting value or null if such setting does not exist.</returns>
</member>
<member name="M:Microsoft.WindowsAzure.AzureApplicationSettings.GetValue(System.String,System.String,System.Func{System.String,System.String})">
<member name="M:Microsoft.Azure.AzureApplicationSettings.GetValue(System.String,System.String,System.Func{System.String,System.String})">
<summary>
Gets setting's value from the given provider.
</summary>
@@ -76,21 +76,21 @@
<param name="getValue">Method to obtain given setting.</param>
<returns>Setting value, or null if not found.</returns>
</member>
<member name="M:Microsoft.WindowsAzure.AzureApplicationSettings.GetServiceRuntimeSetting(System.String)">
<member name="M:Microsoft.Azure.AzureApplicationSettings.GetServiceRuntimeSetting(System.String)">
<summary>
Gets a configuration setting from the service runtime.
</summary>
<param name="name">Setting name.</param>
<returns>Setting value or null if not found.</returns>
</member>
<member name="M:Microsoft.WindowsAzure.AzureApplicationSettings.GetServiceRuntimeAssembly">
<member name="M:Microsoft.Azure.AzureApplicationSettings.GetServiceRuntimeAssembly">
<summary>
Loads and returns the latest available version of the service
runtime assembly.
</summary>
<returns>Loaded assembly, if any.</returns>
</member>
<member name="M:Microsoft.WindowsAzure.NativeMethods.GetAssemblyPath(System.String)">
<member name="M:Microsoft.Azure.NativeMethods.GetAssemblyPath(System.String)">
<summary>
Gets an assembly path from the GAC given a partial name.
</summary>

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -4,16 +4,17 @@ 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")
header = require("gulp-header"),
fs = require("fs");
/*
** GULP TASKS
@@ -37,25 +38,53 @@ gulp.task("rebuild", function () {
return merge(assetGroupTasks);
});
// Continuous watch (each asset group is built whenever one of its inputs changes).
// Set "Watchers" as sub-processes in order to restart the task when Assets.json changes.
gulp.task("watch", function () {
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 watchers;
function restart() {
if (watchers) {
watchers.forEach(function (w) {
w.remove();
w.end();
});
}
watchers = [];
// Continuous watch (each asset group is built whenever one of its inputs changes).
getAssetGroups().forEach(function (assetGroup) {
var watchPaths = assetGroup.inputPaths.concat(assetGroup.watchPaths);
var watcher = gulp.watch(watchPaths, function (event) {
var isConcat = path.basename(assetGroup.outputFileName, path.extname(assetGroup.outputFileName)) !== "@";
if (isConcat)
console.log("Asset file '" + event.path + "' was " + event.type + ", rebuilding asset group with output '" + assetGroup.outputPath + "'.");
else
console.log("Asset file '" + event.path + "' was " + event.type + ", rebuilding asset group.");
var doRebuild = true;
var task = createAssetGroupTask(assetGroup, doRebuild);
});
watchers.push(watcher);
});
}
var p;
if (p) { p.exit(); }
p = gulp.watch("Orchard.Web/{Core,Modules,Themes}/*/Assets.json", function (event) {
console.log("Asset file '" + event.path + "' was " + event.type + ", resetting asset watchers.");
restart();
});
restart();
});
/*
** ASSET GROUPS
*/
function getAssetGroups() {
var assetManifestPaths = glob.sync("Orchard.Web/{Core,Modules,Themes}/*/Assets.json");
var assetManifestPaths = glob.sync("Orchard.Web/{Core,Modules,Themes}/*/Assets.json", {});
var assetGroups = [];
assetManifestPaths.forEach(function (assetManifestPath) {
var assetManifest = require("./" + assetManifestPath);
var file = './' + assetManifestPath;
var json = fs.readFileSync(file, 'utf8');
assetManifest = eval(json);
assetManifest.forEach(function (assetGroup) {
resolveAssetGroupPaths(assetGroup, assetManifestPath);
assetGroups.push(assetGroup);
@@ -67,9 +96,15 @@ function getAssetGroups() {
function resolveAssetGroupPaths(assetGroup, assetManifestPath) {
assetGroup.basePath = path.dirname(assetManifestPath);
assetGroup.inputPaths = assetGroup.inputs.map(function (inputPath) {
return path.join(assetGroup.basePath, inputPath);
return path.resolve(path.join(assetGroup.basePath, inputPath));
});
assetGroup.outputPath = path.join(assetGroup.basePath, assetGroup.output);
assetGroup.watchPaths = [];
if (!!assetGroup.watch) {
assetGroup.watchPaths = assetGroup.watch.map(function (watchPath) {
return path.resolve(path.join(assetGroup.basePath, watchPath));
});
}
assetGroup.outputPath = path.resolve(path.join(assetGroup.basePath, assetGroup.output));
assetGroup.outputDir = path.dirname(assetGroup.outputPath);
assetGroup.outputFileName = path.basename(assetGroup.output);
}
@@ -95,6 +130,7 @@ 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,
@@ -104,7 +140,7 @@ function buildCssPipeline(assetGroup, doRebuild) {
ext: ".css"
}))))
.pipe(plumber())
.pipe(sourcemaps.init())
.pipe(gulpif(generateSourceMaps, sourcemaps.init()))
.pipe(gulpif("*.less", less()))
.pipe(gulpif(doConcat, concat(assetGroup.outputFileName)))
.pipe(autoprefixer({ browsers: ["last 2 versions"] }))
@@ -115,7 +151,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(sourcemaps.write())
.pipe(gulpif(generateSourceMaps, sourcemaps.write()))
.pipe(gulp.dest(assetGroup.outputDir))
.pipe(minify())
.pipe(rename({
@@ -131,6 +167,7 @@ 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,
@@ -140,14 +177,14 @@ function buildJsPipeline(assetGroup, doRebuild) {
ext: ".js"
}))))
.pipe(plumber())
.pipe(sourcemaps.init())
.pipe(gulpif(generateSourceMaps, 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" +
@@ -155,11 +192,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(sourcemaps.write())
.pipe(gulpif(generateSourceMaps, 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.5</ProductVersion>
<ProductVersion>2.7</ProductVersion>
<ProjectGuid>{03c5327d-4e8e-45a7-acd1-e18e7caa3c4a}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
@@ -35,8 +35,9 @@
</PropertyGroup>
<!-- Items for the project -->
<ItemGroup>
<ServiceConfiguration Include="ServiceConfiguration.Local.cscfg" />
<ServiceDefinition Include="ServiceDefinition.csdef" />
<ServiceConfiguration Include="ServiceConfiguration.cscfg" />
<ServiceConfiguration Include="ServiceConfiguration.Cloud.cscfg" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Orchard.Azure.Web\Orchard.Azure.Web.csproj">
@@ -65,7 +66,7 @@
<!-- Import the target files for this project template -->
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<CloudExtensionsDir Condition=" '$(CloudExtensionsDir)' == '' ">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Windows Azure Tools\2.5\</CloudExtensionsDir>
<CloudExtensionsDir Condition=" '$(CloudExtensionsDir)' == '' ">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Windows Azure Tools\2.7\</CloudExtensionsDir>
</PropertyGroup>
<Import Project="$(CloudExtensionsDir)Microsoft.WindowsAzure.targets" />
<!-- The BeforeAddRoleContent override ensures that content in themes and modules get added

View File

@@ -1,20 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<ServiceConfiguration serviceName="OrchardCloudService" osFamily="4" osVersion="*" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" schemaVersion="2014-06.2.4">
<Role name="Orchard.Azure.Web">
<Instances count="1" />
<ConfigurationSettings>
<Setting name="Orchard.Azure.Media.StorageConnectionString" value="UseDevelopmentStorage=true" />
<Setting name="Orchard.Azure.Settings.StorageConnectionString" value="UseDevelopmentStorage=true" />
<Setting name="Orchard.Azure.OutputCache.HostIdentifier" value="Orchard.Azure.Web" />
<Setting name="Orchard.Azure.OutputCache.CacheName" value="OutputCache" />
<Setting name="Orchard.Azure.OutputCache.AuthorizationToken" value="" />
<Setting name="Orchard.Azure.DatabaseCache.HostIdentifier" value="Orchard.Azure.Web" />
<Setting name="Orchard.Azure.DatabaseCache.CacheName" value="DatabaseCache" />
<Setting name="Orchard.Azure.DatabaseCache.AuthorizationToken" value="" />
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.NamedCaches" value="{&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>
<?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

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<ServiceConfiguration serviceName="OrchardCloudService" osFamily="4" osVersion="*" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" schemaVersion="2015-04.2.6">
<Role name="Orchard.Azure.Web">
<Instances count="1" />
<ConfigurationSettings>
<Setting name="Orchard.Azure.Media.StorageConnectionString" value="UseDevelopmentStorage=true" />
<Setting name="Orchard.Azure.Settings.StorageConnectionString" value="UseDevelopmentStorage=true" />
<Setting name="Orchard.Azure.OutputCache.HostIdentifier" value="Orchard.Azure.Web" />
<Setting name="Orchard.Azure.OutputCache.CacheName" value="OutputCache" />
<Setting name="Orchard.Azure.OutputCache.AuthorizationToken" value="" />
<Setting name="Orchard.Azure.DatabaseCache.HostIdentifier" value="Orchard.Azure.Web" />
<Setting name="Orchard.Azure.DatabaseCache.CacheName" value="DatabaseCache" />
<Setting name="Orchard.Azure.DatabaseCache.AuthorizationToken" value="" />
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.NamedCaches" value="{&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,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<ServiceDefinition name="OrchardCloudService" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2014-06.2.4">
<ServiceDefinition name="OrchardCloudService" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2015-04.2.6">
<WebRole name="Orchard.Azure.Web">
<Sites>
<Site name="Web">
@@ -20,6 +20,7 @@
<Setting name="Orchard.Azure.DatabaseCache.HostIdentifier" />
<Setting name="Orchard.Azure.DatabaseCache.CacheName" />
<Setting name="Orchard.Azure.DatabaseCache.AuthorizationToken" />
<Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" />
</ConfigurationSettings>
<Endpoints>
<InputEndpoint name="HttpIn" protocol="http" port="80" />

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<DiagnosticsConfiguration xmlns="http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration">
<PublicConfig xmlns="http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration">
<WadCfg>
<DiagnosticMonitorConfiguration overallQuotaInMB="4096">
<DiagnosticInfrastructureLogs scheduledTransferPeriod="PT1M" scheduledTransferLogLevelFilter="Warning" />
<Directories scheduledTransferPeriod="PT1M">
<IISLogs containerName="wad-iis-logfiles" />
</Directories>
<PerformanceCounters>
<PerformanceCounterConfiguration counterSpecifier="\Memory\Available MBytes" sampleRate="PT3M" />
<PerformanceCounterConfiguration counterSpecifier="\Web Service(_Total)\ISAPI Extension Requests/sec" sampleRate="PT3M" />
<PerformanceCounterConfiguration counterSpecifier="\Web Service(_Total)\Bytes Total/Sec" sampleRate="PT3M" />
<PerformanceCounterConfiguration counterSpecifier="\ASP.NET Applications(__Total__)\Requests/Sec" sampleRate="PT3M" />
<PerformanceCounterConfiguration counterSpecifier="\ASP.NET Applications(__Total__)\Errors Total/Sec" sampleRate="PT3M" />
<PerformanceCounterConfiguration counterSpecifier="\ASP.NET\Requests Queued" sampleRate="PT3M" />
<PerformanceCounterConfiguration counterSpecifier="\ASP.NET\Requests Rejected" sampleRate="PT3M" />
</PerformanceCounters>
<WindowsEventLog scheduledTransferPeriod="PT1M">
<DataSource name="Application!*" />
</WindowsEventLog>
<Logs scheduledTransferPeriod="PT1M" scheduledTransferLogLevelFilter="Warning" />
</DiagnosticMonitorConfiguration>
</WadCfg>
<StorageAccount>devstoreaccount1</StorageAccount>
</PublicConfig>
<PrivateConfig xmlns="http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration">
<StorageAccount name="devstoreaccount1" key="Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==" />
</PrivateConfig>
<IsEnabled>true</IsEnabled>
</DiagnosticsConfiguration>

View File

@@ -1,98 +1,110 @@
<?xml version="1.0" encoding="utf-8" ?>
<HostComponents>
<Components>
<Components>
<Component Type="Orchard.Environment.Extensions.ExtensionMonitoringCoordinator">
<Properties>
<!-- Set Value="true" to disable new extensions monitoring -->
<Property Name="Disabled" Value="true"/>
</Properties>
</Component>
<Component Type="Orchard.Environment.Extensions.ExtensionMonitoringCoordinator">
<Properties>
<!-- Set Value="true" to disable new extensions monitoring -->
<Property Name="Disabled" Value="true"/>
</Properties>
</Component>
<Component Type="Orchard.DisplayManagement.Descriptors.ShapePlacementStrategy.PlacementFileParser">
<Properties>
<!-- Set Value="true" to disable Placement files monitoring (Placement.info) -->
<Property Name="DisableMonitoring" Value="true"/>
</Properties>
</Component>
<Component Type="Orchard.DisplayManagement.Descriptors.ShapePlacementStrategy.PlacementFileParser">
<Properties>
<!-- Set Value="true" to disable Placement files monitoring (Placement.info) -->
<Property Name="DisableMonitoring" Value="true"/>
</Properties>
</Component>
<Component Type="Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.ShapeTemplateBindingStrategy">
<Properties>
<!-- Set Value="true" to disable template views monitoring (Views\*.cshtml) -->
<Property Name="DisableMonitoring" Value="true"/>
</Properties>
</Component>
<Component Type="Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.ShapeTemplateBindingStrategy">
<Properties>
<!-- Set Value="true" to disable template views monitoring (Views\*.cshtml) -->
<Property Name="DisableMonitoring" Value="true"/>
</Properties>
</Component>
<Component Type="Orchard.Environment.Extensions.Folders.ExtensionHarvester">
<Properties>
<!-- Set Value="true" to disable extension folders monitoring (new files in modules and themes) -->
<Property Name="DisableMonitoring" Value="true"/>
</Properties>
</Component>
<Component Type="Orchard.Environment.Extensions.Folders.ExtensionHarvester">
<Properties>
<!-- Set Value="true" to disable extension folders monitoring (new files in modules and themes) -->
<Property Name="DisableMonitoring" Value="true"/>
</Properties>
</Component>
<Component Type="Orchard.Environment.Extensions.Compilers.DefaultProjectFileParser">
<Properties>
<!-- Set Value="true" to disable project files monitoring (/Modules/**/*.csproj) -->
<Property Name="DisableMonitoring" Value="true"/>
</Properties>
</Component>
<Component Type="Orchard.Environment.Extensions.Compilers.DefaultProjectFileParser">
<Properties>
<!-- Set Value="true" to disable project files monitoring (/Modules/**/*.csproj) -->
<Property Name="DisableMonitoring" Value="true"/>
</Properties>
</Component>
<Component Type="Orchard.Environment.Extensions.Loaders.DynamicExtensionLoader">
<Properties>
<!-- Set Value="true" to disable source files monitoring -->
<Property Name="DisableMonitoring" Value="true"/>
<!-- Set Value="true" to completely disable the Dynamic Extension Loader -->
<Property Name="Disabled" Value="true"/>
</Properties>
</Component>
<Component Type="Orchard.Environment.Extensions.Loaders.DynamicExtensionLoader">
<Properties>
<!-- Set Value="true" to disable source files monitoring -->
<Property Name="DisableMonitoring" Value="true"/>
<!-- Set Value="true" to completely disable the Dynamic Extension Loader -->
<Property Name="Disabled" Value="true"/>
</Properties>
</Component>
<Component Type="Orchard.Environment.Extensions.Loaders.PrecompiledExtensionLoader">
<Properties>
<!-- Set Value="true" to disable pre-compiled files monitoring (~/Modules/**/bin/*.dll) -->
<Property Name="DisableMonitoring" Value="false"/>
</Properties>
</Component>
<Component Type="Orchard.Environment.Extensions.Loaders.PrecompiledExtensionLoader">
<Properties>
<!-- Set Value="true" to disable pre-compiled files monitoring (~/Modules/**/bin/*.dll) -->
<Property Name="DisableMonitoring" Value="false"/>
</Properties>
</Component>
<Component Type="Orchard.FileSystems.Dependencies.DefaultDependenciesFolder">
<Properties>
<!-- Set Value="true" to disable the dependencies folder monitoring -->
<Property Name="DisableMonitoring" Value="true"/>
</Properties>
</Component>
<Component Type="Orchard.FileSystems.Dependencies.DefaultDependenciesFolder">
<Properties>
<!-- Set Value="true" to disable the dependencies folder monitoring -->
<Property Name="DisableMonitoring" Value="true"/>
</Properties>
</Component>
<Component Type="Orchard.FileSystems.Dependencies.DefaultExtensionDependenciesManager">
<Properties>
<!-- Set Value="true" to disable compiled dependencides files monitoring -->
<Property Name="DisableMonitoring" Value="true"/>
</Properties>
</Component>
<Component Type="Orchard.FileSystems.Dependencies.DefaultExtensionDependenciesManager">
<Properties>
<!-- Set Value="true" to disable compiled dependencides files monitoring -->
<Property Name="DisableMonitoring" Value="true"/>
</Properties>
</Component>
<Component Type="Orchard.Localization.Services.DefaultLocalizedStringManager">
<Properties>
<!-- Set Value="true" to disable localization files monitoring (*.po) -->
<Property Name="DisableMonitoring" Value="true"/>
</Properties>
</Component>
<Component Type="Orchard.Localization.Services.DefaultLocalizedStringManager">
<Properties>
<!-- Set Value="true" to disable localization files monitoring (*.po) -->
<Property Name="DisableMonitoring" Value="true"/>
</Properties>
</Component>
<Component Type="Orchard.Caching.DefaultParallelCacheContext">
<Properties>
<!-- Set Value="true" to disable parallel cache resolution -->
<Property Name="Disabled" Value="false"/>
</Properties>
</Component>
<Component Type="Orchard.Caching.DefaultParallelCacheContext">
<Properties>
<!-- Set Value="true" to disable parallel cache resolution -->
<Property Name="Disabled" Value="false"/>
</Properties>
</Component>
<Component Type="Orchard.Data.SessionConfigurationCache">
<Properties>
<!-- Set Value="true" to disable session configuration cache (mappings.bin). Recommended when using multiple instances. -->
<Property Name="Disabled" Value="false"/>
</Properties>
</Component>
<Component Type="Orchard.Data.SessionConfigurationCache">
<Properties>
<!-- Set Value="true" to disable session configuration cache (mappings.bin). Recommended when using multiple instances. -->
<Property Name="Disabled" Value="false"/>
</Properties>
</Component>
<Component Type="Orchard.Alias.Implementation.Updater">
<Properties>
<Property Name="Disabled" Value="false"/>
</Properties>
</Component>
</Components>
<Component Type="Orchard.Environment.Descriptor.ShellDescriptorCache">
<Properties>
<!-- Set Value="true" to disable shell descriptors cache (cache.dat). Recommended when using multiple instances. -->
<Property Name="Disabled" Value="true"/>
</Properties>
</Component>
<Component Type="Orchard.Services.ClientAddressAccessor">
<Properties>
<!-- Set Value="true" to read the client host address from the specified HTTP header. -->
<Property Name="EnableClientHostAddressHeader" Value="false"/>
<!-- Set Value to the HTTP header name from which to read the client host address. Only used when EnableClientHostAddressHeader="true".
If the specified header was not found, the system will fall back to the client host address as provided by the Request object.-->
<Property Name="ClientHostAddressHeaderName" Value="X-Forwarded-For"/>
</Properties>
</Component>
</Components>
</HostComponents>

View File

@@ -1,31 +1,50 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="autofac" type="Autofac.Configuration.SectionHandler, Autofac.Configuration"/>
</configSections>
<configSections>
<section name="autofac" type="Autofac.Configuration.SectionHandler, Autofac.Configuration"/>
</configSections>
<autofac defaultAssembly="Orchard.Framework">
<autofac defaultAssembly="Orchard.Framework">
<!--
To create tenant specific configurations, copy this file to ~/Congig/Sites.{tenant}.config
To create tenant specific configurations, copy this file to ~/Config/Sites.{tenant}.config
where {tenant} is the technical name of the targetted tenant
Allowed scopes: per-dependency, single-instance or per-lifetime-scope
-->
<components>
<!--
Uncomment to use ReadUncommitted as the default isolation level. Please not that
Sql Server Ce doesn't support ReadUncommitted.
-->
<!--
<component instance-scope="per-lifetime-scope"
type="Orchard.Data.SessionLocator, Orchard.Framework"
service="Orchard.Data.ISessionLocator">
<properties>
<property name="IsolationLevel" value="ReadUncommitted" />
</properties>
</component>
-->
</components>
</autofac>
Uncomment to use ReadUncommitted as the default isolation level. Please not that
Sql Server Ce doesn't support ReadUncommitted.
</configuration>
Isolation level for all database transaction.
See http://msdn.microsoft.com/en-us/library/system.transactions.isolationlevel.aspx
-->
<!--
<component instance-scope="per-lifetime-scope"
type="Orchard.Data.SessionLocator, Orchard.Framework"
service="Orchard.Data.ISessionLocator">
<properties>
<property name="IsolationLevel" value="ReadUncommitted" />
</properties>
</component>
-->
<!--
Delay between background services executions
<component instance-scope="single-instance"
type="Orchard.Tasks.SweepGenerator"
service="Orchard.Tasks.ISweepGenerator">
<properties>
<property name="Interval" value="00:01:00" />
</properties>
</component>
-->
</components>
</autofac>
</configuration>

View File

@@ -20,6 +20,7 @@
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<TargetFrameworkProfile />
<UseGlobalApplicationHostFile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -90,13 +91,13 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\lib\windowsazure\Microsoft.WindowsAzure.Configuration.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Diagnostics">
<SpecificVersion>False</SpecificVersion>
<Reference Include="Microsoft.WindowsAzure.Diagnostics, Version=2.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<HintPath>..\..\..\lib\windowsazure\Microsoft.WindowsAzure.Diagnostics.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.WindowsAzure.ServiceRuntime">
<SpecificVersion>False</SpecificVersion>
<Reference Include="Microsoft.WindowsAzure.ServiceRuntime, Version=2.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<HintPath>..\..\..\lib\windowsazure\Microsoft.WindowsAzure.ServiceRuntime.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Storage">
<SpecificVersion>False</SpecificVersion>
@@ -181,10 +182,6 @@
<Private>False</Private>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="WebMatrix.Data">
<HintPath>..\..\..\lib\aspnetmvc\WebMatrix.Data.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Global.asax.cs">
@@ -564,6 +561,23 @@
<Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(WebProjectOutputDir)" />
</Target>
<Target Name="DeleteDebugFiles" AfterTargets="AfterBuild">
<RemoveDir Directories="Themes;Core;Modules" />
</Target>
<Target Name="CopyDebugFiles" AfterTargets="DeleteDebugFiles" Condition="'$(Configuration)' == 'Debug'">
<PropertyGroup>
<SrcFolder>..\..</SrcFolder>
</PropertyGroup>
<ItemGroup>
<Excluded Include="$(SrcFolder)\**\bin\**\*;$(SrcFolder)\**\obj\**\*;$(SrcFolder)\**\*.user;$(SrcFolder)\**\*.cs;$(SrcFolder)\**\*.csproj;$(SrcFolder)\**\.hg\**\*" />
<Src-Themes Include="$(SrcFolder)\Orchard.Web\Themes\**\*" Exclude="@(Excluded)" />
<Src-Core Include="$(SrcFolder)\Orchard.Web\Core\**\*" Exclude="@(Excluded)" />
<Src-Modules Include="$(SrcFolder)\Orchard.Web\Modules\**\*" Exclude="@(Excluded)" />
</ItemGroup>
<Copy SourceFiles="@(Src-Themes)" DestinationFolder="Themes\%(RecursiveDir)" />
<Copy SourceFiles="@(Src-Core)" DestinationFolder="Core\%(RecursiveDir)" />
<Copy SourceFiles="@(Src-Modules)" DestinationFolder="Modules\%(RecursiveDir)" />
</Target>
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
@@ -583,6 +597,11 @@
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
<PropertyGroup>
<PreBuildEvent>del "$(TargetDir)\Modules"
del "$(TargetDir)\Themes"
del "$(TargetDir)\Media"</PreBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">

View File

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

View File

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

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

View File

@@ -20,6 +20,7 @@ using Orchard.DisplayManagement.Implementation;
using Orchard.Environment;
using Orchard.Environment.Extensions;
using Orchard.Security;
using Orchard.Tests.ContentManagement;
using Orchard.Tests.Modules;
using Orchard.Tests.Stubs;
using Orchard.UI.Notify;
@@ -35,7 +36,6 @@ namespace Orchard.Core.Tests.Body {
builder.RegisterType<Signals>().As<ISignals>();
builder.RegisterType<DefaultContentManagerSession>().As<IContentManagerSession>();
builder.RegisterInstance(new Mock<IContentDefinitionManager>().Object);
builder.RegisterInstance(new Mock<ITransactionManager>().Object);
builder.RegisterInstance(new Mock<IAuthorizer>().Object);
builder.RegisterInstance(new Mock<INotifier>().Object);
builder.RegisterInstance(new Mock<IContentDisplay>().Object);

View File

@@ -85,6 +85,7 @@
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<HintPath>..\..\lib\sqlce\System.Data.SqlServerCe.dll</HintPath>
<Private>True</Private>

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

View File

@@ -35,7 +35,6 @@ namespace Orchard.Core.Tests.Scheduling {
public override void Register(ContainerBuilder builder) {
_handler = new StubTaskHandler();
builder.RegisterInstance(new Mock<IOrchardServices>().Object);
builder.RegisterInstance(new Mock<ITransactionManager>().Object);
builder.RegisterType<DefaultContentManager>().As<IContentManager>();
builder.RegisterType<StubCacheManager>().As<ICacheManager>();
builder.RegisterType<Signals>().As<ISignals>();

View File

@@ -13,6 +13,7 @@ using Orchard.Core.Settings.Metadata;
using Orchard.Core.Settings.Metadata.Records;
using Orchard.Data;
using Orchard.Tests;
using Orchard.Tests.ContentManagement;
using Orchard.Tests.Stubs;
using Orchard.Tests.Utility;
@@ -23,6 +24,7 @@ namespace Orchard.Core.Tests.Settings.Metadata {
private ISessionFactory _sessionFactory;
private ISession _session;
private IContainer _container;
private ITransactionManager _transactionManager;
[TestFixtureSetUp]
public void InitFixture() {
@@ -39,6 +41,17 @@ namespace Orchard.Core.Tests.Settings.Metadata {
[SetUp]
public void Init() {
_session = _sessionFactory.OpenSession();
foreach (var killType in new[] { typeof(ContentTypeDefinitionRecord), typeof(ContentPartDefinitionRecord), typeof(ContentFieldDefinitionRecord) }) {
foreach (var killRecord in _session.CreateCriteria(killType).List()) {
_session.Delete(killRecord);
}
}
_session.Flush();
_session.Close();
_session.Dispose();
_session = _sessionFactory.OpenSession();
var builder = new ContainerBuilder();
builder.RegisterAutoMocking();
builder.RegisterType<ContentDefinitionManager>().As<IContentDefinitionManager>();
@@ -48,25 +61,15 @@ namespace Orchard.Core.Tests.Settings.Metadata {
builder.RegisterType<StubCacheManager>().As<ICacheManager>();
builder.RegisterType<StubParallelCacheContext>().As<IParallelCacheContext>();
_session = _sessionFactory.OpenSession();
builder.RegisterInstance(_transactionManager = new TestTransactionManager(_session)).As<ITransactionManager>();
_container = builder.Build();
_container.Mock<ISessionLocator>()
.Setup(x => x.For(It.IsAny<Type>()))
.Returns(() => _session);
_session = _sessionFactory.OpenSession();
foreach (var killType in new[] { typeof(ContentTypeDefinitionRecord), typeof(ContentPartDefinitionRecord), typeof(ContentFieldDefinitionRecord) }) {
foreach (var killRecord in _session.CreateCriteria(killType).List()) {
_session.Delete(killRecord);
}
}
_session.Flush();
}
void ResetSession() {
_session.Flush();
_session.Dispose();
_session = _sessionFactory.OpenSession();
_transactionManager.RequireNew();
}
[TearDown]

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

View File

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

View File

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

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

View File

@@ -51,7 +51,6 @@ namespace Orchard.Tests.Modules.Comments.Services {
builder.RegisterType<Signals>().As<ISignals>();
builder.RegisterType<DefaultContentManagerSession>().As<IContentManagerSession>();
builder.RegisterInstance(new Mock<IContentDefinitionManager>().Object);
builder.RegisterInstance(new Mock<ITransactionManager>().Object);
builder.RegisterInstance(new Mock<IAuthorizer>().Object);
builder.RegisterInstance(new Mock<INotifier>().Object);
builder.RegisterInstance(new Mock<IContentDisplay>().Object);

View File

@@ -12,6 +12,7 @@ using Orchard.ContentManagement.Handlers;
using Orchard.Data;
using Orchard.Environment.Configuration;
using Orchard.Services;
using Orchard.Tests.ContentManagement;
using Orchard.Tests.Data;
using Orchard.Tests.Stubs;
@@ -52,6 +53,7 @@ namespace Orchard.Tests.Modules {
builder.RegisterInstance(_clock).As<IClock>();
builder.RegisterGeneric(typeof(Repository<>)).As(typeof(IRepository<>));
builder.RegisterInstance(new ShellSettings { Name = ShellSettings.DefaultName, DataProvider = "SqlCe" });
builder.RegisterInstance(new TestTransactionManager(_session)).As<ITransactionManager>();
Register(builder);
_container = builder.Build();
@@ -61,11 +63,6 @@ namespace Orchard.Tests.Modules {
public void Cleanup() {
if(_container != null)
_container.Dispose();
_transaction.Commit();
if(_session != null)
_session.Close();
}
public abstract void Register(ContainerBuilder builder);

View File

@@ -264,9 +264,6 @@ namespace Orchard.Tests.Modules.DesignerTools.Services
new JProperty("name", "TestingPart"),
new JProperty("value", "ContentPart"),
new JProperty("children", new JArray(
new JObject(
new JProperty("name", "Zones"),
new JProperty("value", "ZoneCollection")),
new JObject(
new JProperty("name", "Id"),
new JProperty("value", "0")),
@@ -327,9 +324,6 @@ namespace Orchard.Tests.Modules.DesignerTools.Services
new JProperty("name", "TestingPart"),
new JProperty("value", "ContentPart"),
new JProperty("children", new JArray(
new JObject(
new JProperty("name", "Zones"),
new JProperty("value", "ZoneCollection")),
new JObject(
new JProperty("name", "Id"),
new JProperty("value", "0")),

View File

@@ -76,7 +76,7 @@ namespace Orchard.Tests.Modules.ImportExport.Services {
builder.RegisterInstance(new Mock<ISettingsFormatter>().Object);
builder.RegisterInstance(new Mock<IRecipeExecuteEventHandler>().Object);
_session = _sessionFactory.OpenSession();
builder.RegisterInstance(new DefaultContentManagerTests.TestSessionLocator(_session)).As<ISessionLocator>();
builder.RegisterInstance(new TestTransactionManager(_session)).As<ITransactionManager>();
_container = builder.Build();
_importExportService = _container.Resolve<IImportExportService>();

View File

@@ -75,7 +75,6 @@ namespace Orchard.Tests.Modules.Indexing {
builder.RegisterInstance(new Mock<IContentDisplay>().Object);
builder.RegisterType<DefaultContentManagerSession>().As<IContentManagerSession>();
builder.RegisterInstance(new Mock<ITransactionManager>().Object);
builder.RegisterInstance(new Mock<IAuthorizer>().Object);
builder.RegisterType<OrchardServices>().As<IOrchardServices>();

View File

@@ -303,5 +303,24 @@ namespace Orchard.Tests.Modules.Indexing {
_provider.Store("default", _provider.New(1).Add("field", "value2"));
Assert.That(searchBuilder.WithField("id", "1").Count(), Is.EqualTo(1));
}
[Test]
public void IndexProviderShouldDeleteMoreThanMaxTermsCount() {
_provider.CreateIndex("default");
var documents = Enumerable.Range(1, 1025).Select(i => _provider.New(i).Add("field", "value1"));
_provider.Store("default", documents);
var searchBuilder = _provider.CreateSearchBuilder("default");
Assert.That(searchBuilder.Count(), Is.EqualTo(1025));
Assert.That(searchBuilder.Get(1).ContentItemId, Is.EqualTo(1));
Assert.That(searchBuilder.Get(1025).ContentItemId, Is.EqualTo(1025));
_provider.Delete("default", Enumerable.Range(1, 1025));
Assert.That(searchBuilder.Count(), Is.EqualTo(0));
}
}
}

View File

@@ -94,7 +94,7 @@ namespace Orchard.Tests.Modules.Migrations {
builder.RegisterType<StubHostEnvironment>().As<IHostEnvironment>();
_session = _sessionFactory.OpenSession();
builder.RegisterInstance(new DefaultContentManagerTests.TestSessionLocator(_session)).As<ISessionLocator>();
builder.RegisterInstance(new TestTransactionManager(_session)).As<ITransactionManager>();
builder.RegisterInstance(new ShellBlueprint());

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

View File

@@ -98,23 +98,23 @@ namespace Orchard.Tests.Modules.Recipes.Services {
[Test]
public void HarvestRecipesFailsToFindRecipesWhenCalledWithNotExistingExtension() {
var recipes = (List<Recipe>) _recipeHarvester.HarvestRecipes("cantfindme");
var recipes = _recipeHarvester.HarvestRecipes("cantfindme");
Assert.That(recipes.Count, Is.EqualTo(0));
Assert.That(recipes.Count(), Is.EqualTo(0));
}
[Test]
public void HarvestRecipesShouldHarvestRecipeXmlFiles() {
var recipes = (List<Recipe>)_recipeHarvester.HarvestRecipes("Sample1");
Assert.That(recipes.Count, Is.EqualTo(1));
var recipes = _recipeHarvester.HarvestRecipes("Sample1");
Assert.That(recipes.Count(), Is.EqualTo(1));
}
[Test]
public void ParseRecipeLoadsRecipeMetaDataIntoModel() {
var recipes = (List<Recipe>) _recipeHarvester.HarvestRecipes("Sample1");
Assert.That(recipes.Count, Is.EqualTo(1));
var recipes = _recipeHarvester.HarvestRecipes("Sample1");
Assert.That(recipes.Count(), Is.EqualTo(1));
var sampleRecipe = recipes[0];
var sampleRecipe = recipes.First();
Assert.That(sampleRecipe.Name, Is.EqualTo("cms"));
Assert.That(sampleRecipe.Description, Is.EqualTo("a sample Orchard recipe describing a cms"));
Assert.That(sampleRecipe.Author, Is.EqualTo("orchard"));

View File

@@ -74,7 +74,6 @@ namespace Orchard.Tests.Modules.Users.Controllers {
builder.RegisterType<UserPartHandler>().As<IContentHandler>();
builder.RegisterType<OrchardServices>().As<IOrchardServices>();
builder.RegisterInstance(new DefaultContentManagerTests.TestSessionLocator(_session)).As<ITransactionManager>();
builder.RegisterInstance(new Work<IEnumerable<IShapeTableEventHandler>>(resolve => _container.Resolve<IEnumerable<IShapeTableEventHandler>>())).AsSelf();
builder.RegisterType<DefaultShapeTableManager>().As<IShapeTableManager>();
builder.RegisterType<DefaultShapeFactory>().As<IShapeFactory>();

View File

@@ -30,6 +30,7 @@ using Orchard.UI.PageClass;
using Orchard.Users.Handlers;
using Orchard.Users.Models;
using Orchard.Users.Services;
using Orchard.Tests.ContentManagement;
namespace Orchard.Tests.Modules.Users.Services {
[TestFixture]
@@ -39,19 +40,6 @@ namespace Orchard.Tests.Modules.Users.Services {
private ISession _session;
private IContainer _container;
public class TestSessionLocator : ISessionLocator {
private readonly ISession _session;
public TestSessionLocator(ISession session) {
_session = session;
}
public ISession For(Type entityType) {
return _session;
}
}
[TestFixtureSetUp]
public void InitFixture() {
var databaseFileName = System.IO.Path.GetTempFileName();
@@ -94,11 +82,18 @@ namespace Orchard.Tests.Modules.Users.Services {
builder.RegisterType<InfosetHandler>().As<IContentHandler>();
_session = _sessionFactory.OpenSession();
builder.RegisterInstance(new TestSessionLocator(_session)).As<ISessionLocator>();
builder.RegisterInstance(new TestTransactionManager(_session)).As<ITransactionManager>();
_container = builder.Build();
_membershipService = _container.Resolve<IMembershipService>();
}
[TearDown]
public void Cleanup() {
if (_container != null)
_container.Dispose();
}
[Test]
public void CreateUserShouldAllocateModelAndCreateRecords() {
var user = _membershipService.CreateUser(new CreateUserParams("a", "b", "c", null, null, true));

View File

@@ -34,6 +34,7 @@ using Orchard.Users.Services;
using Orchard.Services;
using Orchard.Tests.Messaging;
using Orchard.Tests.Modules.Stubs;
using Orchard.Tests.ContentManagement;
namespace Orchard.Tests.Modules.Users.Services {
[TestFixture]
@@ -47,19 +48,6 @@ namespace Orchard.Tests.Modules.Users.Services {
private IContainer _container;
private CultureInfo _currentCulture;
public class TestSessionLocator : ISessionLocator {
private readonly ISession _session;
public TestSessionLocator(ISession session) {
_session = session;
}
public ISession For(Type entityType) {
return _session;
}
}
[TestFixtureSetUp]
public void InitFixture() {
_currentCulture = Thread.CurrentThread.CurrentCulture;
@@ -109,9 +97,8 @@ namespace Orchard.Tests.Modules.Users.Services {
builder.RegisterInstance(ShellSettingsUtility.CreateEncryptionEnabled());
_session = _sessionFactory.OpenSession();
_session.BeginTransaction();
builder.RegisterInstance(new TestTransactionManager(_session)).As<ITransactionManager>();
builder.RegisterInstance(new TestSessionLocator(_session)).As<ISessionLocator>();
_container = builder.Build();
_membershipService = _container.Resolve<IMembershipService>();
_userService = _container.Resolve<IUserService>();
@@ -119,8 +106,8 @@ namespace Orchard.Tests.Modules.Users.Services {
[TearDown]
public void TearDown() {
_session.Transaction.Commit();
_session.Transaction.Dispose();
if (_container != null)
_container.Dispose();
}
[Test]

View File

@@ -93,7 +93,6 @@ namespace Orchard.Tests.Modules.Widgets.Services {
builder.RegisterType<Signals>().As<ISignals>();
builder.RegisterType<DefaultContentManagerSession>().As<IContentManagerSession>();
builder.RegisterInstance(new Mock<IContentDefinitionManager>().Object);
builder.RegisterInstance(new Mock<ITransactionManager>().Object);
builder.RegisterInstance(new Mock<IAuthorizer>().Object);
builder.RegisterInstance(new Mock<INotifier>().Object);
builder.RegisterInstance(mockFeatureManager.Object);

View File

@@ -1,4 +1,6 @@
using System;
using System.Linq;
using System.Threading;
using Autofac;
using NUnit.Framework;
using Orchard.Caching;
@@ -78,6 +80,42 @@ namespace Orchard.Tests.Caching {
Is.Not.SameAs(c2.CacheManager.GetCache<string, string>()));
}
[Test]
public void CacheManagerIsNotBlocking() {
var hits = 0;
string result = "";
Enumerable.Range(0, 5).AsParallel().ForAll(x =>
result = _cacheManager.Get("testItem", ctx => {
// by waiting for 100ms we expect all the calls to Get
// to enter this lambda
Thread.Sleep(100);
hits++;
return "testResult";
})
);
Assert.That(result, Is.EqualTo("testResult"));
Assert.That(hits, Is.GreaterThan(1));
}
[Test]
public void CacheManagerIsBlocking() {
var hits = 0;
string result = "";
Enumerable.Range(0, 5).AsParallel().ForAll(x =>
result = _cacheManager.Get("testItem", true, ctx => {
Thread.Sleep(100);
hits++;
return "testResult";
})
);
Assert.That(result, Is.EqualTo("testResult"));
Assert.That(hits, Is.EqualTo(1));
}
class ComponentOne {
public ICacheManager CacheManager { get; set; }

View File

@@ -29,6 +29,7 @@ namespace Orchard.Tests.ContentManagement {
private IContentManager _manager;
private ISessionFactory _sessionFactory;
private ISession _session;
private ITransactionManager _transactionManager;
[TestFixtureSetUp]
public void InitFixture() {
@@ -74,7 +75,7 @@ namespace Orchard.Tests.ContentManagement {
builder.RegisterType<DefaultContentDisplay>().As<IContentDisplay>();
_session = _sessionFactory.OpenSession();
builder.RegisterInstance(new DefaultContentManagerTests.TestSessionLocator(_session)).As<ISessionLocator>();
builder.RegisterInstance(_transactionManager = new TestTransactionManager(_session)).As<ITransactionManager>();
_session.Delete(string.Format("from {0}", typeof(GammaRecord).FullName));
_session.Delete(string.Format("from {0}", typeof(DeltaRecord).FullName));
@@ -82,14 +83,19 @@ namespace Orchard.Tests.ContentManagement {
_session.Delete(string.Format("from {0}", typeof(ContentItemVersionRecord).FullName));
_session.Delete(string.Format("from {0}", typeof(ContentItemRecord).FullName));
_session.Delete(string.Format("from {0}", typeof(ContentTypeRecord).FullName));
_session.Flush();
_session.Clear();
_transactionManager.RequireNew();
_container = builder.Build();
_manager = _container.Resolve<IContentManager>();
}
[TearDown]
public void Cleanup() {
if (_container != null)
_container.Dispose();
}
private List<IContent> AddSampleData() {
var items = new List<IContent> {
_manager.Create<AlphaPart>("alpha", init => { }),
@@ -98,7 +104,7 @@ namespace Orchard.Tests.ContentManagement {
_manager.Create<DeltaPart>("delta", init => { init.Record.Quux = "the quux value"; })
};
_session.Flush();
_transactionManager.RequireNew();
return items;
}
@@ -212,7 +218,7 @@ namespace Orchard.Tests.ContentManagement {
var twoId = _manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "two"; }).ContentItem.Id;
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "three"; });
var fourId = _manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "four"; }).ContentItem.Id;
_session.Flush();
_transactionManager.RequireNew();
var two = _manager.Query()
@@ -239,7 +245,7 @@ namespace Orchard.Tests.ContentManagement {
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "two"; });
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "three"; });
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "four"; });
_session.Flush();
_transactionManager.RequireNew();
var twoOrFour = _manager.Query<GammaPart, GammaRecord>()
.Where(x => x.Frap == "one" || x.Frap == "four")
@@ -271,8 +277,7 @@ namespace Orchard.Tests.ContentManagement {
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "two"; });
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "three"; });
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "four"; });
_session.Flush();
_session.Clear();
_transactionManager.RequireNew();
var ascending = _manager.Query("gamma")
.OrderBy<GammaRecord>(x => x.Frap)
@@ -282,7 +287,7 @@ namespace Orchard.Tests.ContentManagement {
Assert.That(ascending.First().Record.Frap, Is.EqualTo("four"));
Assert.That(ascending.Last().Record.Frap, Is.EqualTo("two"));
_session.Clear();
_transactionManager.RequireNew();
var descending = _manager.Query<GammaPart, GammaRecord>()
.OrderByDescending(x => x.Frap)
@@ -300,7 +305,7 @@ namespace Orchard.Tests.ContentManagement {
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "two"; });
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "three"; });
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "four"; });
_session.Flush();
_transactionManager.RequireNew();
var reverseById = _manager.Query()
.OrderByDescending<GammaRecord>(x => x.Id)
@@ -346,8 +351,7 @@ namespace Orchard.Tests.ContentManagement {
init.Record.Frap = "four";
init.As<EpsilonPart>().Record.Quad = "4";
});
_session.Flush();
_session.Clear();
_transactionManager.RequireNew();
var results = _manager.Query<EpsilonPart, EpsilonRecord>()
.Where(x => x.Quad == "2" || x.Quad == "3")
@@ -365,21 +369,18 @@ namespace Orchard.Tests.ContentManagement {
init.As<GammaPart>().Record.Frap = "one";
init.As<EpsilonPart>().Record.Quad = "v1";
});
_session.Flush();
_session.Clear();
_transactionManager.RequireNew();
var gamma2 = _manager.Get(gamma1.Id, VersionOptions.DraftRequired);
gamma2.As<GammaPart>().Record.Frap = "two";
gamma2.As<EpsilonPart>().Record.Quad = "v2";
_session.Flush();
_session.Clear();
_transactionManager.RequireNew();
var gamma3 = _manager.Create<ContentItem>("gamma", init => {
init.As<GammaPart>().Record.Frap = "three";
init.As<EpsilonPart>().Record.Quad = "v3";
});
_session.Flush();
_session.Clear();
_transactionManager.RequireNew();
}
[Test]
@@ -562,7 +563,7 @@ namespace Orchard.Tests.ContentManagement {
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "two"; });
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "three"; });
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "four"; });
_session.Flush();
_transactionManager.RequireNew();
var result = _manager.Query<GammaPart, GammaRecord>()
.Where(x => x.Frap.StartsWith("t"))
@@ -579,7 +580,7 @@ namespace Orchard.Tests.ContentManagement {
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "two"; });
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "three"; });
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "four"; });
_session.Flush();
_transactionManager.RequireNew();
var result = _manager.Query<GammaPart, GammaRecord>()
.Where(x => x.Frap.EndsWith("e"))
@@ -596,7 +597,7 @@ namespace Orchard.Tests.ContentManagement {
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "two"; });
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "three"; });
_manager.Create<GammaPart>("gamma", init => { init.Record.Frap = "four"; });
_session.Flush();
_transactionManager.RequireNew();
var result = _manager.Query<GammaPart, GammaRecord>()
.Where(x => x.Frap.Contains("o"))

View File

@@ -86,84 +86,16 @@ namespace Orchard.Tests.ContentManagement {
builder.RegisterGeneric(typeof(Repository<>)).As(typeof(IRepository<>));
_session = _sessionFactory.OpenSession();
builder.RegisterInstance(new TestSessionLocator(_session)).As<ISessionLocator>();
builder.RegisterInstance(new TestTransactionManager(_session)).As<ITransactionManager>();
_container = builder.Build();
_manager = _container.Resolve<IContentManager>();
}
public class TestSessionLocator : ISessionLocator, ITransactionManager, IDisposable {
private readonly ISession _session;
private ITransaction _transaction;
private bool _cancelled;
public TestSessionLocator(ISession session) {
_session = session;
}
public ISession For(Type entityType) {
return _session;
}
void ITransactionManager.Demand() {
EnsureSession();
if (_transaction == null) {
_transaction = _session.BeginTransaction(IsolationLevel.ReadCommitted);
}
}
void ITransactionManager.RequireNew() {
((ITransactionManager)this).RequireNew(IsolationLevel.ReadCommitted);
}
void ITransactionManager.RequireNew(IsolationLevel level) {
EnsureSession();
if (_cancelled) {
_transaction.Rollback();
_transaction.Dispose();
_transaction = null;
}
else {
if (_transaction != null) {
_transaction.Commit();
}
}
_transaction = _session.BeginTransaction(level);
}
void ITransactionManager.Cancel() {
_cancelled = true;
}
void IDisposable.Dispose() {
if (_transaction != null) {
try {
if (!_cancelled) {
_transaction.Commit();
}
else {
_transaction.Rollback();
}
_transaction.Dispose();
}
catch {
}
finally {
_transaction = null;
_cancelled = false;
}
}
}
private void EnsureSession() {
if (_session != null) {
return;
}
}
[TearDown]
public void Cleanup() {
if (_container != null)
_container.Dispose();
}
[Test]

View File

@@ -76,5 +76,39 @@ namespace Orchard.Tests.ContentManagement {
Assert.That((object)testingPartDynamic, Is.AssignableTo<IEnumerable<ContentPart>>());
}
[Test]
public void NullCheckingCanBeDoneOnProperties() {
var contentItem = new ContentItem();
var contentPart = new ContentPart { TypePartDefinition = new ContentTypePartDefinition(new ContentPartDefinition("FooPart"), new SettingsDictionary()) };
var contentField = new ContentField { PartFieldDefinition = new ContentPartFieldDefinition(new ContentFieldDefinition("FooType"), "FooField", new SettingsDictionary()) };
dynamic item = contentItem;
dynamic part = contentPart;
Assert.That(item.FooPart == null, Is.True);
Assert.That(item.FooPart != null, Is.False);
contentItem.Weld(contentPart);
Assert.That(item.FooPart == null, Is.False);
Assert.That(item.FooPart != null, Is.True);
Assert.That(item.FooPart, Is.SameAs(contentPart));
Assert.That(part.FooField == null, Is.True);
Assert.That(part.FooField != null, Is.False);
Assert.That(item.FooPart.FooField == null, Is.True);
Assert.That(item.FooPart.FooField != null, Is.False);
contentPart.Weld(contentField);
Assert.That(part.FooField == null, Is.False);
Assert.That(part.FooField != null, Is.True);
Assert.That(item.FooPart.FooField == null, Is.False);
Assert.That(item.FooPart.FooField != null, Is.True);
Assert.That(part.FooField, Is.SameAs(contentField));
Assert.That(item.FooPart.FooField, Is.SameAs(contentField));
}
}
}

View File

@@ -72,7 +72,7 @@ namespace Orchard.Tests.ContentManagement {
builder.RegisterType<DefaultContentDisplay>().As<IContentDisplay>();
_session = _sessionFactory.OpenSession();
builder.RegisterInstance(new DefaultContentManagerTests.TestSessionLocator(_session)).As<ISessionLocator>();
builder.RegisterInstance(new TestTransactionManager(_session)).As<ITransactionManager>();
_session.Delete(string.Format("from {0}", typeof(GammaRecord).FullName));
_session.Delete(string.Format("from {0}", typeof(DeltaRecord).FullName));
@@ -88,6 +88,12 @@ namespace Orchard.Tests.ContentManagement {
}
[TearDown]
public void Cleanup() {
if (_container != null)
_container.Dispose();
}
private void AddSampleData() {
_manager.Create<AlphaPart>("alpha", init => { });
_manager.Create<BetaPart>("beta", init => { });

View File

@@ -79,7 +79,7 @@ namespace Orchard.Tests.ContentManagement {
builder.RegisterType<DefaultContentDisplay>().As<IContentDisplay>();
_session = _sessionFactory.OpenSession();
builder.RegisterInstance(new DefaultContentManagerTests.TestSessionLocator(_session)).As<ISessionLocator>();
builder.RegisterInstance(new TestTransactionManager(_session)).As<ITransactionManager>();
_session.Delete(string.Format("from {0}", typeof(GammaRecord).FullName));
_session.Delete(string.Format("from {0}", typeof(DeltaRecord).FullName));
@@ -97,6 +97,12 @@ namespace Orchard.Tests.ContentManagement {
}
[TearDown]
public void Cleanup() {
if (_container != null)
_container.Dispose();
}
[Test]
public void AllDataTypesCanBeQueried() {
var dt = DateTime.Now;

View File

@@ -0,0 +1,83 @@
using System;
using System.Data;
using NHibernate;
using Orchard.Data;
namespace Orchard.Tests.ContentManagement {
public class TestTransactionManager : ITransactionManager, IDisposable {
private ISession _session;
private ITransaction _transaction;
private bool _cancelled;
public TestTransactionManager(ISession session) {
_session = session;
RequireNew();
}
public void Demand() {
EnsureSession();
}
public void RequireNew() {
RequireNew(IsolationLevel.ReadCommitted);
}
public void RequireNew(IsolationLevel level) {
EnsureSession();
if (_cancelled) {
_transaction.Rollback();
_transaction.Dispose();
_transaction = null;
}
else {
if (_transaction != null) {
_transaction.Commit();
}
}
_transaction = _session.BeginTransaction(level);
}
public void Cancel() {
_cancelled = true;
}
public void Dispose() {
if (_transaction != null) {
try {
if (!_cancelled) {
_transaction.Commit();
}
else {
_transaction.Rollback();
}
_transaction.Dispose();
}
catch {
}
finally {
_transaction = null;
_cancelled = false;
}
}
_session.Close();
_session.Dispose();
_session = null;
}
private void EnsureSession() {
if (_session == null) {
throw new ArgumentNullException("Session can't be null, ever");
}
}
public ISession GetSession() {
EnsureSession();
return _session;
}
}
}

View File

@@ -6,6 +6,7 @@ using System.Linq;
using NHibernate;
using NUnit.Framework;
using Orchard.Data;
using Orchard.Tests.ContentManagement;
using Orchard.Tests.Records;
namespace Orchard.Tests.Data {
@@ -22,7 +23,7 @@ namespace Orchard.Tests.Data {
_databaseFilePath = Path.GetTempFileName();
_sessionFactory = DataUtility.CreateSessionFactory(_databaseFilePath, typeof(FooRecord));
_session = _sessionFactory.OpenSession();
_fooRepos = new Repository<FooRecord>(new StubLocator(_session));
_fooRepos = new Repository<FooRecord>(new TestTransactionManager(_session));
}
[TearDown]

View File

@@ -45,16 +45,22 @@ namespace Orchard.Tests.DataMigration {
typeof(ContentTypeRecord));
}
[TearDown]
public void InitDb() {
foreach ( var record in _repository.Fetch(m => m != null) ) {
_repository.Delete(record);
}
_repository.Flush();
_transactionManager.RequireNew();
}
[TearDown]
public void CleanUp() {
if (_container != null)
_container.Dispose();
}
public void Init(IEnumerable<Type> dataMigrations) {
var builder = new ContainerBuilder();
_folders = new StubFolders();
var contentDefinitionManager = new Mock<IContentDefinitionManager>().Object;
@@ -73,7 +79,7 @@ namespace Orchard.Tests.DataMigration {
builder.RegisterType<StubParallelCacheContext>().As<IParallelCacheContext>();
builder.RegisterType<StubAsyncTokenProvider>().As<IAsyncTokenProvider>();
_session = _sessionFactory.OpenSession();
builder.RegisterInstance(new DefaultContentManagerTests.TestSessionLocator(_session)).As<ISessionLocator>().As<ITransactionManager>();
builder.RegisterInstance(new TestTransactionManager(_session)).As<ITransactionManager>();
foreach(var type in dataMigrations) {
builder.RegisterType(type).As<IDataMigration>();
}

View File

@@ -52,7 +52,7 @@ namespace Orchard.Tests.DataMigration {
builder.RegisterType<SessionFactoryHolder>().As<ISessionFactoryHolder>();
builder.RegisterType<DefaultDatabaseCacheConfiguration>().As<IDatabaseCacheConfiguration>();
builder.RegisterType<StubHostEnvironment>().As<IHostEnvironment>();
builder.RegisterInstance(new DefaultContentManagerTests.TestSessionLocator(_session)).As<ISessionLocator>();
builder.RegisterInstance(new TestTransactionManager(_session)).As<ITransactionManager>();
builder.RegisterInstance(new ShellBlueprint { Records = Enumerable.Empty<RecordBlueprint>() }).As<ShellBlueprint>();
builder.RegisterInstance(new ShellSettings { Name = "temp", DataProvider = "SqlCe", DataTablePrefix = "TEST" }).As<ShellSettings>();
builder.RegisterModule(new DataModule());

View File

@@ -11,6 +11,7 @@ using Orchard.ContentManagement.Handlers;
using Orchard.Data;
using Orchard.Environment.Configuration;
using Orchard.Services;
using Orchard.Tests.ContentManagement;
using Orchard.Tests.Data;
using Orchard.Tests.Stubs;
@@ -48,7 +49,8 @@ namespace Orchard.Tests {
builder.RegisterInstance(_clock).As<IClock>();
builder.RegisterGeneric(typeof(Repository<>)).As(typeof(IRepository<>));
builder.RegisterInstance(new ShellSettings { Name = ShellSettings.DefaultName, DataProvider = "SqlCe" });
builder.RegisterInstance(new TestTransactionManager(_session)).As<ITransactionManager>();
Register(builder);
_container = builder.Build();
}
@@ -57,9 +59,6 @@ namespace Orchard.Tests {
public void Cleanup() {
if(_container != null)
_container.Dispose();
if(_session != null)
_session.Close();
}
public abstract void Register(ContainerBuilder builder);

View File

@@ -28,13 +28,6 @@ namespace Orchard.Tests.Environment {
container.Mock<IHttpContextAccessor>()
.Setup(x => x.Current())
.Returns(() => _httpContextCurrent);
container.Mock<IHttpContextAccessor>()
.Setup(x => x.CreateContext(It.IsAny<ILifetimeScope>()))
.Returns(() => new StubHttpContext());
container.Mock<IWorkContextEvents>()
.Setup(x => x.Started());
}
[Test]

View File

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

View File

@@ -160,6 +160,38 @@ namespace Orchard.Tests.Environment.ShellBuilders {
public class TestDependency : ITestDependency {
}
[Test]
public void ComponentsImplementingMultipleContractsAreResolvableOnce() {
var settings = CreateSettings();
var blueprint = CreateBlueprint(
WithDependency<MultipleDependency>()
);
var factory = _container.Resolve<IShellContainerFactory>();
var shellContainer = factory.CreateContainer(settings, blueprint);
var multipleDependency1 = shellContainer.Resolve<IMultipleDependency1>();
var multipleDependency2 = shellContainer.Resolve<IMultipleDependency2>();
Assert.That(multipleDependency1, Is.Not.Null);
Assert.That(multipleDependency2, Is.Not.Null);
Assert.That(multipleDependency1, Is.InstanceOf<MultipleDependency>());
Assert.That(multipleDependency2, Is.InstanceOf<MultipleDependency>());
Assert.True(multipleDependency1 == multipleDependency2);
}
public interface IMultipleDependency1 : IDependency {
}
public interface IMultipleDependency2 : IDependency {
}
public class MultipleDependency : IMultipleDependency1, IMultipleDependency2 {
}
[Test]
public void ExtraInformationCanDropIntoProperties() {
var settings = CreateSettings();

View File

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

View File

@@ -43,10 +43,6 @@ namespace Orchard.Tests.Environment.State {
_container.Mock<IHttpContextAccessor>()
.Setup(x=>x.Current())
.Returns(httpContext);
_container.Mock<IHttpContextAccessor>()
.Setup(x => x.CreateContext(It.IsAny<ILifetimeScope>()))
.Returns(httpContext);
}
[TearDown]

View File

@@ -46,7 +46,6 @@ namespace Orchard.Tests.Localization {
builder.RegisterType<DefaultShapeTableManager>().As<IShapeTableManager>();
builder.RegisterType<DefaultShapeFactory>().As<IShapeFactory>();
builder.RegisterInstance(new Mock<IContentDefinitionManager>().Object);
builder.RegisterInstance(new Mock<ITransactionManager>().Object);
builder.RegisterInstance(new Mock<IAuthorizer>().Object);
builder.RegisterInstance(new Mock<INotifier>().Object);
builder.RegisterInstance(new Mock<IContentDisplay>().Object);
@@ -60,7 +59,7 @@ namespace Orchard.Tests.Localization {
builder.RegisterType<StubCacheManager>().As<ICacheManager>();
builder.RegisterGeneric(typeof(Repository<>)).As(typeof(IRepository<>));
_session = _sessionFactory.OpenSession();
builder.RegisterInstance(new DefaultContentManagerTests.TestSessionLocator(_session)).As<ISessionLocator>();
builder.RegisterInstance(new TestTransactionManager(_session)).As<ITransactionManager>();
_container = builder.Build();
_cultureManager = _container.Resolve<ICultureManager>();
}

View File

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

View File

@@ -1,6 +1,5 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
@@ -13,7 +12,8 @@ using Orchard.Localization.Services;
namespace Orchard.Tests.Localization {
[TestFixture]
[TestFixture()]
[Category("longrunning")]
public class DefaultDateFormatterTests {
[SetUp]
@@ -87,9 +87,16 @@ 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 new[] { 0, 6, 12, 18 }) { // Enough hours to cover all code paths (AM/PM, 12<->00, etc).
foreach (var hour in hoursToTest) { // Enough hours to cover all code paths (AM/PM, 12<->00, etc).
DateTime dateTime = new DateTime(1998, 1, 1, hour, 30, 30, DateTimeKind.Utc);
@@ -320,9 +327,16 @@ 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.
for (var hour = 0; hour <= 23; hour++) { // All hours in the day.
foreach (var hour in hoursToTest) { // All hours in the day.
DateTime time = new DateTime(1998, 1, 1, hour, 30, 30);
var timeString = time.ToString(timeFormat, culture);

View File

@@ -208,6 +208,7 @@
<Compile Include="ContentManagement\Records\GammaRecord.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="ContentManagement\TestTransactionManager.cs" />
<Compile Include="ContentManagement\XmlHelperTests.cs" />
<Compile Include="DatabaseEnabledTestsBase.cs" />
<Compile Include="DataMigration\SchemaBuilderTests.cs" />

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

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