Commit Graph

66 Commits

Author SHA1 Message Date
Warren Buckley
ea05685db6 Revert changes as not needed 2021-03-05 17:13:09 +00:00
Bjarke Berg
008fd4271c Fix unattented admin install 2021-03-03 19:48:01 +01:00
Mole
66de3f4fef Align namespaces in Runtime to Umbraco.Cms.Infrastructure 2021-02-15 11:04:19 +01:00
Mole
5bd8e32279 Align namespaces in Persistence
Made everything except for repository interface be in the Umbraco.Cms.Infrastructure.Persistence namespace
2021-02-12 13:36:50 +01:00
Mole
88f7abb72e Move Deploy and Events to Umbraco.Cms.Core.*
Also move QueuingEventDispatcher to the core project since it has 0 external references, and could be cut and pasted with 0 errors.
2021-02-12 10:54:42 +01:00
Mole
216fb87c79 Rename Umbraco.Core namespace to Umbraco.Cms.Core 2021-02-09 10:22:42 +01:00
Bjarke Berg
a54e10bc13 Merge remote-tracking branch 'origin/v8/dev' into netcore/feature/merge-v8-18-01-2021
# Conflicts:
#	.gitignore
#	build/NuSpecs/UmbracoCms.Core.nuspec
#	src/SolutionInfo.cs
#	src/Umbraco.Core/Configuration/UmbracoSettings/BackOfficeElement.cs
#	src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs
#	src/Umbraco.Core/Configuration/UmbracoSettings/IBackOfficeSection.cs
#	src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs
#	src/Umbraco.Core/IO/SystemFiles.cs
#	src/Umbraco.Core/Models/ContentBase.cs
#	src/Umbraco.Core/Models/Identity/BackOfficeIdentityUser.cs
#	src/Umbraco.Core/Persistence/UmbracoDatabaseExtensions.cs
#	src/Umbraco.Core/Runtime/CoreRuntime.cs
#	src/Umbraco.Core/RuntimeOptions.cs
#	src/Umbraco.Core/RuntimeState.cs
#	src/Umbraco.Core/Telemetry/TelemetryMarkerComponent.cs
#	src/Umbraco.Core/Telemetry/TelemetryMarkerComposer.cs
#	src/Umbraco.Examine/Umbraco.Examine.csproj
#	src/Umbraco.Infrastructure/HostedServices/ReportSiteTask.cs
#	src/Umbraco.Infrastructure/Install/InstallStepCollection.cs
#	src/Umbraco.Infrastructure/Install/InstallSteps/NewInstallStep.cs
#	src/Umbraco.Infrastructure/Migrations/Install/DatabaseBuilder.cs
#	src/Umbraco.Infrastructure/Migrations/Install/DatabaseSchemaCreator.cs
#	src/Umbraco.Infrastructure/Runtime/SqlMainDomLock.cs
#	src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/ContentTypeRepositoryTest.cs
#	src/Umbraco.Tests/Runtimes/CoreRuntimeTests.cs
#	src/Umbraco.Tests/Runtimes/StandaloneTests.cs
#	src/Umbraco.Tests/Testing/TestDatabase.cs
#	src/Umbraco.Web.BackOffice/Controllers/BackOfficeServerVariables.cs
#	src/Umbraco.Web.UI.Client/src/installer/steps/database.controller.js
#	src/Umbraco.Web.UI.NetCore/Views/Partials/Grid/Editors/TextString.cshtml
#	src/Umbraco.Web.UI.NetCore/umbraco/config/lang/da.xml
#	src/Umbraco.Web.UI.NetCore/umbraco/config/lang/en.xml
#	src/Umbraco.Web.UI.NetCore/umbraco/config/lang/en_us.xml
#	src/Umbraco.Web.UI/Umbraco/config/lang/cs.xml
#	src/Umbraco.Web.UI/config/umbracoSettings.Release.config
#	src/Umbraco.Web/Composing/CompositionExtensions/Installer.cs
#	src/Umbraco.Web/Editors/PreviewController.cs
#	src/Umbraco.Web/Editors/UsersController.cs
#	src/Umbraco.Web/JavaScript/PreviewInitialize.js
#	src/Umbraco.Web/Telemetry/TelemetryComponent.cs
#	src/Umbraco.Web/UmbracoApplication.cs
2021-01-18 16:06:23 +01:00
Shannon
57020b4778 adds notes, removes IPublishedCacheComposer 2020-12-22 12:33:00 +11:00
Shannon
03f22e9362 Fixing tests after merge 2020-12-21 16:44:50 +11:00
Paul Johnson
a69739a7a2 Remove CoreInitialComponent 2020-12-17 11:17:46 +00:00
Paul Johnson
5268f9d7f0 Resolve review comments 2020-11-24 09:37:52 +00:00
Paul Johnson
8ca3f602e2 Further cleanup of AddUmbracoCore
IUmbracoBootPermissionChecker is irrelevant in .net core as there's no concept of full trust
Allow container to create DbProviderFactoryCreator with a factory method.
2020-11-23 12:22:34 +00:00
Paul Johnson
8b97ce69b1 Removed CoreRuntimeBootstrapper
Establish runtime level at run time not during service registration.
2020-11-19 20:21:45 +00:00
Paul Johnson
3f5f85880e NetCore: MSDI refactor split CoreRuntime & Remove Current (#9356)
* Split Bootstrap code from CoreRuntime

* Make ContentService method signatures match interface
prevents need to hide the concrete class in tests

* Remove Current

Only bit that bugs me is TreeNode for IconFilePath
I get the feeling it's dead code, but can just use a setter in cs or work out path in js if required.

* Fix tests, remember to terminate IRuntime
2020-11-10 09:50:47 +01:00
Paul Johnson
4ae329589a NetCore: MSDI refactor remove IFactory & IRegister (#9308)
* Replace IFactory with IServiceProvider

* Replace IRegister with IServiceCollection

* Fix Rte.cshtml so the view can service locate.

* Replace Composing Lifetime with MSDI ServiceLifetime

* Remove ServiceProvider AddMultipleUnique extension

* Remove Umbraco.Web.Composing.Current.Reset and any calls

* Remove LightInject from net framework projects

* Brought back a helper for setting MediaFileSystem underlying IFileSystem
2020-10-30 12:16:17 +01:00
Paul Johnson
ec66990e72 NetCore: MSDI refactor phase 2 (#9280)
* Moved adapters from Infra -> Core

* Allow Composition to accept a service collection instead of an IRegister

* Composition no longer takes IRegister as constructor arg

all tests passing

* Composition no longer implements IRegister

* Lose _uniques in Composition

* lose Composition OnCreatingFactory actions

* Clean up UmbracoCoreServiceCollectionExtensions & Composition

Less IFactory

* LightInject gone where TFW == netstandard2.0 || TFW == netcoreapp3.1

* Resolve dead code issues

* Rename IFactory methods to match IServiceProvider so they can be trivially swapped later.

* Rename IFactory methods to match IServiceProvider so they can be trivially swapped later (continued)

Thought the counts were low, it's mostly extension method usage
2020-10-27 11:53:01 +01:00
Paul Johnson
a99f625f6a Netcore: Alternate approach for MSDI refactor (#9247)
* Doesn't make much sense to have Concrete on IRegister, only on IFactory

* Handle FilesTreeController requires IFileSystem of type PhysicalFileSystem

* Handle registration of default MediaFileSystem without using RegisterUniqueFor

* Remove RegisterFor / RegisterUniqueFor from IRegister

* Switch over from LightInject to wrappers around MSDI

* Made mapper dependencies more explicit

* Remove registration for AngularJsonMediaTypeFormatter

It's dependencies aren't registered so container validation fails

* Resolve lifetime issue for EnsureValidSessionId by service locating

else resolve scoped in singleton

* Make registration more explicit for backoffice UserManager

* Make install step registrations more explicit

* Disable service provider validation so site can launch

Maybe this is a problem maybe not, we build about 8000 service providers so maybe everything is fine later...

* Further cleanup of IFactory interface

* Further cleanup of IRegister interface

* Revert "Make registration more explicit for backoffice UserManager"

This reverts commit 7215fe836103c597cd0873c66737a79b91ed4c49.

* Resolve issue where NewInstallStep would fail to reset password for "SuperUser"

Before MSDI, somehow BackOfficeIdentityOptions would be configured with token provider map from IdentityBuilder.AddDefaultTokenProviders.
After switchover those config actions are lost.

Subclass IdentityBuilder to ensure BackOfficeIdentityOptions doesn't miss config setup upstream.

* Initialize current.

* Add todo to turn container validation back on.

* Migrated ScopeFileSystemsTests to integration tests

Signed-off-by: Bjarke Berg <mail@bergmania.dk>

* Resolve issue where MediaFileSystem was skipping ShadowFileSystem

* Attempt to fix ScopeFileSystemsTests on azure devops

Signed-off-by: Bjarke Berg <mail@bergmania.dk>

* Be interesting to know what the actual full path is in pipeline.

* Clarify intent of CreateMediaTest

Doesn't help resolve weird UnauthorizedAccessException but it cuts so much cognitive overhead for the future.

* Use ILoggerfactory rather than mock for the manually constructed file PhysicalFileSystem

* Maybe resolve failing test on azure pipeline.

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2020-10-26 11:47:14 +01:00
Bjarke Berg
3551d6e65e Clean up and fixed todos
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-10-06 21:23:15 +02:00
Mole
d750d2c2c1 Use generic logger more places and clean up 2020-09-28 14:59:17 +02:00
Mole
e22bbc46a7 Register ILogger<> and ILoggerFactory in CompositionExtensions_Essentials 2020-09-22 09:41:42 +02:00
Mole
d61b9f54fa Merge options 2020-09-18 12:53:06 +02:00
Nikolaj
c89659c597 Use MS ILogger in database stuff 2020-09-17 12:52:25 +02:00
Nikolaj
611276a5eb Fake SiriLogger for now and start using MSLogger more places 2020-09-16 14:29:33 +02:00
Nikolaj
120e163682 Begin trying to replace logger in Current 2020-09-16 13:46:45 +02:00
Nikolaj
a18580c7f6 Remove Debug<T> from LoggerExtensions 2020-09-16 10:24:05 +02:00
Nikolaj
dda6fb12a3 Remove LogError<T> from LoggerExtensions 2020-09-16 09:40:49 +02:00
Nikolaj
633d42039e Fix a whole bunch of other errors 2020-09-15 15:14:44 +02:00
Nikolaj
0238d6eb02 Start using LoggerFactory 2020-09-15 12:40:35 +02:00
Nikolaj
02828db8fd Add work on PublishedSnapshotService 2020-09-15 08:45:40 +02:00
Nikolaj
d7e3bce741 Rename Error to align it with MS ILogger 2020-09-14 09:10:53 +02:00
Bjarke Berg
e079bd5a50 Cleanup usages of Configs 2020-09-08 13:03:43 +02:00
Bjarke Berg
c8669b18c2 Merge remote-tracking branch 'origin/netcore/netcore' into feature/8651-config-options-patten
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-09-04 14:30:48 +02:00
Shannon
7c78b5b34f Updates CoreRuntime with better dependencies so we can disable caches, fixes integration test to run multiple callbacks registered for TearDown, ensure we TearDown the runtime. 2020-09-04 00:27:43 +10:00
Shannon
f84a93ae20 Adds IUmbracoBuilder to build the config so it's easier to split apart, ensures background tasks don't run in integration tests, uses a custom CoreRuntime to ensure we use SimpleMainDom, re-wires the UmbracoWebApplicationFactory so that duplicate Hosts are not running at the same time, fixes issues with overriding/shadowing, uses RAMDirectory in lucene for tests, fixes CoreRuntime's events that we're moved incorrectly and not backwards compat, adds new real non static events which we can use in integration tests to install the DB before the runtime state is calculated 2020-09-02 18:10:29 +10:00
Andy Butland
f1bda37a64 Updates following PR review. 2020-09-01 18:10:12 +02:00
Andy Butland
4e222f103e Reintroduced legacy config into CoreRuntime to support remaining use of Current.Configs (e.g. in UserInvite) 2020-08-26 18:21:09 +02:00
Andy Butland
8241643183 Resolved various failing tests. 2020-08-25 12:30:43 +02:00
Andy Butland
510bd92e78 Amended injection of further settings to use IOptionsSnapshot. 2020-08-21 14:52:47 +01:00
Shannon
95d695594a Ensure we capture boot failed exception earlier and ensure that composers registered to run on boot failed are executed 2020-05-19 14:51:05 +10:00
Shannon
12bb68100a Remove ununsed and unneeded DbProviderFactory CreateFactory(); from IDbProviderFactoryCreator, ensure the app doesn't explode if exceptions are thrown and boot fails 2020-05-08 17:30:30 +10:00
Bjarke Berg
8f7c022f2d AB#6233 - Handle ApplicationUrl 2020-05-07 09:34:16 +02:00
Bjarke Berg
305ed42b48 Moved the sqlce db to root/App_Data/umbraco.sdf, instead of wwwroot/App_Data/umbraco.sdf 2020-05-04 14:40:11 +02:00
Bjarke Berg
da1e83c0d1 AB#6233 - Added application url on IHostingEnvironment. Still need a way to figure out how to get this value 2020-05-01 08:26:05 +02:00
Bjarke Berg
bc4713a51c #6233- SqlCE stuff 2020-04-28 07:02:14 +02:00
Bjarke Berg
fbe6f6cdd2 AB#6232 - Moved EnablePerWebRequestScope from configure to start 2020-04-21 11:00:30 +02:00
Bjarke Berg
c0ec1bf6ca Introduced GenericDictionaryRequestAppCache, to use the HttpContext.Items from .NET Core 2020-04-20 13:21:09 +02:00
Shannon
7e2d0902af Huge IIOHelper cleanup, removes some overlap with IHostingEnvironment, much less usages of IIOHelper and instead just use what is already available on IHostingEnvironment 2020-04-03 11:03:06 +11:00
Shannon
9d320f79da New IRuntimeHash to fix type scanning in netcore in order to look at the right runtime bits to creaet a hash for 2020-04-03 01:08:52 +11:00
Shannon
8535d0fbe3 Cleans up IIOHelper and removes methods/props that shouldn't exist, changes test helper to use WorkingDirectory fixes some usages of MapPath 2020-03-31 17:27:51 +11:00
Shannon
f24cae51d8 Renames IHostingEnvironmentLifetime to IApplicationShutdownRegistry 2020-03-26 15:39:20 +11:00