AB3743 - Moved the remaining Udi stuff and the required deploy stuff

This commit is contained in:
Bjarke Berg
2019-11-19 09:46:51 +01:00
parent f6ff67aef4
commit 3ee18b8975
20 changed files with 25 additions and 31 deletions

View File

@@ -7,7 +7,7 @@ namespace Umbraco.Core
/// <summary>
/// Utility methods for the <see cref="Guid"/> struct.
/// </summary>
internal static class GuidUtils
public static class GuidUtils
{
/// <summary>
/// Combines two guid instances utilizing an exclusive disjunction.

View File

@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
namespace Umbraco.Core
{
public static class TypeExtensions
{
public static T GetCustomAttribute<T>(this Type type, bool inherit)
where T : Attribute
{
return type.GetCustomAttributes<T>(inherit).SingleOrDefault();
}
public static IEnumerable<T> GetCustomAttributes<T>(this Type type, bool inherited)
where T : Attribute
{
if (type == null) return Enumerable.Empty<T>();
return type.GetCustomAttributes(typeof (T), inherited).OfType<T>();
}
}
}

View File

@@ -97,19 +97,7 @@ namespace Umbraco.Core
&& (type.Attributes & TypeAttributes.NotPublic) == TypeAttributes.NotPublic;
}
public static T GetCustomAttribute<T>(this Type type, bool inherit)
where T : Attribute
{
return type.GetCustomAttributes<T>(inherit).SingleOrDefault();
}
public static IEnumerable<T> GetCustomAttributes<T>(this Type type, bool inherited)
where T : Attribute
{
if (type == null) return Enumerable.Empty<T>();
return type.GetCustomAttributes(typeof (T), inherited).OfType<T>();
}
/// <summary>
/// Determines whether the specified type is enumerable.

View File

@@ -252,7 +252,6 @@
<Compile Include="TypeLoaderExtensions.cs" />
<Compile Include="ContentVariationExtensions.cs" />
<Compile Include="Deploy\IDataTypeConfigurationConnector.cs" />
<Compile Include="GuidUtils.cs" />
<Compile Include="IO\MediaPathSchemes\CombinedGuidsMediaPathScheme.cs" />
<Compile Include="IO\MediaPathSchemes\OriginalMediaPathScheme.cs" />
<Compile Include="IO\MediaPathSchemes\TwoGuidsMediaPathScheme.cs" />
@@ -377,25 +376,12 @@
<Compile Include="Migrations\Expressions\Delete\KeysAndIndexes\DeleteKeysAndIndexesBuilder.cs" />
<Compile Include="Migrations\Install\DatabaseBuilder.cs" />
<Compile Include="Deploy\ArtifactBase.cs" />
<Compile Include="Deploy\ArtifactDependency.cs" />
<Compile Include="Deploy\ArtifactDependencyCollection.cs" />
<Compile Include="Deploy\ArtifactDependencyMode.cs" />
<Compile Include="Deploy\ArtifactDeployState.cs" />
<Compile Include="Deploy\ArtifactDeployStateOfTArtifactTEntity.cs" />
<Compile Include="Deploy\ArtifactSignature.cs" />
<Compile Include="Deploy\Difference.cs" />
<Compile Include="Deploy\Direction.cs" />
<Compile Include="Deploy\IArtifact.cs" />
<Compile Include="Deploy\IArtifactSignature.cs" />
<Compile Include="Deploy\IDeployContext.cs" />
<Compile Include="Deploy\IFileSource.cs" />
<Compile Include="Deploy\IFileType.cs" />
<Compile Include="Deploy\IFileTypeCollection.cs" />
<Compile Include="Deploy\IGridCellValueConnector.cs" />
<Compile Include="Deploy\IImageSourceParser.cs" />
<Compile Include="Deploy\ILocalLinkParser.cs" />
<Compile Include="Deploy\IMacroParser.cs" />
<Compile Include="Deploy\IServiceConnector.cs" />
<Compile Include="Deploy\IUniqueIdentifyingServiceConnector.cs" />
<Compile Include="Deploy\IValueConnector.cs" />
<Compile Include="Diagnostics\MiniDump.cs" />
@@ -927,9 +913,6 @@
<Compile Include="Sync\DatabaseServerMessenger.cs" />
<Compile Include="Sync\RefreshInstruction.cs" />
<Compile Include="Sync\ServerMessengerBase.cs" />
<Compile Include="UdiEntityTypeHelper.cs" />
<Compile Include="UdiGetterExtensions.cs" />
<Compile Include="UdiParserServiceConnectors.cs" />
<Compile Include="UriExtensions.cs" />
<Compile Include="Persistence\FaultHandling\RetryDbConnection.cs">
<SubType>Component</SubType>