Fixed issue with models builder
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
This commit is contained in:
@@ -24,14 +24,13 @@ namespace Umbraco.ModelsBuilder.Embedded.Compose
|
||||
composition.RegisterUnique<OutOfDateModelsStatus>();
|
||||
composition.RegisterUnique<ModelsGenerationError>();
|
||||
|
||||
|
||||
composition.RegisterUnique<PureLiveModelFactory>();
|
||||
composition.RegisterUnique<IPublishedModelFactory>(factory =>
|
||||
{
|
||||
var config = factory.GetInstance<IOptions<ModelsBuilderSettings>>().Value;
|
||||
if (config.ModelsMode == ModelsMode.PureLive)
|
||||
{
|
||||
composition.RegisterUnique<IPublishedModelFactory, PureLiveModelFactory>();
|
||||
|
||||
return factory.GetInstance<PureLiveModelFactory>();
|
||||
// the following would add @using statement in every view so user's don't
|
||||
// have to do it - however, then noone understands where the @using statement
|
||||
// comes from, and it cannot be avoided / removed --- DISABLED
|
||||
|
||||
@@ -66,8 +66,8 @@
|
||||
"EnableTours": true
|
||||
},
|
||||
"ModelsBuilder": {
|
||||
"ModelsMode": "Nothing",
|
||||
"Enable": "true"
|
||||
"ModelsMode": "PureLive",
|
||||
"Enable": false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -230,7 +230,6 @@
|
||||
<Compile Include="Mvc\FilteredControllerFactoryCollectionBuilder.cs" />
|
||||
<Compile Include="Mvc\SurfaceControllerTypeCollection.cs" />
|
||||
<Compile Include="PublishedElementExtensions.cs" />
|
||||
<Compile Include="PublishedModels\DummyClassSoThatPublishedModelsNamespaceExists.cs" />
|
||||
<Compile Include="Security\AuthenticationExtensions.cs" />
|
||||
<Compile Include="Security\UmbracoSecureDataFormat.cs" />
|
||||
<Compile Include="Security\UmbracoAuthTicketDataProtector.cs" />
|
||||
|
||||
Reference in New Issue
Block a user