diff --git a/lib/autofac/Autofac.Configuration.dll b/lib/autofac/Autofac.Configuration.dll index ea99f7a19..69148dbc5 100644 Binary files a/lib/autofac/Autofac.Configuration.dll and b/lib/autofac/Autofac.Configuration.dll differ diff --git a/lib/autofac/Autofac.Integration.Mef.dll b/lib/autofac/Autofac.Integration.Mef.dll index ded2f3eb5..2fcd3ac69 100644 Binary files a/lib/autofac/Autofac.Integration.Mef.dll and b/lib/autofac/Autofac.Integration.Mef.dll differ diff --git a/lib/autofac/Autofac.Integration.Mvc.dll b/lib/autofac/Autofac.Integration.Mvc.dll index dc378a74c..31e804f49 100644 Binary files a/lib/autofac/Autofac.Integration.Mvc.dll and b/lib/autofac/Autofac.Integration.Mvc.dll differ diff --git a/lib/autofac/Autofac.Integration.SignalR.dll b/lib/autofac/Autofac.Integration.SignalR.dll new file mode 100644 index 000000000..5331f666a Binary files /dev/null and b/lib/autofac/Autofac.Integration.SignalR.dll differ diff --git a/lib/autofac/Autofac.Integration.Wcf.dll b/lib/autofac/Autofac.Integration.Wcf.dll index bea0bcbde..e74da650c 100644 Binary files a/lib/autofac/Autofac.Integration.Wcf.dll and b/lib/autofac/Autofac.Integration.Wcf.dll differ diff --git a/lib/autofac/Autofac.Integration.Web.dll b/lib/autofac/Autofac.Integration.Web.dll index 33dc32ece..39d4b63ef 100644 Binary files a/lib/autofac/Autofac.Integration.Web.dll and b/lib/autofac/Autofac.Integration.Web.dll differ diff --git a/lib/autofac/Autofac.Integration.WebApi.dll b/lib/autofac/Autofac.Integration.WebApi.dll new file mode 100644 index 000000000..b158d602d Binary files /dev/null and b/lib/autofac/Autofac.Integration.WebApi.dll differ diff --git a/lib/autofac/Autofac.XML b/lib/autofac/Autofac.XML index bf5f3c204..0fee1b6f2 100644 --- a/lib/autofac/Autofac.XML +++ b/lib/autofac/Autofac.XML @@ -4,10 +4,165 @@ Autofac - + - Support the - type automatically whenever type T is registered with the container. + Service used as a "flag" to indicate a particular component should be + automatically activated on container build. + + + + + Services are the lookup keys used to locate component instances. + + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Implements the operator ==. + + The left operand. + The right operand. + The result of the operator. + + + + Implements the operator !=. + + The left operand. + The right operand. + The result of the operator. + + + + Determines whether the specified is equal to the current . + + The to compare with the current . + + true if the specified is equal to the current ; otherwise, false. + + The parameter is null. + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + Gets a human-readable description of the service. + + The description. + + + + Determines whether the specified is equal to the current . + + The to compare with the current . + + if the specified is not + and is an ; otherwise, . + + + + All services of this type are considered "equal." + + + + + + Serves as a hash function for a particular type. + + + A hash code for the current . Always 0 for this type. + + + + All services of this type are considered "equal" and use the same hash code. + + + + + + Gets the service description. + + + Always returns AutoActivate. + + + + + Used with the WithMetadata configuration method to + associate key-value pairs with an . + + Interface with properties whose names correspond to + the property keys. + This feature was suggested by OJ Reeves (@TheColonial). + + + + Set one of the property values. + + The type of the property. + An expression that accesses the property to set. + The property value to set. + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Cannot choose between multiple constructors with equal length {0} on type '{1}'. Select the constructor explicitly, with the UsingConstructor() configuration method, when the component is registered.. + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to {0} ---> {1} (See inner exception for details.). + + + + + Support the System.Lazy<T, TMetadata> + types automatically whenever type T is registered with the container. + Metadata values come from the component registration's metadata. When a dependency of a lazy type is used, the instantiation of the underlying component will be delayed until the Value property is first accessed. @@ -40,13 +195,51 @@ of other components (I.e. like Meta, Func or Owned.) - + - Support the - types automatically whenever type T is registered with the container. - Metadata values come from the component registration's metadata. - When a dependency of a lazy type is used, the instantiation of the underlying - component will be delayed until the Value property is first accessed. + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Lazy<T, TMetadata> Support. + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to The type '{0}' cannot be used as a metadata view. A metadata view must be a concrete class with a parameterless or dictionary constructor.. + + + + + Looks up a localized string similar to Export metadata for '{0}' is missing and no default value was supplied.. @@ -80,6 +273,73 @@ Metadata values come from the component registration's metadata. + + + Finds constructors that match a finder function. + + + + + Find suitable constructors from which to select. + + + + + Finds suitable constructors on the target type. + + Type to search for constructors. + Suitable constructors. + + + + Initializes a new instance of the class. + + + Default to selecting all public constructors. + + + + + Initializes a new instance of the class. + + The finder function. + + + + Finds suitable constructors on the target type. + + Type to search for constructors. + Suitable constructors. + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Module.ThisAssembly is only available in modules that inherit directly from Module.. + + + + + Support the + type automatically whenever type T is registered with the container. + When a dependency of a lazy type is used, the instantiation of the underlying + component will be delayed until the Value property is first accessed. + + Generates context-bound closures that represent factories from @@ -134,7 +394,7 @@ Specify a reflection activator for the given type. - Type that will be activated. + Type that will be activated. @@ -175,7 +435,7 @@ Specify a reflection activator for the given type. - Type that will be activated. + Type that will be activated. @@ -189,12 +449,7 @@ - No options. - - - - - Standard container construction. + No options - the default behavior for container building. @@ -253,10 +508,10 @@ A registration builder allowing further configuration of the component. - + - Configure the component so that every dependent component or call to Resolve() - within a ILifetimeScope tagged with the provided tag value gets the same, shared instance. + Configure the component so that every dependent component or call to Resolve() within + a ILifetimeScope tagged with any of the provided tags value gets the same, shared instance. Dependent components in lifetime scopes that are children of the tagged scope will share the parent's instance. If no appropriately tagged scope can be found in the hierarchy an is thrown. @@ -405,12 +660,12 @@ The event handler. A registration builder allowing further configuration of the component. - + Configure the component so that any properties whose types are registered in the container will be wired to instances of the appropriate service. - Set wiring options such as circular dependency wiring support. + Set wiring options such as circular dependency wiring support. A registration builder allowing further configuration of the component. @@ -451,23 +706,6 @@ The registration data. - - - Used with the WithMetadata configuration method to - associate key-value pairs with an . - - Interface with properties whose names correspond to - the property keys. - This feature was suggested by OJ Reeves (@TheColonial). - - - - Set one of the property values. - - The type of the property. - An expression that accesses the property to set. - The property value to set. - Delegates registration lookups to a specified registry. When write operations are applied, @@ -603,25 +841,25 @@ of other components (I.e. like Meta, Func or Owned.) - + Options that can be applied when autowiring properties on a component. (Multiple options can be specified using bitwise 'or' - e.g. AllowCircularDependencies | PreserveSetValues. - + Default behavior. Circular dependencies are not allowed; existing non-default property values are overwritten. - + Allows property-property and property-constructor circular dependency wiring. This flag moves property wiring from the Activating to the Activated event. - + If specified, properties that already have a non-default value will be left unchanged in the wiring operation. @@ -662,7 +900,7 @@ Creates a registration builder for the provided type. - Implementation type to register. + Implementation type to register. A registration builder. @@ -691,8 +929,11 @@ - The registration builder. + The registration builder. An IComponentRegistration. + + Thrown if is . + @@ -714,6 +955,9 @@ Services provided by the registration. Optional; target registration. An IComponentRegistration. + + Thrown if or is . + @@ -725,7 +969,7 @@ Component registry to make registration in. - Registration builder with data for new registration. + Registration builder with data for new registration. @@ -810,6 +1054,9 @@ Registration style Registration to change parameter mapping mode of. Registration builder allowing the registration to be configured. + + Thrown if is . + @@ -821,6 +1068,9 @@ Registration style Registration to change parameter mapping mode of. Registration builder allowing the registration to be configured. + + Thrown if is . + @@ -832,6 +1082,9 @@ Registration style Registration to change parameter mapping mode of. Registration builder allowing the registration to be configured. + + Thrown if is . + @@ -889,6 +1142,11 @@ Looks up a localized string similar to Build() or Update() can only be called once on a ContainerBuilder.. + + + Looks up a localized string similar to An error occurred while attempting to automatically activate registration '{0}'. See the inner exception for information on the source of the failure.. + + A strongly-typed resource class, for looking up localized strings, etc. @@ -910,27 +1168,6 @@ Looks up a localized string similar to A delegate registered to create instances of '{0}' returned null.. - - - A strongly-typed resource class, for looking up localized strings, etc. - - - - - Returns the cached ResourceManager instance used by this class. - - - - - Overrides the current thread's CurrentUICulture property for all - resource lookups using this strongly typed resource class. - - - - - Looks up a localized string similar to {0} binding flags. - - A strongly-typed resource class, for looking up localized strings, etc. @@ -1003,6 +1240,9 @@ be set to a function that will lazily retrieve the parameter value. If the result is false, will be set to null. True if a value can be supplied; otherwise, false. + + Thrown if is . + @@ -1117,59 +1357,6 @@ Identifies a service using a key in addition to its type. - - - Services are the lookup keys used to locate component instances. - - - - - Returns a that represents the current . - - - A that represents the current . - - - - - Implements the operator ==. - - The LHS. - The RHS. - The result of the operator. - - - - Implements the operator !=. - - The LHS. - The RHS. - The result of the operator. - - - - Determines whether the specified is equal to the current . - - The to compare with the current . - - true if the specified is equal to the current ; otherwise, false. - - The parameter is null. - - - - Serves as a hash function for a particular type. - - - A hash code for the current . - - - - - Gets a human-readable description of the service. - - The description. - Initializes a new instance of the class. @@ -1746,14 +1933,14 @@ resource lookups using this strongly typed resource class. - + - Looks up a localized string similar to The operation is only valid during intialisation.. + Looks up a localized string similar to The operation is only valid during initialization.. - + - Looks up a localized string similar to The operation is not valid until the object is initalised.. + Looks up a localized string similar to The operation is not valid until the object is initialized.. @@ -1867,11 +2054,6 @@ Looks up a localized string similar to Lazy<T> Support. - - - Looks up a localized string similar to Lazy<T, TMetadata> Support. - - Describes the basic requirements for generating a lightweight adapter. @@ -2167,7 +2349,7 @@ Construct an . - The decorator type. + The decorator type. The open generic service type to decorate. @@ -2415,7 +2597,7 @@ The parameters. The instance. - + The instance can be replaced if needed, e.g. by an interface proxy. @@ -2585,45 +2767,9 @@ be set to a function that will lazily retrieve the parameter value. If the result is false, will be set to null. True if a value can be supplied; otherwise, false. - - - - Finds constructors based on their binding flags. - - - - - Find suitable constructors from which to select. - - - - - Finds suitable constructors on the target type. - - Type to search for constructors. - Suitable constructors. - - - - Create an instance matching constructors with the supplied binding flags. - - Binding flags to match. - - - - Finds suitable constructors on the target type. - - Type to search for constructors. - Suitable constructors. - - - - Returns a that represents the current . - - - A that represents the current . - - 2 + + Thrown if or is . + @@ -2793,7 +2939,7 @@ - Looks up a localized string similar to No constructors on type '{0}' can be found with '{1}'.. + Looks up a localized string similar to No constructors on type '{0}' can be found with the constructor finder '{1}'.. @@ -2895,7 +3041,7 @@ - + @@ -2984,7 +3130,7 @@ Tags allow a level in the lifetime hierarchy to be identified. In most applications, tags are not necessary. - + @@ -3060,7 +3206,7 @@ true to release both managed and unmanaged resources; false to release only unmanaged resources. - + Gets the service object of the specified type. @@ -3071,11 +3217,6 @@ no service object of type . - - - An empty container. - - The disposer associated with this container. Instances can be associated @@ -3130,14 +3271,13 @@ The message. The inner exception. - + - Initializes a new instance of the class. + Gets a message that describes the current exception. - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - The parameter is null. - The class name is null or is zero (0). + + The error message that explains the reason for the exception, or an empty string(""). + @@ -3385,7 +3525,7 @@ true to release both managed and unmanaged resources; false to release only unmanaged resources. - + Gets the service object of the specified type. @@ -3444,17 +3584,11 @@ Attaches the component's lifetime to scopes matching a supplied expression. - - - Match scopes based on the provided expression. - - Expression describing scopes that will match. - - + Match scopes by comparing tags for equality. - The tag applied to matching scopes. + The tags applied to matching scopes. @@ -3482,7 +3616,7 @@ - Looks up a localized string similar to No scope with a Tag matching '{0}' is visible from the scope in which the instance was requested. This generally indicates that a component registered as per-HTTP request is being reqested by a SingleInstance() component (or a similar scenario.) Under the web integration always request dependencies from the DependencyResolver.Current or ILifetimeScopeProvider.RequestLifetime, never from the container itself.. + Looks up a localized string similar to No scope with a Tag matching '{0}' is visible from the scope in which the instance was requested. This generally indicates that a component registered as per-HTTP request is being requested by a SingleInstance() component (or a similar scenario.) Under the web integration always request dependencies from the DependencyResolver.Current or ILifetimeScopeProvider.RequestLifetime, never from the container itself.. @@ -3566,15 +3700,6 @@ The service. The inner exception. - - - Initializes a new instance of the class. - - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - The parameter is null. - The class name is null or is zero (0). - A strongly-typed resource class, for looking up localized strings, etc. @@ -4077,7 +4202,7 @@ When implemented by a component, an instance of the component will be resolved and started as soon as the container is built. Autofac will not call the Start() - method when subsequent instances are resolved. If this behaviour is required, use + method when subsequent instances are resolved. If this behavior is required, use an OnActivated() event handler instead. @@ -4207,10 +4332,10 @@ A registration builder allowing further configuration of the component. - + - Configure the component so that every dependent component or call to Resolve() - within a ILifetimeScope tagged with the provided tag value gets the same, shared instance. + Configure the component so that every dependent component or call to Resolve() within + a ILifetimeScope tagged with any of the provided tags value gets the same, shared instance. Dependent components in lifetime scopes that are children of the tagged scope will share the parent's instance. If no appropriately tagged scope can be found in the hierarchy an is thrown. @@ -4359,7 +4484,7 @@ The event handler. A registration builder allowing further configuration of the component. - + Configure the component so that any properties whose types are registered in the container will be wired to instances of the appropriate service. @@ -4439,6 +4564,9 @@ The data to copy. When true, the default service will be changed to that of the other. + + Thrown if is . + @@ -4519,6 +4647,14 @@ The assemblies from which to register modules. The type of the module to add. + + + Registers modules found in an assembly. + + Container builder. + The of the module to add. + The assemblies from which to register modules. + Add a component to the container. @@ -4548,7 +4684,7 @@ Register a component to be created through reflection. - The type of the component implementation. + The type of the component implementation. Container builder. Registration builder allowing the registration to be configured. @@ -4584,7 +4720,7 @@ Concrete types will be made as they are requested, e.g. with Resolve<Repository<int>>(). Container builder. - The open generic implementation type. + The open generic implementation type. Registration builder allowing the registration to be configured. @@ -4616,6 +4752,14 @@ The assemblies from which to register types. Registration builder allowing the registration to be configured. + + + Register the types in a list. + + Container builder. + The types to register. + Registration builder allowing the registration to be configured. + Specifies a subset of types to register from a scanned assembly. @@ -4798,17 +4942,6 @@ Registration to set service mapping on. Registration builder allowing the registration to be configured. - - - Set the policy used to find candidate constructors on the implementation type. - - Registration limit type. - Activator data type. - Registration style. - Registration to set policy on. - Binding flags used when searching for constructors. - A registration builder allowing further configuration of the component. - Set the policy used to find candidate constructors on the implementation type. @@ -4820,6 +4953,17 @@ Policy to be used when searching for constructors. A registration builder allowing further configuration of the component. + + + Set the policy used to find candidate constructors on the implementation type. + + Registration limit type. + Activator data type. + Registration style. + Registration to set policy on. + A function that returns the constructors to select from. + A registration builder allowing further configuration of the component. + Set the policy used to select from available constructors on the implementation type. @@ -4842,6 +4986,17 @@ Policy to be used when selecting a constructor. A registration builder allowing further configuration of the component. + + + Set the policy used to select from available constructors on the implementation type. + + Registration limit type. + Activator data type. + Registration style. + Registration to set policy on. + Expression demonstrating how the constructor is called. + A registration builder allowing further configuration of the component. + Configure an explicit value for a constructor parameter. @@ -4934,6 +5089,9 @@ Registration builder allowing the registration to be configured. + + Thrown if or is . + @@ -5003,7 +5161,7 @@ the excluded type. Registration to filter types from. - Registration for the excepted type. + Registration for the excepted type. The concrete type to exclude. Registration builder allowing the registration to be configured. @@ -5131,6 +5289,32 @@ Registration builder allowing the registration to be configured. Only one release action can be configured per registration. + + + Wraps a registration in an implicit and automatically + activates the registration after the container is built. + + Registration to set release action for. + Registration limit type. + Activator data type. + Registration style. + A registration builder allowing further configuration of the component. + + + While you can implement an to perform some logic at + container build time, sometimes you need to just activate a registered component and + that's it. This extension allows you to automatically activate a registration on + container build. No additional logic is executed and the resolved instance is not held + so container disposal will end up disposing of the instance. + + + Depending on how you register the lifetime of the component, you may get an exception + when you build the container - components that are scoped to specific lifetimes (like + ASP.NET components scoped to a request lifetime) will fail to resolve because the + appropriate lifetime is not available. + + + A strongly-typed resource class, for looking up localized strings, etc. @@ -5152,6 +5336,16 @@ Looks up a localized string similar to The instance registration '{0}' can support SingleInstance() sharing only.. + + + Looks up a localized string similar to A metadata attribute of type {0} was not found on {1}.. + + + + + Looks up a localized string similar to More than one metadata attribute of type {0} was found on {1}.. + + Looks up a localized string similar to No matching constructor exists on type '{0}'.. @@ -5920,6 +6114,9 @@ True if a component providing the service is available. + + Thrown if is . + @@ -6137,6 +6334,24 @@ Looks up a localized string similar to The type '{0}' is not an open generic class or interface type.. + + + Extension methods for . + + + + + Safely returns the set of loadable types from an assembly. + + The from which to load types. + + The set of types from the , or the subset + of types that could be loaded if there was any error. + + + Thrown if is . + + Helper methods used throughout the codebase. @@ -6262,6 +6477,24 @@ Expression demonstrating how the method appears. The method info for the called method. + + + Gets the for the new operation called in the expression. + + The type on which the constructor is called. + Expression demonstrating how the constructor is called. + The for the called constructor. + + + + Retrieves a custom attribute of a specified type that is applied to a specified member, + and optionally inspects the ancestors of that member. + + The type of attribute to search for. + The member to inspect. + true to inspect the ancestors of element; otherwise, false. + A custom attribute that matches , or null if no such attribute is found. + A strongly-typed resource class, for looking up localized strings, etc. @@ -6278,6 +6511,11 @@ resource lookups using this strongly typed resource class. + + + Looks up a localized string similar to The provided expression must be of the form () =>new X(), but the provided expression was {0}.. + + Looks up a localized string similar to The provided expression must be of the form x =>x.M(), but the provided expression was {0}.. @@ -6344,6 +6582,12 @@ A function that will return existing registrations for a service. Registrations providing the service. + + + Signal attribute for static analysis that indicates a helper method is + validating arguments for . + + A strongly-typed resource class, for looking up localized strings, etc. @@ -6365,33 +6609,5 @@ Looks up a localized string similar to Delegate Support (Func<T>and Custom Delegates). - - - Generates context-bound closures that represent factories from - a set of heuristics based on delegate type signatures. - - - - - - - - - - - Generates a factory delegate that closes over the provided context. - - The context in which the factory will be used. - Parameters provided to the resolve call for the factory itself. - A factory delegate that will work within the context. - - - - Generates a factory delegate that closes over the provided context. - - The context in which the factory will be used. - Parameters provided to the resolve call for the factory itself. - A factory delegate that will work within the context. - diff --git a/lib/autofac/Autofac.dll b/lib/autofac/Autofac.dll index 0f45661cb..7969129df 100644 Binary files a/lib/autofac/Autofac.dll and b/lib/autofac/Autofac.dll differ diff --git a/lib/autofac/Autofac License.txt b/lib/autofac/License.txt similarity index 94% rename from lib/autofac/Autofac License.txt rename to lib/autofac/License.txt index ec0c4b9e6..593b440e1 100644 --- a/lib/autofac/Autofac License.txt +++ b/lib/autofac/License.txt @@ -1,5 +1,5 @@ Autofac IoC Container -Copyright (c) 2007-2010 Autofac Contributors +Copyright (c) 2007-2012 Autofac Contributors http://code.google.com/p/autofac/wiki/Contributing Other software included in this distribution is owned and diff --git a/src/Orchard.Tests/Stubs/StubContainerProvider.cs b/src/Orchard.Tests/Stubs/StubContainerProvider.cs index d75f0a4b9..69c255a1e 100644 --- a/src/Orchard.Tests/Stubs/StubContainerProvider.cs +++ b/src/Orchard.Tests/Stubs/StubContainerProvider.cs @@ -12,7 +12,7 @@ namespace Orchard.Tests.Stubs { RequestLifetime.Dispose(); } - public IContainer ApplicationContainer { get; set; } + public ILifetimeScope ApplicationContainer { get; set; } public ILifetimeScope RequestLifetime { get; set; } } diff --git a/src/Orchard/Environment/OrchardStarter.cs b/src/Orchard/Environment/OrchardStarter.cs index 21d1166c5..36fabe302 100644 --- a/src/Orchard/Environment/OrchardStarter.cs +++ b/src/Orchard/Environment/OrchardStarter.cs @@ -119,13 +119,13 @@ namespace Orchard.Environment { registrations(builder); - var autofacSection = ConfigurationManager.GetSection(ConfigurationSettingsReader.DefaultSectionName); - if (autofacSection != null) - builder.RegisterModule(new ConfigurationSettingsReader()); + //var autofacSection = ConfigurationManager.GetSection(ConfigurationSettingsReader.DefaultSectionName); + //if (autofacSection != null) + // builder.RegisterModule(new ConfigurationSettingsReader()); var optionalHostConfig = HostingEnvironment.MapPath("~/Config/Host.config"); if (File.Exists(optionalHostConfig)) - builder.RegisterModule(new ConfigurationSettingsReader(ConfigurationSettingsReader.DefaultSectionName, optionalHostConfig)); + builder.RegisterModule(new ConfigurationSettingsReader(optionalHostConfig)); var optionalComponentsConfig = HostingEnvironment.MapPath("~/Config/HostComponents.config"); if (File.Exists(optionalComponentsConfig)) diff --git a/src/Orchard/Environment/ShellBuilders/ShellContainerFactory.cs b/src/Orchard/Environment/ShellBuilders/ShellContainerFactory.cs index f6ae16df2..d8e2e07dd 100644 --- a/src/Orchard/Environment/ShellBuilders/ShellContainerFactory.cs +++ b/src/Orchard/Environment/ShellBuilders/ShellContainerFactory.cs @@ -123,13 +123,13 @@ namespace Orchard.Environment.ShellBuilders { // Register code-only registrations specific to a shell _shellContainerRegistrations.Registrations(builder); - var optionalShellConfig = HostingEnvironment.MapPath("~/Config/Sites.config"); - if (File.Exists(optionalShellConfig)) - builder.RegisterModule(new ConfigurationSettingsReader(ConfigurationSettingsReader.DefaultSectionName, optionalShellConfig)); + //var optionalShellConfig = HostingEnvironment.MapPath("~/Config/Sites.config"); + //if (File.Exists(optionalShellConfig)) + // builder.RegisterModule(new ConfigurationSettingsReader(ConfigurationSettingsReader.DefaultSectionName, optionalShellConfig)); - var optionalShellByNameConfig = HostingEnvironment.MapPath("~/Config/Sites." + settings.Name + ".config"); - if (File.Exists(optionalShellByNameConfig)) - builder.RegisterModule(new ConfigurationSettingsReader(ConfigurationSettingsReader.DefaultSectionName, optionalShellByNameConfig)); + //var optionalShellByNameConfig = HostingEnvironment.MapPath("~/Config/Sites." + settings.Name + ".config"); + //if (File.Exists(optionalShellByNameConfig)) + // builder.RegisterModule(new ConfigurationSettingsReader(ConfigurationSettingsReader.DefaultSectionName, optionalShellByNameConfig)); }); }