Assigning null to a key in the MultiDictionary will not delete that key (this behavior is symmetric with the behavior of querying the values under a key where null indicates that the key doesn't exist - it also doesn't add any "secret tricks" because the normal Dictionary doesn't intersect this functionality of having an extra container between the key and the values)
git-svn-id: file:///srv/devel/repo-conversion/nusu@217 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
parent
daf8f559d6
commit
b7c883ea8d
|
@ -388,9 +388,7 @@
|
||||||
<Link>Foundation.snk</Link>
|
<Link>Foundation.snk</Link>
|
||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup />
|
||||||
<Folder Include="Source\Cloning\" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
|
|
@ -35,7 +35,7 @@ namespace Nuclex.Support.Collections {
|
||||||
/// <para>
|
/// <para>
|
||||||
/// Therefore, it's not only good at coping with lists that are modified at their
|
/// Therefore, it's not only good at coping with lists that are modified at their
|
||||||
/// beginning, but also at handling huge data sets since enlarging the deque doesn't
|
/// beginning, but also at handling huge data sets since enlarging the deque doesn't
|
||||||
/// require items to be copied around and still can be accessed by index.
|
/// require items to be copied around and it still can be accessed by index.
|
||||||
/// </para>
|
/// </para>
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public partial class Deque<ItemType> : IList<ItemType>, IList {
|
public partial class Deque<ItemType> : IList<ItemType>, IList {
|
||||||
|
|
|
@ -18,11 +18,11 @@ License along with this library
|
||||||
*/
|
*/
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#if UNITTEST
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
#if UNITTEST
|
|
||||||
|
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using NMock;
|
using NMock;
|
||||||
|
|
||||||
|
|
|
@ -327,6 +327,10 @@ namespace Nuclex.Support.Collections {
|
||||||
public ICollection<TValue> this[TKey key] {
|
public ICollection<TValue> this[TKey key] {
|
||||||
get { return this.typedDictionary[key]; }
|
get { return this.typedDictionary[key]; }
|
||||||
set {
|
set {
|
||||||
|
if(value == null) {
|
||||||
|
this.typedDictionary.Remove(key);
|
||||||
|
}
|
||||||
|
|
||||||
ICollection<TValue> currentValues;
|
ICollection<TValue> currentValues;
|
||||||
if(this.typedDictionary.TryGetValue(key, out currentValues)) {
|
if(this.typedDictionary.TryGetValue(key, out currentValues)) {
|
||||||
currentValues.Clear();
|
currentValues.Clear();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user