Commit Graph
100 Commits
Author SHA1 Message Date
Renaud Paquay 5db91c1689 Rename OrchardSystemException to OrchardCoreException
--HG--
branch : dev
rename : src/Orchard/OrchardSystemException.cs => src/Orchard/OrchardCoreException.cs
2010-06-22 10:53:28 -07:00
Renaud Paquay 2fad0edb92 Merge
--HG--
branch : dev
2010-06-22 10:28:35 -07:00
Renaud Paquay a9acdc1847 Refactor OrchardException classes
All constructors now take a"LocalizedString" as the error message.

--HG--
branch : dev
2010-06-22 10:25:57 -07:00
Renaud Paquay 1290ea7d6e Refactor OrchardException classes
All constructors now take a"LocalizedString" as the error message.

--HG--
branch : dev
2010-06-22 10:21:24 -07:00
Renaud Paquay 3725b84b20 Refactoring a csproj file compiler/build provider
* Removed unused "ServiceLocator" class

* Added "OrchardHostContainerRegistry" class to enable Shim/HostContainer
  registration for DI

* Refactored the BuildProvider for .csproj file to use the new
  OrchardHostContainerRegistry class and enable proper DI for implementations.

--HG--
branch : dev
2010-06-21 16:40:13 -07:00
Renaud Paquay 7e23f3a30b Tweaking amount of logging done in extension loaders
--HG--
branch : dev
2010-06-18 19:54:08 -07:00
Renaud Paquay a2da9c0f97 Merge
--HG--
branch : dev
2010-06-18 18:41:14 -07:00
Renaud Paquay 499dda8993 Added workaround for nhibernate limitation
From the comment:

/// <summary>
/// We should be able to support reloading multiple version of a compiled module from
/// a ".csproj" file in the same AppDomain. However, we are currently running into a
/// limitation with NHibernate getting confused when a type name is present in
/// multiple assemblies loaded in an AppDomain.  So, until a solution is found, any change
/// to a ".csproj" file of an active module requires an AppDomain restart.
/// The purpose of this class is to keep track of all .csproj files monitored until
/// an AppDomain restart.
/// </summary>

--HG--
branch : dev
2010-06-18 18:36:19 -07:00
Renaud Paquay 253126957d Removed unused parameter
--HG--
branch : dev
2010-06-18 18:35:19 -07:00
Renaud Paquay a7841bd919 Slightly refactor ExtensionLoader.Load method implementations
--HG--
branch : dev
2010-06-18 14:27:04 -07:00
Renaud Paquay a9593f69ff Update WebFormVirtualPathProvider GetFileHash method
When a WebForm view file is served through the WebFormVirtualPathProvider,
we override GetFileHash to include the virtual path of all the dependencies
used to compile the form. For example, if we had a "Assembly Name=..."
directive, we want to include the file hash of the assembly file, so that if the
assembly file is updated with a newer version, the file hash of the WebForm view
file will be different, which will tell ASP.NET the view file needs to be
recompiled.

--HG--
branch : dev
2010-06-18 10:23:41 -07:00
Renaud Paquay e9dedb765d Add assembly directives for views in "~/Themes"
When a view is served from the "~/Themes" directory, we need to add
the assembly directives of all the modules dynamically compiled.

--HG--
branch : dev
2010-06-17 10:54:09 -07:00
Renaud Paquay a248ead846 Fix typos...
--HG--
branch : dev
2010-06-17 10:53:10 -07:00
Renaud Paquay d3c393cc41 Add Unit Tests for AssemblyProbingFolder
--HG--
branch : dev
rename : src/Orchard/FileSystems/Dependencies/IAssenblyProbyFolder.cs => src/Orchard/FileSystems/Dependencies/IAssemblyProbingFolder.cs
2010-06-16 17:23:33 -07:00
Renaud Paquay ff34e0a6b7 Merge
--HG--
branch : dev
2010-06-16 15:45:06 -07:00
Renaud Paquay c4bc2a1375 Remove IAppDataFolder implementation for Azure
We don't need this. Azure supports writing tp ~/App_Data. There is no
guarantee that the content will persist, but that's exactly the assumption
of the IAppDataFolder abstraction: it's a local cache, which persists
for _some_ time accross app restarts.

--HG--
branch : dev
2010-06-16 15:44:53 -07:00
Renaud Paquay ed410cba61 Move probing assembly folder behavior in separate class
The behavior of the "assembly load probing folder" is really
a separate concern from managing the list of loaded extesions.

--HG--
branch : dev
2010-06-16 14:35:13 -07:00
Renaud Paquay 2705aff234 Merge
--HG--
branch : dev
2010-06-16 11:52:18 -07:00
Renaud Paquay f8fe5a8665 Update unit tests to use StubAppDataFolder
--HG--
branch : dev
2010-06-16 11:49:45 -07:00
Renaud Paquay ec0e452c3a Add more unit test for IDependenciesFolder
--HG--
branch : dev
2010-06-15 19:05:49 -07:00
Renaud Paquay 4ad1abc4c9 Add more unit test for IDependenciesFolder
--HG--
branch : dev
2010-06-15 18:56:37 -07:00
Renaud Paquay b45ccb6864 Add more unit tests
--HG--
branch : dev
2010-06-15 14:18:07 -07:00
Renaud Paquay d258e12161 Merge
--HG--
branch : dev
2010-06-15 14:05:11 -07:00
Renaud Paquay 9444fc83f5 Add unit test for IDepdendenciesFolder
--HG--
branch : dev
rename : src/Orchard.Tests/Environment/Configuration/AppDataFolderTests.cs => src/Orchard.Tests/FileSystems/AppData/AppDataFolderTests.cs
2010-06-15 14:04:55 -07:00
Renaud Paquay df3a1a4044 Re-adding reference to MultiTenancy
--HG--
branch : dev
2010-06-14 21:03:12 -07:00
Renaud Paquay 141f8bc421 Refactor ASP.NET specific behavior into abstraction interface
--HG--
branch : dev
2010-06-14 20:49:20 -07:00
Renaud Paquay 4672c4487e Merge
--HG--
branch : dev
2010-06-14 16:05:25 -07:00
Renaud Paquay c0cc66f0be Save "dependencies.xml" only if there are changes
--HG--
branch : dev
2010-06-14 16:01:23 -07:00
Renaud Paquay 59dbbfb44e Merge
--HG--
branch : dev
2010-06-14 09:02:25 -07:00
Renaud Paquay cd3a537396 work on extension loading
* Add a "ExtensionLoaderCoordinator" class
* Rework the way loaders are notified of extensions being loaded,
  (de)activated, etc.

--HG--
branch : dev
2010-06-14 09:01:31 -07:00
Renaud Paquay ad54ffdbb2 Remove implicit conversion from string to LocalizedString
In most cases, relying on the implicit conversion is a sign
of a missing call to "T".

--HG--
branch : dev
2010-06-12 13:33:35 -07:00
Renaud Paquay ff5448ac31 Normalize usage of IAppDataFolder
--HG--
branch : dev
2010-06-12 12:42:04 -07:00
Renaud Paquay 695f001f0f Add ability for OrchardHost to reset its state when Extensions change
OrchardHost calls into all extension loaders to all extensions descriptor,
allowing each loader to add the set of resource to monitor for change.
OrchardHost resets its list of shells at the beginning of a request if
any monitored resources has changed.

--HG--
branch : dev
2010-06-12 12:38:49 -07:00
Renaud Paquay 767f19a4e3 Slightly refactor IAppDataFolder
Remove the "SetBasePath" method, introduce IAppDataFolderRoot as replacement.

--HG--
branch : dev
2010-06-12 12:18:08 -07:00
Renaud Paquay c566e6599d Fix build error from previous merge
--HG--
branch : dev
2010-06-11 21:27:56 -07:00
Renaud Paquay 9f92ee275c Merge
--HG--
branch : dev
2010-06-11 21:23:42 -07:00
Renaud Paquay 4ea580b54e Update dependencies storage to store state of all loaded extensions
--HG--
branch : dev
2010-06-11 21:21:20 -07:00
Renaud Paquay 9b9efe02a2 Removing obsolete method
--HG--
branch : dev
2010-06-11 21:20:13 -07:00
Renaud Paquay 75efa67b61 Make extension loading a 2 pass process
First pass is "probing": any loader who thinks it can load a
given extension returns a descriptor for it. The descriptor contains
information about how old the extension is.

The extension manager sorts the descriptor list return by probing all
loaders, and picks the most recent entry.

During the 2nd pass, each loader is called again, with the candidate extension
entry as argument. This allows each loader to be notified that, if they don't
load an extension, they might still need to cleanup some state related to
previous loading.

In essence, this is implementing a complete state machine of loaders and
extension "active/inactive" states/transitions.

--HG--
branch : dev
2010-06-11 17:12:27 -07:00
Renaud Paquay e7615d6eb7 Merge
--HG--
branch : dev
2010-06-11 15:49:28 -07:00
Renaud Paquay 4b9c9da8fd Refactor IAppDataFolder and default implementation
Refactor IAppDataFolder so that it can be used for implementing
DefaultDependenciesFolder.

--HG--
branch : dev
rename : src/Orchard/Environment/Extensions/Loaders/WebFormsExtensionsVirtualFile.cs => src/Orchard/FileSystems/Dependencies/WebFormsExtensionsVirtualFile.cs
rename : src/Orchard/Environment/Extensions/Loaders/WebFormsExtensionsVirtualPathProvider.cs => src/Orchard/FileSystems/Dependencies/WebFormsExtensionsVirtualPathProvider.cs
rename : src/Orchard/Environment/IVirtualPathProvider.cs => src/Orchard/FileSystems/VirtualPath/DefaultVirtualPathProvider.cs
rename : src/Orchard/Environment/ICustomVirtualPathProvider.cs => src/Orchard/FileSystems/VirtualPath/ICustomVirtualPathProvider.cs
2010-06-11 15:48:40 -07:00
Renaud Paquay 4e9ebd1755 Merge
--HG--
branch : dev
2010-06-10 16:08:30 -07:00
Renaud Paquay 27680af618 Merge
--HG--
branch : dev
2010-06-10 10:29:24 -07:00
Renaud Paquay 7f1b47e7c4 Merge
--HG--
branch : dev
2010-06-09 19:00:48 -07:00
Renaud Paquay 4becc488c8 Couple of fixed with dynamic extension loader
Perf: Use the cache manager to keep the list of dependency descriptors in
      memory, with invalidation when "dependencies.xml" changes on disk

When loading an assembly from the list of references assemblies, notify
the dependencies folder component, so it removes the entry.

--HG--
branch : dev
2010-06-09 18:55:35 -07:00
Renaud Paquay 9c3f6bfc74 Tweak dynamic extension loader
* Add "Assembly Src" directive to WebForms files loaded from vpp
* Notify the OrchardHost when the .csproj file a a dynamic module is changed.
* Make the registration of custom virtual path provider a bit more extensible,
  so that the custom VPP can be instantiated using DI.

--HG--
branch : dev
2010-06-06 21:36:06 -07:00
Renaud Paquay 2c9d0caf0a Remove extra spaces
--HG--
branch : dev
2010-06-05 23:06:40 -07:00
Renaud Paquay 70f3f01b22 Fix braces formatting
--HG--
branch : dev
2010-06-05 23:04:56 -07:00
Renaud Paquay 196a24d572 Merge
--HG--
branch : dev
2010-06-05 15:40:12 -07:00
Renaud Paquay 1efde731fe Create a virtual path provider for WebForms files
This is so that we dynamically add the relevant <%@ Assembly Name="" %>
directive to WebForms files served from modules which have been dynamically
compiled and stored in the "~/App_Data/Dependencies" folder.

--HG--
branch : dev
2010-06-04 22:28:01 -07:00
Renaud Paquay 2be308bbf6 Fix couple of bugs in DependenciesFolder
We need to overwrite files when copying to App_Data/Dependencies folder.
We need to compare modification date, not creation date when deciding
to copy a file to the App_Data/Dependencies folder.

--HG--
branch : dev
2010-06-04 22:26:16 -07:00
Renaud Paquay 412d21b234 Tweak extension loading strategy:
Don't store compiled assemblies in "App_Data/Dependencies" if we
have a more recent one already stored.

--HG--
branch : dev
2010-06-04 19:59:20 -07:00
Renaud Paquay a249579191 Fix localization issue from previous merge
--HG--
branch : dev
2010-06-04 19:58:23 -07:00
Renaud Paquay 7ea379596d Fix error from previous merge
--HG--
branch : dev
2010-06-04 19:23:52 -07:00
Renaud Paquay 30444e7696 Merge
--HG--
branch : dev
2010-06-04 19:16:11 -07:00
Renaud Paquay a1be3efecb Module loading strategies
Make the precompiled and dynamic extension loaders work properly
and also refactor some code to introduce proper abstractions, such
as IVirtualPathProvider, IHostEnvironment, IBuildManager, etc.

--HG--
branch : dev
2010-06-04 19:13:57 -07:00
Renaud Paquay abe6c67b25 Implement dynamic compilation of modules
--HG--
branch : dev
2010-06-03 17:00:28 -07:00
Renaud Paquay d24f4cf2ac Fix identation
--HG--
branch : dev
2010-06-03 16:57:58 -07:00
Renaud Paquay 2a41a3dedf Remove implicit conversion from LocalizedString to string
Having both way implicit conversion tend to confuse the C# compiler
and really question the existence of the specific type in the first place.

--HG--
branch : dev
2010-06-03 16:57:44 -07:00
Renaud Paquay 9b57d00d13 Module loading work
Adding "App_Data/Extensions" probing path for assembly loading. This directory
will be used to store dynamically compiled module assemblies.

Adding a BuildProvider for ".csproj" file. This will be used to dynamic compile
modules when passing ".csproj" file names to the BuildManager

--HG--
branch : dev
2010-06-03 16:54:14 -07:00
Renaud Paquay 0b5581d11c Merge
--HG--
branch : dev
2010-06-02 17:33:31 -07:00
Renaud Paquay d48d822990 Fix bug in shell state computation
--HG--
branch : dev
2010-06-02 17:32:58 -07:00
Renaud Paquay 01c7e29db2 Fix unit test memory leak
Shutdown ASP.NET AppDomains after running each SpecFlow scenario.

--HG--
branch : dev
2010-05-22 17:50:18 -07:00
Renaud Paquay d716019a5e Merge net40 -> dev
Dev10 - .NET 4.0 support

--HG--
branch : dev
2010-05-21 23:44:03 -07:00
Renaud Paquay 9f728ab04e Fix input validation (.net 4.0 breaking change)
--HG--
branch : net40
2010-05-21 23:41:46 -07:00
Renaud Paquay 1af2d3717c Move project to .net 4.0
Also cleanup assemblyinfo files

--HG--
branch : net40
2010-05-21 22:23:26 -07:00
Renaud Paquay 459916ada6 Merge
--HG--
branch : net40
2010-05-21 21:53:00 -07:00
Renaud Paquay eb138170f8 Fix unit tests
--HG--
branch : dev
2010-05-21 21:26:07 -07:00
Renaud Paquay d6dc292491 Fix unit tests
--HG--
branch : dev
2010-05-20 11:00:44 -07:00
Renaud Paquay 98e676800d Fix unit test
--HG--
branch : dev
2010-05-19 13:56:00 -07:00
Renaud Paquay 445f164b86 Fix unit tests
--HG--
branch : dev
2010-05-19 13:49:53 -07:00
Renaud Paquay bbb3363519 Fix unit tests
--HG--
branch : dev
2010-05-19 13:44:53 -07:00
Renaud Paquay 658fa5e052 Merge
--HG--
branch : dev
2010-05-19 13:42:14 -07:00
Renaud Paquay 98e6ae9c76 Fix unit tests
--HG--
branch : dev
2010-05-19 13:42:01 -07:00
Renaud Paquay 0ee8910417 Merge
--HG--
branch : dev
2010-05-19 10:09:24 -07:00
Renaud Paquay d6e1440d9b Fix unit test
Change app config to rebind mvc 1.0 to mvc 2.0 assembly,
the same way we do in web.config.

--HG--
branch : dev
2010-05-19 10:05:01 -07:00
Renaud Paquay b8aadd218e Merge
--HG--
branch : dev
2010-05-18 14:33:41 -07:00
Renaud Paquay 803d040732 Fix unit test
--HG--
branch : dev
2010-05-18 14:32:05 -07:00
Renaud Paquay bd7bb210a1 Merge
--HG--
branch : dev
2010-05-13 19:11:16 -07:00
Renaud Paquay 2ad6aafc40 Move list of default features to SetupService
This is so that the "setup" command doesn't require a list of
features and can use the default list.

Also add back tags, widgets and media as enabled by default.

--HG--
branch : dev
2010-05-13 19:07:53 -07:00
Renaud Paquay 132e4236e3 Fix typo from previous merge
--HG--
branch : dev
2010-05-13 18:25:30 -07:00
Renaud Paquay c68ec562eb Merge
--HG--
branch : dev
2010-05-13 16:37:57 -07:00
Renaud Paquay 641e3833cd Make user validate a bit more robust 2010-05-13 16:31:40 -07:00
Renaud Paquay edb1867e25 Fix bug 16416
See http://orchard.codeplex.com/WorkItem/View.aspx?WorkItemId=16416

Contoso and Corporate themes were using incorrect field names for user
2010-05-13 16:31:27 -07:00
Renaud Paquay daefe6e7fe Merge
--HG--
branch : dev
2010-05-13 13:02:27 -07:00
Renaud Paquay 632fb4c863 Fix bug 16417.
See http://orchard.codeplex.com/WorkItem/View.aspx?WorkItemId=16417

We considering the list of conflicting slug, we should ignore the current
content item...

--HG--
branch : dev
2010-05-13 13:01:58 -07:00
Renaud Paquay 9ecc759e1d Merge
--HG--
branch : dev
2010-05-12 19:12:17 -07:00
Renaud Paquay f555e2829f Fix bug 16637
See http://orchard.codeplex.com/WorkItem/View.aspx?WorkItemId=16337

There were some breaking changes introduced in the Expression Trees in .NET 4.0.
Workaround these changes in a way compatible with .NET 3.5.

--HG--
branch : dev
2010-05-12 19:11:59 -07:00
Renaud Paquay 4546f2e143 Merge
--HG--
branch : net40
2010-05-07 16:08:10 -07:00
Renaud Paquay 5a77fa9cc3 Merge
--HG--
branch : net40
2010-05-06 16:44:53 -07:00
Renaud Paquay 5b1f045210 Convert project to .net 4.0
--HG--
branch : net40
2010-05-06 16:44:25 -07:00
Renaud Paquay d47761d6a9 Merge
--HG--
branch : net40
2010-05-06 13:45:42 -07:00
Renaud Paquay d2914342c4 Merge
--HG--
branch : net40
2010-05-06 11:50:25 -07:00
Renaud Paquay 0f96552ecc Fix for SQLite bitness
Force unit test to be x86, since we are using SQLite 32-bit. This is temporary
until we find a better solution.

--HG--
branch : net40
2010-05-06 11:50:05 -07:00
Renaud Paquay c0519a48b1 Fix unit tests
Add stub for "ActiveExtensions_Obsolete"

--HG--
branch : dev
2010-05-06 11:48:20 -07:00
Renaud Paquay e7c3af20aa Merge dev -> default 2010-04-30 22:00:41 -07:00
Renaud Paquay 11e1fef85a Fix bug with blog post
blog post container field wasn't set properly. This is due to
a change in order of events between CommonAspect and BlogPost
activation. As a temporary workound, change CommonAspect to
force setting container and owner record fields if they have
a value when Activated event is processed.

--HG--
branch : dev
2010-04-30 21:56:35 -07:00
Renaud Paquay d84f4ee0db Merge
--HG--
branch : dev
2010-04-30 20:44:35 -07:00
Renaud Paquay 16cc07cf7a Temporary fix until we get feature activation complete
In order to load the list of slugs for pages and blogs posts,
we need to call "HackSimulateExtensionActivation" when a shell
is activated. We had lost this call with the multi-tenancy work.

--HG--
branch : dev
2010-04-30 20:17:54 -07:00
Renaud Paquay 3f70ab177f Fix empty RouteData issue in IoC RequestContext
Since we wrap the MvcHandler with our own handler, we need to dig
down the RequestContext instance a bit deeper.

--HG--
branch : dev
2010-04-30 19:49:58 -07:00