Netcore: Migration of Model classes from Umbraco.Infrastructure to Core (#9404)
* Migrating more model, mapping and tree classes * Migrating files from Mapping dir without Newtonsoft dependency * Migrating files from PublishedContent and Editors dirs without Newtonsoft dependency + some more of the same kind * Migrating DataType class without the usage of Newtonsoft.Json and making the corresponding changes to all classes affected * Combining 3 ContentExtensions files into 1 * Refactoring from migrating ContentExtensions * Migrating more classes * Migrating ContentRepositoryExtensions - combining it with existing file in Umbraco.Core * removing Newtonsoft json dependency & migrating file. Adding partial migration of ConfigurationEditor, so PropertyTagsExtensions can be migrated * Migrating ContentTagsExtensions, and refactoring from changes in PropertyTagsExtensions * Changes that should be reverted once ConfigurationEditor class is fully migrated * VS couldn't find Composing, so build was failing. Removing the using solves the problem * Handling a single case for deserializing a subset of an input * Small changes and added tests to JsonNetSerializer Signed-off-by: Bjarke Berg <mail@bergmania.dk> * Migrated ConfigurationEditor Signed-off-by: Bjarke Berg <mail@bergmania.dk> Co-authored-by: Bjarke Berg <mail@bergmania.dk>
This commit is contained in:
committed by
GitHub
parent
d498c1a2cd
commit
dd5f400cf3
@@ -28,6 +28,7 @@ using Umbraco.Core.Persistence;
|
||||
using Umbraco.Core.Persistence.Querying;
|
||||
using Umbraco.Core.PropertyEditors;
|
||||
using Umbraco.Core.Security;
|
||||
using Umbraco.Core.Serialization;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Core.Strings;
|
||||
using Umbraco.Extensions;
|
||||
@@ -63,6 +64,7 @@ namespace Umbraco.Web.BackOffice.Controllers
|
||||
private readonly IContentTypeBaseServiceProvider _contentTypeBaseServiceProvider;
|
||||
private readonly IRelationService _relationService;
|
||||
private readonly IImageUrlGenerator _imageUrlGenerator;
|
||||
private readonly IJsonSerializer _serializer;
|
||||
private readonly ILogger<MediaController> _logger;
|
||||
|
||||
public MediaController(
|
||||
@@ -84,8 +86,9 @@ namespace Umbraco.Web.BackOffice.Controllers
|
||||
PropertyEditorCollection propertyEditors,
|
||||
IMediaFileSystem mediaFileSystem,
|
||||
IHostingEnvironment hostingEnvironment,
|
||||
IImageUrlGenerator imageUrlGenerator)
|
||||
: base(cultureDictionary, loggerFactory, shortStringHelper, eventMessages, localizedTextService)
|
||||
IImageUrlGenerator imageUrlGenerator,
|
||||
IJsonSerializer serializer)
|
||||
: base(cultureDictionary, loggerFactory, shortStringHelper, eventMessages, localizedTextService, serializer)
|
||||
{
|
||||
_shortStringHelper = shortStringHelper;
|
||||
_contentSettings = contentSettings.Value;
|
||||
@@ -104,6 +107,7 @@ namespace Umbraco.Web.BackOffice.Controllers
|
||||
_hostingEnvironment = hostingEnvironment;
|
||||
_logger = loggerFactory.CreateLogger<MediaController>();
|
||||
_imageUrlGenerator = imageUrlGenerator;
|
||||
_serializer = serializer;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -764,7 +768,7 @@ namespace Umbraco.Web.BackOffice.Controllers
|
||||
|
||||
await using (var stream = formFile.OpenReadStream())
|
||||
{
|
||||
f.SetValue(_mediaFileSystem,_shortStringHelper, _contentTypeBaseServiceProvider, Constants.Conventions.Media.File,fileName, stream);
|
||||
f.SetValue(_mediaFileSystem,_shortStringHelper, _contentTypeBaseServiceProvider, _serializer, Constants.Conventions.Media.File,fileName, stream);
|
||||
}
|
||||
|
||||
|
||||
@@ -774,7 +778,6 @@ namespace Umbraco.Web.BackOffice.Controllers
|
||||
AddCancelMessage(tempFiles,
|
||||
message: _localizedTextService.Localize("speechBubbles/operationCancelledText") + " -- " + mediaItemName);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user