From dbde9e7104b907bbbaea17e21247d8cafc8b3a4c Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Sat, 14 Oct 2017 16:12:07 -0700 Subject: Massive refactoring to introduce the concept of IBackend --- .../ProvidesDependencyCollection.cs | 64 ---------------------- 1 file changed, 64 deletions(-) delete mode 100644 src/WixToolset.Core/ProvidesDependencyCollection.cs (limited to 'src/WixToolset.Core/ProvidesDependencyCollection.cs') diff --git a/src/WixToolset.Core/ProvidesDependencyCollection.cs b/src/WixToolset.Core/ProvidesDependencyCollection.cs deleted file mode 100644 index a777afb0..00000000 --- a/src/WixToolset.Core/ProvidesDependencyCollection.cs +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset -{ - using System; - using System.Collections.ObjectModel; - - /// - /// A case-insensitive collection of unique objects. - /// - internal sealed class ProvidesDependencyCollection : KeyedCollection - { - /// - /// Creates a case-insensitive collection of unique objects. - /// - internal ProvidesDependencyCollection() - : base(StringComparer.InvariantCultureIgnoreCase) - { - } - - /// - /// Adds the to the collection if it doesn't already exist. - /// - /// The to add to the collection. - /// True if the was added to the collection; otherwise, false. - /// The parameter is null. - internal bool Merge(ProvidesDependency dependency) - { - if (null == dependency) - { - throw new ArgumentNullException("dependency"); - } - - // If the dependency key is already in the collection, verify equality for a subset of properties. - if (this.Contains(dependency.Key)) - { - ProvidesDependency current = this[dependency.Key]; - if (!current.Equals(dependency)) - { - return false; - } - } - - base.Add(dependency); - return true; - } - - /// - /// Gets the for the . - /// - /// The dependency to index. - /// The parameter is null. - /// The for the . - protected override string GetKeyForItem(ProvidesDependency dependency) - { - if (null == dependency) - { - throw new ArgumentNullException("dependency"); - } - - return dependency.Key; - } - } -} -- cgit v1.2.3-55-g6feb