Move collections to abstractions

This commit is contained in:
Stephan
2019-05-20 17:43:50 +02:00
parent e0fd6fa8ee
commit 2495df5573
10 changed files with 6 additions and 15 deletions
@@ -5,7 +5,7 @@ namespace Umbraco.Core.Collections
/// <summary>
/// Represents a composite key of (Type, Type) for fast dictionaries.
/// </summary>
internal struct CompositeTypeTypeKey : IEquatable<CompositeTypeTypeKey>
public struct CompositeTypeTypeKey : IEquatable<CompositeTypeTypeKey>
{
/// <summary>
/// Initializes a new instance of the <see cref="CompositeTypeTypeKey"/> struct.
@@ -7,7 +7,7 @@ namespace Umbraco.Core.Collections
/// and is customizable to keep the newest or oldest equatable item
/// </summary>
/// <typeparam name="T"></typeparam>
internal class OrderedHashSet<T> : KeyedCollection<T, T>
public class OrderedHashSet<T> : KeyedCollection<T, T>
{
private readonly bool _keepOldest;
@@ -8,7 +8,7 @@ namespace Umbraco.Core.Collections
/// </summary>
/// <remarks>Types in the list are, or derive from, or implement, the base type.</remarks>
/// <typeparam name="TBase">The base type.</typeparam>
internal class TypeList<TBase>
public class TypeList<TBase>
{
private readonly List<Type> _list = new List<Type>();
@@ -30,4 +30,4 @@ namespace Umbraco.Core.Collections
return _list.Contains(type);
}
}
}
}
+2 -11
View File
@@ -117,6 +117,8 @@
</Compile>
-->
<Compile Include="Cache\AppPolicedCacheDictionary.cs" />
<Compile Include="Collections\DeepCloneableList.cs" />
<Compile Include="Collections\ListCloneBehavior.cs" />
<Compile Include="Compose\AuditEventsComponent.cs" />
<Compile Include="Cache\AppCaches.cs" />
<Compile Include="Cache\CacheKeys.cs" />
@@ -149,15 +151,6 @@
<Compile Include="Cache\SingleItemsOnlyRepositoryCachePolicy.cs" />
<Compile Include="Cache\DictionaryAppCache.cs" />
<Compile Include="Cache\TypedCacheRefresherBase.cs" />
<Compile Include="Collections\CompositeNStringNStringKey.cs" />
<Compile Include="Collections\CompositeStringStringKey.cs" />
<Compile Include="Collections\CompositeIntStringKey.cs" />
<Compile Include="Collections\CompositeTypeTypeKey.cs" />
<Compile Include="Collections\ConcurrentHashSet.cs" />
<Compile Include="Collections\DeepCloneableList.cs" />
<Compile Include="Collections\ListCloneBehavior.cs" />
<Compile Include="Collections\ObservableDictionary.cs" />
<Compile Include="Collections\TypeList.cs" />
<Compile Include="Compose\AuditEventsComposer.cs" />
<Compile Include="Composing\ComponentComposer.cs" />
<Compile Include="Composing\Composers.cs" />
@@ -863,7 +856,6 @@
<Compile Include="NameValueCollectionExtensions.cs" />
<Compile Include="NetworkHelper.cs" />
<Compile Include="ObjectExtensions.cs" />
<Compile Include="Collections\OrderedHashSet.cs" />
<Compile Include="Packaging\ConflictingPackageData.cs" />
<Compile Include="Models\Packaging\UninstallationSummary.cs" />
<Compile Include="Packaging\PackageExtraction.cs" />
@@ -1443,7 +1435,6 @@
<Compile Include="Sync\RefreshMethodType.cs" />
<Compile Include="Sync\ServerMessengerBase.cs" />
<Compile Include="Sync\SingleServerRegistrar.cs" />
<Compile Include="Collections\TopoGraph.cs" />
<Compile Include="TypeExtensions.cs" />
<Compile Include="Udi.cs" />
<Compile Include="UdiDefinitionAttribute.cs" />