Merge branch 'vx/feature/unicore' of https://github.com/umbraco/Umbraco-CMS into vx/feature/unicore

This commit is contained in:
Carole Rennie Logan
2019-05-20 16:25:38 +01:00
18 changed files with 4 additions and 74 deletions

View File

@@ -1,12 +1,10 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
namespace Umbraco.Core
{
internal static class AssemblyExtensions
public static class AssemblyExtensions
{
/// <summary>
/// Returns the file used to load the assembly

View File

@@ -1,23 +1,15 @@
using System;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading;
namespace Umbraco.Core
{
/// <summary>
/// Static and extension methods for the DataTable object
/// </summary>
internal static class DataTableExtensions
{
/// <summary>
/// Creates a DataTable with the specified alias and columns and uses a callback to populate the headers.
/// </summary>

View File

@@ -80,7 +80,7 @@ namespace Umbraco.Core.Logging
if ((Stopwatch.ElapsedMilliseconds >= _thresholdMilliseconds || _failed)
&& _loggerType != null && _logger != null
&& (_endMessage.IsNullOrWhiteSpace() == false || _failed))
&& (string.IsNullOrWhiteSpace(_endMessage) == false || _failed))
{
if (_failed)
{

View File

@@ -3,7 +3,7 @@ using System.Threading;
namespace Umbraco.Core
{
static class ThreadExtensions
public static class ThreadExtensions
{
public static void SanitizeThreadCulture(this Thread thread)
{

View File

@@ -1,45 +0,0 @@
using System;
using System.Reflection;
using System.Web;
using Umbraco.Core;
// no binding redirect for now = de-activate
//[assembly: PreApplicationStartMethod(typeof(BindingRedirects), "Initialize")]
namespace Umbraco.Core
{
/// <summary>
/// Manages any assembly binding redirects that cannot be done via config (i.e. unsigned --> signed assemblies)
/// </summary>
public sealed class BindingRedirects
{
public static void Initialize()
{
// this only gets called when an assembly can't be resolved
AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
}
/// <summary>
/// This is used to do an assembly binding redirect via code - normally required due to signature changes in assemblies
/// </summary>
/// <param name="sender"></param>
/// <param name="args"></param>
/// <returns></returns>
private static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
{
// When an assembly can't be resolved. In here we can do magic with the assembly name and try loading another.
// keep here for reference - we don't use AutoMapper
/*
//AutoMapper:
// this is used for loading a signed assembly of AutoMapper (v. 3.1+) without having to recompile old code.
// ensure the assembly is indeed AutoMapper and that the PublicKeyToken is null before trying to Load again
// do NOT just replace this with 'return Assembly', as it will cause an infinite loop -> stackoverflow
if (args.Name.StartsWith("AutoMapper") && args.Name.EndsWith("PublicKeyToken=null"))
return Assembly.Load(args.Name.Replace(", PublicKeyToken=null", ", PublicKeyToken=be96cd2c38ef1005"));
*/
return null;
}
}
}

View File

@@ -116,10 +116,8 @@
<DependentUpon>Constants.cs</DependentUpon>
</Compile>
-->
<Compile Include="AssemblyExtensions.cs" />
<Compile Include="Cache\AppPolicedCacheDictionary.cs" />
<Compile Include="Compose\AuditEventsComponent.cs" />
<Compile Include="BindingRedirects.cs" />
<Compile Include="Cache\AppCaches.cs" />
<Compile Include="Cache\CacheKeys.cs" />
<Compile Include="Cache\AppCacheExtensions.cs" />
@@ -348,9 +346,7 @@
<Compile Include="Logging\Viewer\LogMessage.cs" />
<Compile Include="Logging\Viewer\LogViewerComposer.cs" />
<Compile Include="Logging\Viewer\LogViewerSourceBase.cs" />
<Compile Include="Logging\IProfilingLogger.cs" />
<Compile Include="Logging\LogHttpRequest.cs" />
<Compile Include="Logging\LogLevel.cs" />
<Compile Include="Logging\MessageTemplates.cs" />
<Compile Include="Logging\Serilog\Enrichers\HttpRequestIdEnricher.cs" />
<Compile Include="Logging\Serilog\Enrichers\HttpRequestNumberEnricher.cs" />
@@ -533,7 +529,6 @@
<Compile Include="PropertyEditors\ValueListConfiguration.cs" />
<Compile Include="PropertyEditors\VoidEditor.cs" />
<Compile Include="ReflectionUtilities-Unused.cs" />
<Compile Include="RuntimeLevelReason.cs" />
<Compile Include="RuntimeOptions.cs" />
<Compile Include="Runtime\CoreRuntime.cs" />
<Compile Include="Runtime\CoreInitialComponent.cs" />
@@ -545,9 +540,6 @@
<Compile Include="Migrations\Expressions\Delete\KeysAndIndexes\DeleteKeysAndIndexesBuilder.cs" />
<Compile Include="Migrations\IMigrationBuilder.cs" />
<Compile Include="Migrations\Install\DatabaseBuilder.cs" />
<Compile Include="DataTableExtensions.cs" />
<Compile Include="DateTimeExtensions.cs" />
<Compile Include="DecimalExtensions.cs" />
<Compile Include="DelegateExtensions.cs" />
<Compile Include="Deploy\ArtifactBase.cs" />
<Compile Include="Deploy\ArtifactDependency.cs" />
@@ -575,7 +567,6 @@
<Compile Include="DictionaryExtensions.cs" />
<Compile Include="Dictionary\ICultureDictionary.cs" />
<Compile Include="Dictionary\ICultureDictionaryFactory.cs" />
<Compile Include="Logging\DisposableTimer.cs" />
<Compile Include="EmailSender.cs" />
<Compile Include="Events\CancellableEventArgs.cs" />
<Compile Include="Events\CancellableObjectEventArgs.cs" />
@@ -648,16 +639,11 @@
<Compile Include="IRuntimeState.cs" />
<Compile Include="LambdaExpressionCacheKey.cs" />
<Compile Include="Logging\DebugDiagnosticsLogger.cs" />
<Compile Include="Logging\ILogger.cs" />
<Compile Include="Logging\IProfiler.cs" />
<Compile Include="Logging\Serilog\SerilogLogger.cs" />
<Compile Include="Logging\LoggerExtensions.cs" />
<Compile Include="Logging\LoggingTaskExtension.cs" />
<Compile Include="Logging\LogProfiler.cs" />
<Compile Include="Logging\OwinLogger.cs" />
<Compile Include="Logging\OwinLoggerFactory.cs" />
<Compile Include="Logging\ProfilerExtensions.cs" />
<Compile Include="Logging\ProfilingLogger.cs" />
<Compile Include="Logging\VoidProfiler.cs" />
<Compile Include="MainDom.cs" />
<Compile Include="Manifest\ManifestParser.cs" />
@@ -1293,7 +1279,6 @@
<Compile Include="PropertyEditors\ValueConverters\UploadPropertyConverter.cs" />
<Compile Include="PropertyEditors\ValueConverters\YesNoValueConverter.cs" />
<Compile Include="ReflectionUtilities.cs" />
<Compile Include="RuntimeLevel.cs" />
<Compile Include="RuntimeState.cs" />
<Compile Include="Runtime\CoreInitialComposer.cs" />
<Compile Include="SafeCallContext.cs" />
@@ -1437,7 +1422,6 @@
<Compile Include="Services\Implement\TagService.cs" />
<Compile Include="Services\Implement\UserService.cs" />
<Compile Include="Services\UserServiceExtensions.cs" />
<Compile Include="Settable.cs" />
<Compile Include="Compose\ManifestWatcherComponent.cs" />
<Compile Include="Compose\RelateOnCopyComponent.cs" />
<Compile Include="Compose\RelateOnTrashComponent.cs" />
@@ -1471,6 +1455,7 @@
<Compile Include="Sync\ServerRole.cs" />
<Compile Include="Sync\SingleServerRegistrar.cs" />
<Compile Include="ThreadExtensions.cs" />
<Compile Include="SystemUtilities.cs" />
<Compile Include="Collections\TopoGraph.cs" />
<Compile Include="TypeExtensions.cs" />
<Compile Include="Udi.cs" />