From dcc66a0c25b71252002d4dd343bf42209bda7dd2 Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Wed, 15 Jul 2020 23:53:06 -0700 Subject: [PATCH 01/23] Enable C# 8 --- Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index c70d02c..d10cd5e 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -2,7 +2,7 @@ - 7.3 + 8.0 strict From 09cdd6e6b0b6a8b56e3e486bc54d2806f763309e Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Thu, 16 Jul 2020 07:55:25 -0700 Subject: [PATCH 02/23] Enable nullable reference types --- Directory.Build.props | 11 +++++++++++ .../DummyBenchmark.cs | 2 ++ .../Immutable/ImmutableTreeListBenchmark.cs | 2 ++ .../MemoryDiagnoserConfig.cs | 2 ++ .../Program.cs | 2 ++ .../Properties/AssemblyInfo.cs | 2 ++ .../Properties/AssemblyInfo.cs | 2 ++ .../AbstractSetTest.cs | 2 ++ .../CollectionAssert.cs | 2 ++ .../EverythingThrowsEnumerableTest.cs | 2 ++ .../EverythingThrowsEnumerable`1.cs | 2 ++ .../ExceptionUtilitiesTest.cs | 2 ++ TunnelVisionLabs.Collections.Trees.Test/Generator.cs | 2 ++ .../GeneratorTest.cs | 2 ++ .../Immutable/AbstractImmutableDictionaryTest.cs | 2 ++ .../Immutable/AbstractImmutableSetTest.cs | 2 ++ .../Immutable/FixedArray8Test.cs | 2 ++ .../ImmutableSortedTreeDictionaryBuilderTest.cs | 2 ++ .../Immutable/ImmutableSortedTreeDictionaryTest.cs | 2 ++ .../Immutable/ImmutableSortedTreeListBuilderTest.cs | 2 ++ .../Immutable/ImmutableSortedTreeListTest+ForEach.cs | 2 ++ .../Immutable/ImmutableSortedTreeListTest+GetRange.cs | 2 ++ .../Immutable/ImmutableSortedTreeListTest.cs | 2 ++ ...ableSortedTreeSetBuilderTest+ImmutableArguments.cs | 2 ++ .../Immutable/ImmutableSortedTreeSetBuilderTest.cs | 2 ++ .../Immutable/ImmutableSortedTreeSetTest.cs | 2 ++ .../Immutable/ImmutableTreeDictionaryBuilderTest.cs | 2 ++ .../Immutable/ImmutableTreeDictionaryTest.cs | 2 ++ .../Immutable/ImmutableTreeListBuilderTest+ForEach.cs | 2 ++ .../ImmutableTreeListBuilderTest+GetRange.cs | 2 ++ .../Immutable/ImmutableTreeListBuilderTest.cs | 2 ++ .../Immutable/ImmutableTreeListFactoryTest.cs | 2 ++ .../Immutable/ImmutableTreeListTest+ForEach.cs | 2 ++ .../Immutable/ImmutableTreeListTest+GetRange.cs | 2 ++ .../Immutable/ImmutableTreeListTest.cs | 2 ++ .../Immutable/ImmutableTreeQueueTest.cs | 2 ++ .../ImmutableTreeSetBuilderTest+CollidingHashCodes.cs | 2 ++ .../ImmutableTreeSetBuilderTest+ImmutableArguments.cs | 2 ++ .../Immutable/ImmutableTreeSetBuilderTest.cs | 2 ++ .../Immutable/ImmutableTreeSetTest.cs | 2 ++ .../Immutable/ImmutableTreeStackTest.cs | 2 ++ .../List/BinarySearch1.cs | 2 ++ .../List/BinarySearch2.cs | 2 ++ .../List/BinarySearch3.cs | 2 ++ .../List/CopyTo1.cs | 2 ++ .../List/CopyTo2.cs | 2 ++ .../List/CopyTo3.cs | 2 ++ .../List/TreeListAdd.cs | 2 ++ .../List/TreeListAddRange.cs | 2 ++ .../List/TreeListClear.cs | 2 ++ .../List/TreeListContains.cs | 2 ++ .../List/TreeListCount.cs | 2 ++ .../List/TreeListCtor1.cs | 2 ++ .../List/TreeListCtor2.cs | 2 ++ .../List/TreeListForEach.cs | 2 ++ .../List/TreeListGetEnumerator.cs | 2 ++ .../List/TreeListGetRange.cs | 2 ++ .../List/TreeListICollectionCopyTo.cs | 2 ++ .../List/TreeListICollectionIsReadOnly.cs | 2 ++ .../List/TreeListICollectionIsSynchronized.cs | 2 ++ .../List/TreeListICollectionSyncRoot.cs | 2 ++ .../List/TreeListIEnumerableGetEnumerator.cs | 2 ++ .../List/TreeListIEnumerableGetEnumerator2.cs | 2 ++ .../List/TreeListIListAdd.cs | 2 ++ .../List/TreeListIListContains.cs | 2 ++ .../List/TreeListIListIndexOf.cs | 2 ++ .../List/TreeListIListInsert.cs | 2 ++ .../List/TreeListIListIsFixedSize.cs | 2 ++ .../List/TreeListIListIsReadOnly.cs | 2 ++ .../List/TreeListIListItem.cs | 2 ++ .../List/TreeListIListRemove.cs | 2 ++ .../List/TreeListIndexOf1.cs | 2 ++ .../List/TreeListIndexOf2.cs | 2 ++ .../List/TreeListIndexOf3.cs | 2 ++ .../List/TreeListInsertRange.cs | 2 ++ .../List/TreeListLastIndexOf1.cs | 2 ++ .../List/TreeListLastIndexOf2.cs | 2 ++ .../List/TreeListLastIndexOf3.cs | 2 ++ .../List/TreeListRemoveAt.cs | 2 ++ .../List/TreeListRemoveRange.cs | 2 ++ .../List/TreeListReverse.cs | 2 ++ .../List/TreeListReverse2.cs | 2 ++ .../List/TreeListToArray.cs | 2 ++ .../Properties/AssemblyInfo.cs | 2 ++ .../ReverseComparerTests.cs | 2 ++ .../ReverseComparer`1.cs | 2 ++ .../SortedTreeDictionaryTest.cs | 2 ++ .../SortedTreeListTest.cs | 2 ++ .../SortedTreeSetTest.cs | 2 ++ .../SubsetHashCodeEqualityComparer`1.cs | 2 ++ .../ThrowingTraceListener.cs | 2 ++ .../TreeDictionaryTest.cs | 2 ++ .../TreeListTest.cs | 2 ++ .../TreeQueueTest.cs | 2 ++ .../TreeSetTest.cs | 2 ++ .../TreeSetWithCollidingHashCodesTest.cs | 2 ++ .../TreeSpanTest.cs | 2 ++ .../TreeStackTest.cs | 2 ++ .../ZeroHashCodeEqualityComparer`1.cs | 2 ++ .../ComparisonComparer`1.cs | 2 ++ .../ExceptionUtilities.cs | 2 ++ .../ExcludeFromCodeCoverageAttribute.cs | 2 ++ .../Immutable/FixedArray8`1.cs | 2 ++ .../Immutable/ImmutableSortedTreeDictionary.cs | 2 ++ ...bleSortedTreeDictionary`2+Builder+KeyCollection.cs | 2 ++ ...eSortedTreeDictionary`2+Builder+ValueCollection.cs | 2 ++ .../ImmutableSortedTreeDictionary`2+Builder.cs | 2 ++ .../ImmutableSortedTreeDictionary`2+Enumerator.cs | 2 ++ ...SortedTreeDictionary`2+KeyCollection+Enumerator.cs | 2 ++ .../ImmutableSortedTreeDictionary`2+KeyCollection.cs | 2 ++ ...rtedTreeDictionary`2+ValueCollection+Enumerator.cs | 2 ++ ...ImmutableSortedTreeDictionary`2+ValueCollection.cs | 2 ++ .../Immutable/ImmutableSortedTreeDictionary`2.cs | 2 ++ .../Immutable/ImmutableSortedTreeList.cs | 2 ++ .../Immutable/ImmutableSortedTreeList`1+Builder.cs | 2 ++ .../Immutable/ImmutableSortedTreeList`1+Enumerator.cs | 2 ++ .../Immutable/ImmutableSortedTreeList`1.cs | 2 ++ .../Immutable/ImmutableSortedTreeSet.cs | 2 ++ .../Immutable/ImmutableSortedTreeSet`1+Builder.cs | 2 ++ .../Immutable/ImmutableSortedTreeSet`1+Enumerator.cs | 2 ++ .../Immutable/ImmutableSortedTreeSet`1.cs | 2 ++ .../Immutable/ImmutableTreeDictionary.cs | 2 ++ ...ImmutableTreeDictionary`2+Builder+KeyCollection.cs | 2 ++ ...mutableTreeDictionary`2+Builder+ValueCollection.cs | 2 ++ .../Immutable/ImmutableTreeDictionary`2+Builder.cs | 2 ++ .../Immutable/ImmutableTreeDictionary`2+Enumerator.cs | 2 ++ ...utableTreeDictionary`2+KeyCollection+Enumerator.cs | 2 ++ .../ImmutableTreeDictionary`2+KeyCollection.cs | 2 ++ ...ableTreeDictionary`2+ValueCollection+Enumerator.cs | 2 ++ .../ImmutableTreeDictionary`2+ValueCollection.cs | 2 ++ .../Immutable/ImmutableTreeDictionary`2.cs | 2 ++ .../Immutable/ImmutableTreeList.cs | 2 ++ .../Immutable/ImmutableTreeList`1+Builder.cs | 2 ++ .../Immutable/ImmutableTreeList`1+Enumerator.cs | 2 ++ .../Immutable/ImmutableTreeList`1+IndexNode.cs | 2 ++ .../Immutable/ImmutableTreeList`1+LeafNode.cs | 2 ++ .../Immutable/ImmutableTreeList`1+Node.cs | 2 ++ .../Immutable/ImmutableTreeList`1.cs | 2 ++ .../Immutable/ImmutableTreeQueue.cs | 2 ++ .../Immutable/ImmutableTreeQueue`1+Enumerator.cs | 2 ++ .../Immutable/ImmutableTreeQueue`1.cs | 2 ++ .../Immutable/ImmutableTreeSet.cs | 2 ++ .../Immutable/ImmutableTreeSet`1+Builder.cs | 2 ++ .../Immutable/ImmutableTreeSet`1+Enumerator.cs | 2 ++ .../Immutable/ImmutableTreeSet`1.cs | 2 ++ .../Immutable/ImmutableTreeStack.cs | 2 ++ .../Immutable/ImmutableTreeStack`1+Enumerator.cs | 2 ++ .../Immutable/ImmutableTreeStack`1.cs | 2 ++ .../KeyOfPairComparer`2.cs | 2 ++ .../KeyOfPairEqualityComparer`2.cs | 2 ++ .../Properties/AssemblyInfo.cs | 2 ++ TunnelVisionLabs.Collections.Trees/SetHelper.cs | 2 ++ .../SortedTreeDictionary`2+Enumerator.cs | 2 ++ ...SortedTreeDictionary`2+KeyCollection+Enumerator.cs | 2 ++ .../SortedTreeDictionary`2+KeyCollection.cs | 2 ++ ...rtedTreeDictionary`2+ValueCollection+Enumerator.cs | 2 ++ .../SortedTreeDictionary`2+ValueCollection.cs | 2 ++ .../SortedTreeDictionary`2.cs | 2 ++ .../SortedTreeList`1+Enumerator.cs | 2 ++ .../SortedTreeList`1.cs | 2 ++ .../SortedTreeSet`1+Enumerator.cs | 2 ++ TunnelVisionLabs.Collections.Trees/SortedTreeSet`1.cs | 2 ++ .../TreeDictionary`2+Enumerator.cs | 2 ++ .../TreeDictionary`2+KeyCollection+Enumerator.cs | 2 ++ .../TreeDictionary`2+KeyCollection.cs | 2 ++ .../TreeDictionary`2+ValueCollection+Enumerator.cs | 2 ++ .../TreeDictionary`2+ValueCollection.cs | 2 ++ .../TreeDictionary`2.cs | 2 ++ .../TreeList`1+Enumerator.cs | 2 ++ .../TreeList`1+IndexNode.cs | 2 ++ .../TreeList`1+LeafNode.cs | 2 ++ TunnelVisionLabs.Collections.Trees/TreeList`1+Node.cs | 2 ++ TunnelVisionLabs.Collections.Trees/TreeList`1.cs | 2 ++ .../TreeQueue`1+Enumerator.cs | 2 ++ TunnelVisionLabs.Collections.Trees/TreeQueue`1.cs | 2 ++ .../TreeSet`1+Enumerator.cs | 2 ++ TunnelVisionLabs.Collections.Trees/TreeSet`1.cs | 2 ++ TunnelVisionLabs.Collections.Trees/TreeSpan.cs | 2 ++ .../TreeStack`1+Enumerator.cs | 2 ++ TunnelVisionLabs.Collections.Trees/TreeStack`1.cs | 2 ++ .../TunnelVisionLabs.Collections.Trees.csproj | 4 ++++ TunnelVisionLabs.Collections.Trees/ValidationRules.cs | 2 ++ 182 files changed, 375 insertions(+) diff --git a/Directory.Build.props b/Directory.Build.props index d10cd5e..1acf573 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -6,6 +6,17 @@ strict + + + enable + false + + + + + + + true diff --git a/TunnelVisionLabs.Collections.Trees.Benchmarks/DummyBenchmark.cs b/TunnelVisionLabs.Collections.Trees.Benchmarks/DummyBenchmark.cs index b25a2d4..d9e6e6d 100644 --- a/TunnelVisionLabs.Collections.Trees.Benchmarks/DummyBenchmark.cs +++ b/TunnelVisionLabs.Collections.Trees.Benchmarks/DummyBenchmark.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Benchmarks { using BenchmarkDotNet.Attributes; diff --git a/TunnelVisionLabs.Collections.Trees.Benchmarks/Immutable/ImmutableTreeListBenchmark.cs b/TunnelVisionLabs.Collections.Trees.Benchmarks/Immutable/ImmutableTreeListBenchmark.cs index 306d224..d753d95 100644 --- a/TunnelVisionLabs.Collections.Trees.Benchmarks/Immutable/ImmutableTreeListBenchmark.cs +++ b/TunnelVisionLabs.Collections.Trees.Benchmarks/Immutable/ImmutableTreeListBenchmark.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Benchmarks.Immutable { using System.Collections.Immutable; diff --git a/TunnelVisionLabs.Collections.Trees.Benchmarks/MemoryDiagnoserConfig.cs b/TunnelVisionLabs.Collections.Trees.Benchmarks/MemoryDiagnoserConfig.cs index 91a0d24..1014dea 100644 --- a/TunnelVisionLabs.Collections.Trees.Benchmarks/MemoryDiagnoserConfig.cs +++ b/TunnelVisionLabs.Collections.Trees.Benchmarks/MemoryDiagnoserConfig.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Benchmarks { using BenchmarkDotNet.Configs; diff --git a/TunnelVisionLabs.Collections.Trees.Benchmarks/Program.cs b/TunnelVisionLabs.Collections.Trees.Benchmarks/Program.cs index 5684127..597d92a 100644 --- a/TunnelVisionLabs.Collections.Trees.Benchmarks/Program.cs +++ b/TunnelVisionLabs.Collections.Trees.Benchmarks/Program.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Benchmarks { using BenchmarkDotNet.Running; diff --git a/TunnelVisionLabs.Collections.Trees.Benchmarks/Properties/AssemblyInfo.cs b/TunnelVisionLabs.Collections.Trees.Benchmarks/Properties/AssemblyInfo.cs index 26095d5..2d71da8 100644 --- a/TunnelVisionLabs.Collections.Trees.Benchmarks/Properties/AssemblyInfo.cs +++ b/TunnelVisionLabs.Collections.Trees.Benchmarks/Properties/AssemblyInfo.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + using System; using System.Reflection; using System.Runtime.InteropServices; diff --git a/TunnelVisionLabs.Collections.Trees.Experimental/Properties/AssemblyInfo.cs b/TunnelVisionLabs.Collections.Trees.Experimental/Properties/AssemblyInfo.cs index 139a406..275731d 100644 --- a/TunnelVisionLabs.Collections.Trees.Experimental/Properties/AssemblyInfo.cs +++ b/TunnelVisionLabs.Collections.Trees.Experimental/Properties/AssemblyInfo.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + using System; using System.Reflection; using System.Runtime.CompilerServices; diff --git a/TunnelVisionLabs.Collections.Trees.Test/AbstractSetTest.cs b/TunnelVisionLabs.Collections.Trees.Test/AbstractSetTest.cs index 6c37a8d..86e64ca 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/AbstractSetTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/AbstractSetTest.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/CollectionAssert.cs b/TunnelVisionLabs.Collections.Trees.Test/CollectionAssert.cs index 0d8a106..9f56397 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/CollectionAssert.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/CollectionAssert.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/EverythingThrowsEnumerableTest.cs b/TunnelVisionLabs.Collections.Trees.Test/EverythingThrowsEnumerableTest.cs index c9f8440..e676b2f 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/EverythingThrowsEnumerableTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/EverythingThrowsEnumerableTest.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/EverythingThrowsEnumerable`1.cs b/TunnelVisionLabs.Collections.Trees.Test/EverythingThrowsEnumerable`1.cs index 01ea44b..853ee72 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/EverythingThrowsEnumerable`1.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/EverythingThrowsEnumerable`1.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/ExceptionUtilitiesTest.cs b/TunnelVisionLabs.Collections.Trees.Test/ExceptionUtilitiesTest.cs index 475d817..dfe5c34 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/ExceptionUtilitiesTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/ExceptionUtilitiesTest.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/Generator.cs b/TunnelVisionLabs.Collections.Trees.Test/Generator.cs index 92ef5a9..eeb61a6 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Generator.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Generator.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/GeneratorTest.cs b/TunnelVisionLabs.Collections.Trees.Test/GeneratorTest.cs index 2c19b7f..7474b3d 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/GeneratorTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/GeneratorTest.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test { using System.Reflection; diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/AbstractImmutableDictionaryTest.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/AbstractImmutableDictionaryTest.cs index 0842ccd..09489b3 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/AbstractImmutableDictionaryTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/AbstractImmutableDictionaryTest.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/AbstractImmutableSetTest.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/AbstractImmutableSetTest.cs index e2610cf..c396899 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/AbstractImmutableSetTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/AbstractImmutableSetTest.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/FixedArray8Test.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/FixedArray8Test.cs index a2546e3..cf9df79 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/FixedArray8Test.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/FixedArray8Test.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeDictionaryBuilderTest.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeDictionaryBuilderTest.cs index f1d1110..e0dcdcf 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeDictionaryBuilderTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeDictionaryBuilderTest.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeDictionaryTest.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeDictionaryTest.cs index 2579d11..bcbdc26 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeDictionaryTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeDictionaryTest.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeListBuilderTest.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeListBuilderTest.cs index 7fd2ee0..1b35c83 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeListBuilderTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeListBuilderTest.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeListTest+ForEach.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeListTest+ForEach.cs index b1aa07b..d3701ad 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeListTest+ForEach.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeListTest+ForEach.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeListTest+GetRange.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeListTest+GetRange.cs index c087629..af9b9b9 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeListTest+GetRange.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeListTest+GetRange.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeListTest.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeListTest.cs index a510c14..381c65e 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeListTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeListTest.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeSetBuilderTest+ImmutableArguments.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeSetBuilderTest+ImmutableArguments.cs index 51ea047..c896726 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeSetBuilderTest+ImmutableArguments.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeSetBuilderTest+ImmutableArguments.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System.Collections.Generic; diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeSetBuilderTest.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeSetBuilderTest.cs index 15e125f..a617109 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeSetBuilderTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeSetBuilderTest.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeSetTest.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeSetTest.cs index d1d437d..c3fefeb 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeSetTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeSetTest.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeDictionaryBuilderTest.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeDictionaryBuilderTest.cs index c9a7d2a..bda2b32 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeDictionaryBuilderTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeDictionaryBuilderTest.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeDictionaryTest.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeDictionaryTest.cs index 0b21797..d0cb088 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeDictionaryTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeDictionaryTest.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListBuilderTest+ForEach.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListBuilderTest+ForEach.cs index 97b7a31..03f753f 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListBuilderTest+ForEach.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListBuilderTest+ForEach.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListBuilderTest+GetRange.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListBuilderTest+GetRange.cs index 7a2bab7..5c5f8fe 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListBuilderTest+GetRange.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListBuilderTest+GetRange.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListBuilderTest.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListBuilderTest.cs index 534f737..bf3ed07 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListBuilderTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListBuilderTest.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListFactoryTest.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListFactoryTest.cs index 5f59729..59aca8c 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListFactoryTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListFactoryTest.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System.Collections.Generic; diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListTest+ForEach.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListTest+ForEach.cs index 629701f..47d6e2c 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListTest+ForEach.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListTest+ForEach.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListTest+GetRange.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListTest+GetRange.cs index 5ba73bc..4552376 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListTest+GetRange.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListTest+GetRange.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListTest.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListTest.cs index 74e9ad4..fd32f4a 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListTest.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeQueueTest.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeQueueTest.cs index 324efe5..c095a35 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeQueueTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeQueueTest.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeSetBuilderTest+CollidingHashCodes.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeSetBuilderTest+CollidingHashCodes.cs index 4a39c90..0f81c58 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeSetBuilderTest+CollidingHashCodes.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeSetBuilderTest+CollidingHashCodes.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeSetBuilderTest+ImmutableArguments.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeSetBuilderTest+ImmutableArguments.cs index e243788..63a4856 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeSetBuilderTest+ImmutableArguments.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeSetBuilderTest+ImmutableArguments.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System.Collections.Generic; diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeSetBuilderTest.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeSetBuilderTest.cs index 9a7eac4..7f48595 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeSetBuilderTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeSetBuilderTest.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeSetTest.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeSetTest.cs index fc115a1..84d923b 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeSetTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeSetTest.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeStackTest.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeStackTest.cs index 9e05ea3..6d29ef9 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeStackTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeStackTest.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/BinarySearch1.cs b/TunnelVisionLabs.Collections.Trees.Test/List/BinarySearch1.cs index e253d3e..ccd2fba 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/BinarySearch1.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/BinarySearch1.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/BinarySearch2.cs b/TunnelVisionLabs.Collections.Trees.Test/List/BinarySearch2.cs index 67ef26a..a18a57c 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/BinarySearch2.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/BinarySearch2.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/BinarySearch3.cs b/TunnelVisionLabs.Collections.Trees.Test/List/BinarySearch3.cs index 78cf848..8131097 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/BinarySearch3.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/BinarySearch3.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/CopyTo1.cs b/TunnelVisionLabs.Collections.Trees.Test/List/CopyTo1.cs index a911629..3cd06f9 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/CopyTo1.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/CopyTo1.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/CopyTo2.cs b/TunnelVisionLabs.Collections.Trees.Test/List/CopyTo2.cs index b78afff..c10d486 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/CopyTo2.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/CopyTo2.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/CopyTo3.cs b/TunnelVisionLabs.Collections.Trees.Test/List/CopyTo3.cs index 5bbfe84..f66c2cb 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/CopyTo3.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/CopyTo3.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListAdd.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListAdd.cs index a00462a..b098020 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListAdd.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListAdd.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections.Generic; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListAddRange.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListAddRange.cs index 5d585bc..c82eb3d 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListAddRange.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListAddRange.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListClear.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListClear.cs index 9574d18..62c2b7b 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListClear.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListClear.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections.Generic; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListContains.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListContains.cs index f742750..fa06d13 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListContains.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListContains.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + // This file contains tests for Contains... #pragma warning disable xUnit2017 // Do not use Contains() to check if a value exists in a collection diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListCount.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListCount.cs index 4f2c084..faa0498 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListCount.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListCount.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections.Generic; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListCtor1.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListCtor1.cs index de648a6..1f73723 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListCtor1.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListCtor1.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections.Generic; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListCtor2.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListCtor2.cs index 6009ce3..128296a 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListCtor2.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListCtor2.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListForEach.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListForEach.cs index d974691..409838b 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListForEach.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListForEach.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListGetEnumerator.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListGetEnumerator.cs index b2aaa69..425b2c5 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListGetEnumerator.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListGetEnumerator.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections.Generic; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListGetRange.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListGetRange.cs index 91f517f..fee62c8 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListGetRange.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListGetRange.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListICollectionCopyTo.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListICollectionCopyTo.cs index 2b670ea..b7af79a 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListICollectionCopyTo.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListICollectionCopyTo.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListICollectionIsReadOnly.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListICollectionIsReadOnly.cs index fa54610..7f4d04d 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListICollectionIsReadOnly.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListICollectionIsReadOnly.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections.Generic; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListICollectionIsSynchronized.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListICollectionIsSynchronized.cs index 8816311..2963665 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListICollectionIsSynchronized.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListICollectionIsSynchronized.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListICollectionSyncRoot.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListICollectionSyncRoot.cs index 135337f..a21d93e 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListICollectionSyncRoot.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListICollectionSyncRoot.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIEnumerableGetEnumerator.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIEnumerableGetEnumerator.cs index b3c006d..227a4b8 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIEnumerableGetEnumerator.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIEnumerableGetEnumerator.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections.Generic; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIEnumerableGetEnumerator2.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIEnumerableGetEnumerator2.cs index 6e911c7..07a6856 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIEnumerableGetEnumerator2.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIEnumerableGetEnumerator2.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListAdd.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListAdd.cs index 05929cd..a000cb4 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListAdd.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListAdd.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListContains.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListContains.cs index fae10dd..60ad004 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListContains.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListContains.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListIndexOf.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListIndexOf.cs index 60d4c3c..7c6de9c 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListIndexOf.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListIndexOf.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListInsert.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListInsert.cs index a9755e9..0e935ca 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListInsert.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListInsert.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListIsFixedSize.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListIsFixedSize.cs index 93dcb07..eea6e36 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListIsFixedSize.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListIsFixedSize.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListIsReadOnly.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListIsReadOnly.cs index 6663cb4..ad8b626 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListIsReadOnly.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListIsReadOnly.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListItem.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListItem.cs index 0091fba..27844e9 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListItem.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListItem.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListRemove.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListRemove.cs index fbcc5d1..a8da2e3 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListRemove.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListRemove.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIndexOf1.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIndexOf1.cs index 6ab8085..15bec63 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIndexOf1.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIndexOf1.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections.Generic; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIndexOf2.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIndexOf2.cs index a96063c..d6fcd24 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIndexOf2.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIndexOf2.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIndexOf3.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIndexOf3.cs index d17a63e..2c66ba9 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIndexOf3.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIndexOf3.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListInsertRange.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListInsertRange.cs index 0e5e145..e527550 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListInsertRange.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListInsertRange.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListLastIndexOf1.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListLastIndexOf1.cs index af4b6d4..49f786c 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListLastIndexOf1.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListLastIndexOf1.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections.Generic; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListLastIndexOf2.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListLastIndexOf2.cs index 2cc340a..24f9447 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListLastIndexOf2.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListLastIndexOf2.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListLastIndexOf3.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListLastIndexOf3.cs index c049801..bea8643 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListLastIndexOf3.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListLastIndexOf3.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListRemoveAt.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListRemoveAt.cs index b542d2a..ebc0649 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListRemoveAt.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListRemoveAt.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListRemoveRange.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListRemoveRange.cs index 3248362..8f50547 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListRemoveRange.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListRemoveRange.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListReverse.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListReverse.cs index b978ec1..32d45b0 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListReverse.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListReverse.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections.Generic; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListReverse2.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListReverse2.cs index 4750a3b..1798f8c 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListReverse2.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListReverse2.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListToArray.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListToArray.cs index 54f3962..741e244 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListToArray.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListToArray.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections.Generic; diff --git a/TunnelVisionLabs.Collections.Trees.Test/Properties/AssemblyInfo.cs b/TunnelVisionLabs.Collections.Trees.Test/Properties/AssemblyInfo.cs index da53c70..083cab0 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Properties/AssemblyInfo.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Properties/AssemblyInfo.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + using System; using System.Reflection; using System.Runtime.InteropServices; diff --git a/TunnelVisionLabs.Collections.Trees.Test/ReverseComparerTests.cs b/TunnelVisionLabs.Collections.Trees.Test/ReverseComparerTests.cs index bfc9463..a5861b9 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/ReverseComparerTests.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/ReverseComparerTests.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test { using System.Collections.Generic; diff --git a/TunnelVisionLabs.Collections.Trees.Test/ReverseComparer`1.cs b/TunnelVisionLabs.Collections.Trees.Test/ReverseComparer`1.cs index b04cedc..c27cbb2 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/ReverseComparer`1.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/ReverseComparer`1.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test { using System.Collections.Generic; diff --git a/TunnelVisionLabs.Collections.Trees.Test/SortedTreeDictionaryTest.cs b/TunnelVisionLabs.Collections.Trees.Test/SortedTreeDictionaryTest.cs index 6cda22e..4e92299 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/SortedTreeDictionaryTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/SortedTreeDictionaryTest.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/SortedTreeListTest.cs b/TunnelVisionLabs.Collections.Trees.Test/SortedTreeListTest.cs index 21d968a..c51c5e2 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/SortedTreeListTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/SortedTreeListTest.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/SortedTreeSetTest.cs b/TunnelVisionLabs.Collections.Trees.Test/SortedTreeSetTest.cs index f3a21b0..3fb1655 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/SortedTreeSetTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/SortedTreeSetTest.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/SubsetHashCodeEqualityComparer`1.cs b/TunnelVisionLabs.Collections.Trees.Test/SubsetHashCodeEqualityComparer`1.cs index 47f51da..da36172 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/SubsetHashCodeEqualityComparer`1.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/SubsetHashCodeEqualityComparer`1.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/ThrowingTraceListener.cs b/TunnelVisionLabs.Collections.Trees.Test/ThrowingTraceListener.cs index ee63ca8..601d9e5 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/ThrowingTraceListener.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/ThrowingTraceListener.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/TreeDictionaryTest.cs b/TunnelVisionLabs.Collections.Trees.Test/TreeDictionaryTest.cs index 1fbef6d..71b74a0 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/TreeDictionaryTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/TreeDictionaryTest.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/TreeListTest.cs b/TunnelVisionLabs.Collections.Trees.Test/TreeListTest.cs index 5c34fa4..ea83f36 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/TreeListTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/TreeListTest.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/TreeQueueTest.cs b/TunnelVisionLabs.Collections.Trees.Test/TreeQueueTest.cs index aecf3bb..33de0a0 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/TreeQueueTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/TreeQueueTest.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/TreeSetTest.cs b/TunnelVisionLabs.Collections.Trees.Test/TreeSetTest.cs index 8b5a3b1..5f16c18 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/TreeSetTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/TreeSetTest.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/TreeSetWithCollidingHashCodesTest.cs b/TunnelVisionLabs.Collections.Trees.Test/TreeSetWithCollidingHashCodesTest.cs index 9e84b8e..b626732 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/TreeSetWithCollidingHashCodesTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/TreeSetWithCollidingHashCodesTest.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/TreeSpanTest.cs b/TunnelVisionLabs.Collections.Trees.Test/TreeSpanTest.cs index daa675a..39cfeb9 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/TreeSpanTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/TreeSpanTest.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/TreeStackTest.cs b/TunnelVisionLabs.Collections.Trees.Test/TreeStackTest.cs index 9d57222..e4aba84 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/TreeStackTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/TreeStackTest.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/ZeroHashCodeEqualityComparer`1.cs b/TunnelVisionLabs.Collections.Trees.Test/ZeroHashCodeEqualityComparer`1.cs index 287c015..0e9195d 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/ZeroHashCodeEqualityComparer`1.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/ZeroHashCodeEqualityComparer`1.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Test { using System.Collections.Generic; diff --git a/TunnelVisionLabs.Collections.Trees/ComparisonComparer`1.cs b/TunnelVisionLabs.Collections.Trees/ComparisonComparer`1.cs index 65de461..15bb045 100644 --- a/TunnelVisionLabs.Collections.Trees/ComparisonComparer`1.cs +++ b/TunnelVisionLabs.Collections.Trees/ComparisonComparer`1.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees { using System; diff --git a/TunnelVisionLabs.Collections.Trees/ExceptionUtilities.cs b/TunnelVisionLabs.Collections.Trees/ExceptionUtilities.cs index ef0a4d5..04b4d6e 100644 --- a/TunnelVisionLabs.Collections.Trees/ExceptionUtilities.cs +++ b/TunnelVisionLabs.Collections.Trees/ExceptionUtilities.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees { using System; diff --git a/TunnelVisionLabs.Collections.Trees/ExcludeFromCodeCoverageAttribute.cs b/TunnelVisionLabs.Collections.Trees/ExcludeFromCodeCoverageAttribute.cs index 58db5fd..72d7172 100644 --- a/TunnelVisionLabs.Collections.Trees/ExcludeFromCodeCoverageAttribute.cs +++ b/TunnelVisionLabs.Collections.Trees/ExcludeFromCodeCoverageAttribute.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + #if NETSTANDARD1_1 namespace System.Diagnostics.CodeAnalysis diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/FixedArray8`1.cs b/TunnelVisionLabs.Collections.Trees/Immutable/FixedArray8`1.cs index 91fad50..8d04884 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/FixedArray8`1.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/FixedArray8`1.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary.cs index 9260c6d..5736fea 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+Builder+KeyCollection.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+Builder+KeyCollection.cs index 2ba7d0a..2a64348 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+Builder+KeyCollection.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+Builder+KeyCollection.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+Builder+ValueCollection.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+Builder+ValueCollection.cs index 5d9b358..baf3549 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+Builder+ValueCollection.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+Builder+ValueCollection.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+Builder.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+Builder.cs index 7027d39..7446448 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+Builder.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+Builder.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+Enumerator.cs index e9ca4e3..9f8b005 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+Enumerator.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System.Collections; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+KeyCollection+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+KeyCollection+Enumerator.cs index 7d9a88d..30fb846 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+KeyCollection+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+KeyCollection+Enumerator.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System.Collections; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+KeyCollection.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+KeyCollection.cs index dc85b21..d7ded25 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+KeyCollection.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+KeyCollection.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+ValueCollection+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+ValueCollection+Enumerator.cs index a376fa3..e66c8c6 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+ValueCollection+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+ValueCollection+Enumerator.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System.Collections; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+ValueCollection.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+ValueCollection.cs index 5e4beda..01eb4af 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+ValueCollection.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+ValueCollection.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2.cs index 7f2a861..ed0e9a0 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeList.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeList.cs index 1b6613b..0678a34 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeList.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeList.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System.Collections.Generic; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeList`1+Builder.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeList`1+Builder.cs index 2b18634..72837be 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeList`1+Builder.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeList`1+Builder.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeList`1+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeList`1+Enumerator.cs index ff1d6fc..02a43ff 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeList`1+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeList`1+Enumerator.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System.Collections; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeList`1.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeList`1.cs index 0b8549e..75d6b1b 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeList`1.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeList`1.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeSet.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeSet.cs index 4efddca..8045a17 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeSet.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeSet.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeSet`1+Builder.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeSet`1+Builder.cs index c357a55..411c00f 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeSet`1+Builder.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeSet`1+Builder.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeSet`1+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeSet`1+Enumerator.cs index a2301a9..a23d661 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeSet`1+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeSet`1+Enumerator.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System.Collections; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeSet`1.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeSet`1.cs index d5ee63a..8174db0 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeSet`1.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeSet`1.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary.cs index 63dcfdc..dd05a78 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+Builder+KeyCollection.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+Builder+KeyCollection.cs index a31e355..7d8d82f 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+Builder+KeyCollection.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+Builder+KeyCollection.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+Builder+ValueCollection.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+Builder+ValueCollection.cs index 2b6f96c..5074973 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+Builder+ValueCollection.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+Builder+ValueCollection.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+Builder.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+Builder.cs index 08e85a0..5bd1b99 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+Builder.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+Builder.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+Enumerator.cs index f673d48..1586571 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+Enumerator.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System.Collections; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+KeyCollection+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+KeyCollection+Enumerator.cs index db0057c..5f3623e 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+KeyCollection+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+KeyCollection+Enumerator.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System.Collections; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+KeyCollection.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+KeyCollection.cs index 23682a9..2cd3c40 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+KeyCollection.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+KeyCollection.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+ValueCollection+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+ValueCollection+Enumerator.cs index 30e0893..75d8b59 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+ValueCollection+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+ValueCollection+Enumerator.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System.Collections; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+ValueCollection.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+ValueCollection.cs index cc8898d..11f6e5e 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+ValueCollection.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+ValueCollection.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2.cs index ae8b170..5ba8563 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList.cs index 8dc2da5..80703b4 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System.Collections.Generic; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+Builder.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+Builder.cs index 4687858..d3d2be6 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+Builder.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+Builder.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+Enumerator.cs index b52e329..ea264bf 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+Enumerator.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+IndexNode.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+IndexNode.cs index 7c78c3f..f80326d 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+IndexNode.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+IndexNode.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+LeafNode.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+LeafNode.cs index 88ef3ac..853c830 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+LeafNode.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+LeafNode.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+Node.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+Node.cs index 13b9b9f..b6d8bd9 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+Node.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+Node.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1.cs index 2c9376f..e2dcdfe 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeQueue.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeQueue.cs index 8011bf3..df59df7 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeQueue.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeQueue.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeQueue`1+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeQueue`1+Enumerator.cs index 77fa2ce..1affb28 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeQueue`1+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeQueue`1+Enumerator.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeQueue`1.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeQueue`1.cs index e3e3531..a327d4c 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeQueue`1.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeQueue`1.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeSet.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeSet.cs index c687dc0..85442cc 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeSet.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeSet.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeSet`1+Builder.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeSet`1+Builder.cs index 1a0aad4..4b4e8c4 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeSet`1+Builder.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeSet`1+Builder.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeSet`1+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeSet`1+Enumerator.cs index 953af9d..c11ca8d 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeSet`1+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeSet`1+Enumerator.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System.Collections; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeSet`1.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeSet`1.cs index 334b870..e621d6a 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeSet`1.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeSet`1.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeStack.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeStack.cs index f82e23e..753480e 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeStack.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeStack.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeStack`1+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeStack`1+Enumerator.cs index 3bb8f39..7981674 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeStack`1+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeStack`1+Enumerator.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeStack`1.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeStack`1.cs index eec8f5d..b84faf8 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeStack`1.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeStack`1.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/KeyOfPairComparer`2.cs b/TunnelVisionLabs.Collections.Trees/KeyOfPairComparer`2.cs index d2df197..d659636 100644 --- a/TunnelVisionLabs.Collections.Trees/KeyOfPairComparer`2.cs +++ b/TunnelVisionLabs.Collections.Trees/KeyOfPairComparer`2.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees { using System.Collections.Generic; diff --git a/TunnelVisionLabs.Collections.Trees/KeyOfPairEqualityComparer`2.cs b/TunnelVisionLabs.Collections.Trees/KeyOfPairEqualityComparer`2.cs index 5052507..34cccb5 100644 --- a/TunnelVisionLabs.Collections.Trees/KeyOfPairEqualityComparer`2.cs +++ b/TunnelVisionLabs.Collections.Trees/KeyOfPairEqualityComparer`2.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees { using System.Collections.Generic; diff --git a/TunnelVisionLabs.Collections.Trees/Properties/AssemblyInfo.cs b/TunnelVisionLabs.Collections.Trees/Properties/AssemblyInfo.cs index 0f26a92..328cdcf 100644 --- a/TunnelVisionLabs.Collections.Trees/Properties/AssemblyInfo.cs +++ b/TunnelVisionLabs.Collections.Trees/Properties/AssemblyInfo.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + using System; using System.Reflection; using System.Runtime.CompilerServices; diff --git a/TunnelVisionLabs.Collections.Trees/SetHelper.cs b/TunnelVisionLabs.Collections.Trees/SetHelper.cs index 627af73..b90c1fb 100644 --- a/TunnelVisionLabs.Collections.Trees/SetHelper.cs +++ b/TunnelVisionLabs.Collections.Trees/SetHelper.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees { using System; diff --git a/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+Enumerator.cs index 48fff2d..26c110c 100644 --- a/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+Enumerator.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees { using System.Collections; diff --git a/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+KeyCollection+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+KeyCollection+Enumerator.cs index cabcd6a..1729186 100644 --- a/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+KeyCollection+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+KeyCollection+Enumerator.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees { using System.Collections; diff --git a/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+KeyCollection.cs b/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+KeyCollection.cs index b1e3700..bb8ef38 100644 --- a/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+KeyCollection.cs +++ b/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+KeyCollection.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees { using System; diff --git a/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+ValueCollection+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+ValueCollection+Enumerator.cs index e113a1c..d1230d0 100644 --- a/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+ValueCollection+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+ValueCollection+Enumerator.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees { using System.Collections; diff --git a/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+ValueCollection.cs b/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+ValueCollection.cs index c0f6d7b..984d390 100644 --- a/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+ValueCollection.cs +++ b/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+ValueCollection.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees { using System; diff --git a/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2.cs b/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2.cs index 4ea1b3a..3910656 100644 --- a/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2.cs +++ b/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees { using System; diff --git a/TunnelVisionLabs.Collections.Trees/SortedTreeList`1+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/SortedTreeList`1+Enumerator.cs index 40bac1f..8018cc7 100644 --- a/TunnelVisionLabs.Collections.Trees/SortedTreeList`1+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/SortedTreeList`1+Enumerator.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees { using System; diff --git a/TunnelVisionLabs.Collections.Trees/SortedTreeList`1.cs b/TunnelVisionLabs.Collections.Trees/SortedTreeList`1.cs index b0d5fd6..7ae03f4 100644 --- a/TunnelVisionLabs.Collections.Trees/SortedTreeList`1.cs +++ b/TunnelVisionLabs.Collections.Trees/SortedTreeList`1.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees { using System; diff --git a/TunnelVisionLabs.Collections.Trees/SortedTreeSet`1+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/SortedTreeSet`1+Enumerator.cs index 57d31dc..ae5e87c 100644 --- a/TunnelVisionLabs.Collections.Trees/SortedTreeSet`1+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/SortedTreeSet`1+Enumerator.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees { using System.Collections; diff --git a/TunnelVisionLabs.Collections.Trees/SortedTreeSet`1.cs b/TunnelVisionLabs.Collections.Trees/SortedTreeSet`1.cs index e03676f..7eaeda1 100644 --- a/TunnelVisionLabs.Collections.Trees/SortedTreeSet`1.cs +++ b/TunnelVisionLabs.Collections.Trees/SortedTreeSet`1.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees { using System; diff --git a/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+Enumerator.cs index 62c1526..a31a374 100644 --- a/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+Enumerator.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees { using System.Collections; diff --git a/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+KeyCollection+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+KeyCollection+Enumerator.cs index 6619b98..916bf29 100644 --- a/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+KeyCollection+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+KeyCollection+Enumerator.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees { using System.Collections; diff --git a/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+KeyCollection.cs b/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+KeyCollection.cs index 5d4e914..ff5aaa6 100644 --- a/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+KeyCollection.cs +++ b/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+KeyCollection.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees { using System; diff --git a/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+ValueCollection+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+ValueCollection+Enumerator.cs index a204c95..a43638c 100644 --- a/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+ValueCollection+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+ValueCollection+Enumerator.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees { using System.Collections; diff --git a/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+ValueCollection.cs b/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+ValueCollection.cs index 4d41f5b..09cfbd9 100644 --- a/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+ValueCollection.cs +++ b/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+ValueCollection.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees { using System; diff --git a/TunnelVisionLabs.Collections.Trees/TreeDictionary`2.cs b/TunnelVisionLabs.Collections.Trees/TreeDictionary`2.cs index b07b6d9..02464de 100644 --- a/TunnelVisionLabs.Collections.Trees/TreeDictionary`2.cs +++ b/TunnelVisionLabs.Collections.Trees/TreeDictionary`2.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees { using System; diff --git a/TunnelVisionLabs.Collections.Trees/TreeList`1+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/TreeList`1+Enumerator.cs index 0e2eb19..5798b93 100644 --- a/TunnelVisionLabs.Collections.Trees/TreeList`1+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/TreeList`1+Enumerator.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees { using System; diff --git a/TunnelVisionLabs.Collections.Trees/TreeList`1+IndexNode.cs b/TunnelVisionLabs.Collections.Trees/TreeList`1+IndexNode.cs index 2abbb35..9818e87 100644 --- a/TunnelVisionLabs.Collections.Trees/TreeList`1+IndexNode.cs +++ b/TunnelVisionLabs.Collections.Trees/TreeList`1+IndexNode.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees { using System; diff --git a/TunnelVisionLabs.Collections.Trees/TreeList`1+LeafNode.cs b/TunnelVisionLabs.Collections.Trees/TreeList`1+LeafNode.cs index 9c5273b..9554721 100644 --- a/TunnelVisionLabs.Collections.Trees/TreeList`1+LeafNode.cs +++ b/TunnelVisionLabs.Collections.Trees/TreeList`1+LeafNode.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees { using System; diff --git a/TunnelVisionLabs.Collections.Trees/TreeList`1+Node.cs b/TunnelVisionLabs.Collections.Trees/TreeList`1+Node.cs index ba93947..0bed807 100644 --- a/TunnelVisionLabs.Collections.Trees/TreeList`1+Node.cs +++ b/TunnelVisionLabs.Collections.Trees/TreeList`1+Node.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees { using System; diff --git a/TunnelVisionLabs.Collections.Trees/TreeList`1.cs b/TunnelVisionLabs.Collections.Trees/TreeList`1.cs index 5dc3733..8b48010 100644 --- a/TunnelVisionLabs.Collections.Trees/TreeList`1.cs +++ b/TunnelVisionLabs.Collections.Trees/TreeList`1.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees { using System; diff --git a/TunnelVisionLabs.Collections.Trees/TreeQueue`1+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/TreeQueue`1+Enumerator.cs index a7feea6..c90a002 100644 --- a/TunnelVisionLabs.Collections.Trees/TreeQueue`1+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/TreeQueue`1+Enumerator.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees { using System.Collections; diff --git a/TunnelVisionLabs.Collections.Trees/TreeQueue`1.cs b/TunnelVisionLabs.Collections.Trees/TreeQueue`1.cs index bfcfe4f..1554d1f 100644 --- a/TunnelVisionLabs.Collections.Trees/TreeQueue`1.cs +++ b/TunnelVisionLabs.Collections.Trees/TreeQueue`1.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees { using System; diff --git a/TunnelVisionLabs.Collections.Trees/TreeSet`1+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/TreeSet`1+Enumerator.cs index 76fe581..d69c1ef 100644 --- a/TunnelVisionLabs.Collections.Trees/TreeSet`1+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/TreeSet`1+Enumerator.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees { using System.Collections; diff --git a/TunnelVisionLabs.Collections.Trees/TreeSet`1.cs b/TunnelVisionLabs.Collections.Trees/TreeSet`1.cs index d1cb718..c59da00 100644 --- a/TunnelVisionLabs.Collections.Trees/TreeSet`1.cs +++ b/TunnelVisionLabs.Collections.Trees/TreeSet`1.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees { using System; diff --git a/TunnelVisionLabs.Collections.Trees/TreeSpan.cs b/TunnelVisionLabs.Collections.Trees/TreeSpan.cs index 2bcb88b..cb6b7d8 100644 --- a/TunnelVisionLabs.Collections.Trees/TreeSpan.cs +++ b/TunnelVisionLabs.Collections.Trees/TreeSpan.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees { using System; diff --git a/TunnelVisionLabs.Collections.Trees/TreeStack`1+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/TreeStack`1+Enumerator.cs index 1b201f2..010ec88 100644 --- a/TunnelVisionLabs.Collections.Trees/TreeStack`1+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/TreeStack`1+Enumerator.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees { using System.Collections; diff --git a/TunnelVisionLabs.Collections.Trees/TreeStack`1.cs b/TunnelVisionLabs.Collections.Trees/TreeStack`1.cs index 1499639..9ab9806 100644 --- a/TunnelVisionLabs.Collections.Trees/TreeStack`1.cs +++ b/TunnelVisionLabs.Collections.Trees/TreeStack`1.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees { using System; diff --git a/TunnelVisionLabs.Collections.Trees/TunnelVisionLabs.Collections.Trees.csproj b/TunnelVisionLabs.Collections.Trees/TunnelVisionLabs.Collections.Trees.csproj index 59a2e04..6851139 100644 --- a/TunnelVisionLabs.Collections.Trees/TunnelVisionLabs.Collections.Trees.csproj +++ b/TunnelVisionLabs.Collections.Trees/TunnelVisionLabs.Collections.Trees.csproj @@ -6,6 +6,10 @@ true + + true + + ..\TunnelVisionLabs.Collections.Trees.ruleset diff --git a/TunnelVisionLabs.Collections.Trees/ValidationRules.cs b/TunnelVisionLabs.Collections.Trees/ValidationRules.cs index 098522d..38f0b32 100644 --- a/TunnelVisionLabs.Collections.Trees/ValidationRules.cs +++ b/TunnelVisionLabs.Collections.Trees/ValidationRules.cs @@ -1,6 +1,8 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#nullable disable + namespace TunnelVisionLabs.Collections.Trees { using System; From 4ce808fc60ae8161b7594b8b51c6a1099ae026ad Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Sat, 18 Jul 2020 21:47:11 -0700 Subject: [PATCH 03/23] Update Public API analyzers --- Directory.Build.props | 2 +- NuGet.Config | 11 ++++++ .../PublicAPI.Unshipped.txt | 35 ------------------- 3 files changed, 12 insertions(+), 36 deletions(-) create mode 100644 NuGet.Config diff --git a/Directory.Build.props b/Directory.Build.props index 1acf573..2486c10 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -69,7 +69,7 @@ - + diff --git a/NuGet.Config b/NuGet.Config new file mode 100644 index 0000000..074030c --- /dev/null +++ b/NuGet.Config @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt b/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt index fcb93a2..22720a0 100644 --- a/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt +++ b/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt @@ -20,7 +20,6 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.KeyCollection.CopyTo(TKey[] array, int arrayIndex) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.KeyCollection.Count.get -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.KeyCollection.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.KeyCollection.Enumerator -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.KeyCollection.KeyCollection() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.KeyCollection.Remove(TKey item) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.KeyComparer.get -> System.Collections.Generic.IComparer TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.Keys.get -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.KeyCollection @@ -36,7 +35,6 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.ValueCollection.CopyTo(TValue[] array, int arrayIndex) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.ValueCollection.Count.get -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.ValueCollection.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ValueCollection.Enumerator -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.ValueCollection.ValueCollection() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.ValueComparer.get -> System.Collections.Generic.IEqualityComparer TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.Values.get -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.ValueCollection TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.this[TKey key].get -> TValue @@ -49,7 +47,6 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Enumerator TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Enumerator.Current.get -> System.Collections.Generic.KeyValuePair TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Enumerator.Dispose() -> void -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Enumerator.Enumerator() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Enumerator.Reset() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Enumerator @@ -60,11 +57,9 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.KeyCollection.Enumerator TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.KeyCollection.Enumerator.Current.get -> TKey TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.KeyCollection.Enumerator.Dispose() -> void -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.KeyCollection.Enumerator.Enumerator() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.KeyCollection.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.KeyCollection.Enumerator.Reset() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.KeyCollection.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.KeyCollection.Enumerator -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.KeyCollection.KeyCollection() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.KeyComparer.get -> System.Collections.Generic.IComparer TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Keys.get -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.KeyCollection TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Remove(TKey key) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary @@ -80,11 +75,9 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ValueCollection.Enumerator TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ValueCollection.Enumerator.Current.get -> TValue TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ValueCollection.Enumerator.Dispose() -> void -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ValueCollection.Enumerator.Enumerator() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ValueCollection.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ValueCollection.Enumerator.Reset() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ValueCollection.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ValueCollection.Enumerator -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ValueCollection.ValueCollection() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ValueComparer.get -> System.Collections.Generic.IEqualityComparer TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Values.get -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ValueCollection TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.WithComparers(System.Collections.Generic.IComparer keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary @@ -122,7 +115,6 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Count.get TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Enumerator TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Enumerator.Current.get -> T TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Enumerator.Dispose() -> void -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Enumerator.Enumerator() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Enumerator.Reset() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Except(System.Collections.Generic.IEnumerable other) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet @@ -169,7 +161,6 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.KeyCollection.CopyTo(TKey[] array, int arrayIndex) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.KeyCollection.Count.get -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.KeyCollection.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.KeyCollection.Enumerator -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.KeyCollection.KeyCollection() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.KeyCollection.Remove(TKey item) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.KeyComparer.get -> System.Collections.Generic.IEqualityComparer TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.Keys.get -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.KeyCollection @@ -185,7 +176,6 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.ValueCollection.CopyTo(TValue[] array, int arrayIndex) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.ValueCollection.Count.get -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.ValueCollection.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ValueCollection.Enumerator -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.ValueCollection.ValueCollection() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.ValueComparer.get -> System.Collections.Generic.IEqualityComparer TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.Values.get -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.ValueCollection TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.this[TKey key].get -> TValue @@ -198,7 +188,6 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Enumerator TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Enumerator.Current.get -> System.Collections.Generic.KeyValuePair TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Enumerator.Dispose() -> void -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Enumerator.Enumerator() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Enumerator.Reset() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Enumerator @@ -209,11 +198,9 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.KeyCollection.Enumerator TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.KeyCollection.Enumerator.Current.get -> TKey TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.KeyCollection.Enumerator.Dispose() -> void -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.KeyCollection.Enumerator.Enumerator() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.KeyCollection.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.KeyCollection.Enumerator.Reset() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.KeyCollection.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.KeyCollection.Enumerator -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.KeyCollection.KeyCollection() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.KeyComparer.get -> System.Collections.Generic.IEqualityComparer TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Keys.get -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.KeyCollection TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Remove(TKey key) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary @@ -229,11 +216,9 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ValueCollection.Enumerator TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ValueCollection.Enumerator.Current.get -> TValue TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ValueCollection.Enumerator.Dispose() -> void -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ValueCollection.Enumerator.Enumerator() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ValueCollection.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ValueCollection.Enumerator.Reset() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ValueCollection.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ValueCollection.Enumerator -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ValueCollection.ValueCollection() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ValueComparer.get -> System.Collections.Generic.IEqualityComparer TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Values.get -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ValueCollection TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.WithComparers(System.Collections.Generic.IEqualityComparer keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary @@ -305,7 +290,6 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Count.get -> i TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Enumerator TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Enumerator.Current.get -> T TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Enumerator.Dispose() -> void -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Enumerator.Enumerator() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Enumerator.Reset() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Exists(System.Predicate match) -> bool @@ -354,7 +338,6 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Dequeue(out T TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Enqueue(T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Enumerator TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Enumerator.Current.get -> T -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Enumerator.Enumerator() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Enumerator TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.IsEmpty.get -> bool @@ -387,7 +370,6 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Count.get -> in TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Enumerator TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Enumerator.Current.get -> T TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Enumerator.Dispose() -> void -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Enumerator.Enumerator() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Enumerator.Reset() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Except(System.Collections.Generic.IEnumerable other) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet @@ -412,7 +394,6 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Clear() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Enumerator TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Enumerator.Current.get -> T -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Enumerator.Enumerator() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Enumerator TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.IsEmpty.get -> bool @@ -430,7 +411,6 @@ TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.Count.get TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.Enumerator TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.Enumerator.Current.get -> System.Collections.Generic.KeyValuePair TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.Enumerator.Dispose() -> void -TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.Enumerator.Enumerator() -> void TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.Enumerator TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.IndexOfKey(TKey key) -> int @@ -443,10 +423,8 @@ TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.KeyCollect TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.KeyCollection.Enumerator TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.KeyCollection.Enumerator.Current.get -> TKey TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.KeyCollection.Enumerator.Dispose() -> void -TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.KeyCollection.Enumerator.Enumerator() -> void TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.KeyCollection.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.KeyCollection.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.KeyCollection.Enumerator -TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.KeyCollection.KeyCollection() -> void TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.KeyCollection.Remove(TKey item) -> bool TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.Keys.get -> TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.KeyCollection TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.Remove(TKey key) -> bool @@ -467,10 +445,8 @@ TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.ValueColle TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.ValueCollection.Enumerator TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.ValueCollection.Enumerator.Current.get -> TValue TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.ValueCollection.Enumerator.Dispose() -> void -TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.ValueCollection.Enumerator.Enumerator() -> void TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.ValueCollection.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.ValueCollection.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.ValueCollection.Enumerator -TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.ValueCollection.ValueCollection() -> void TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.Values.get -> TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.ValueCollection TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.this[TKey key].get -> TValue TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.this[TKey key].set -> void @@ -489,7 +465,6 @@ TunnelVisionLabs.Collections.Trees.SortedTreeList.Count.get -> int TunnelVisionLabs.Collections.Trees.SortedTreeList.Enumerator TunnelVisionLabs.Collections.Trees.SortedTreeList.Enumerator.Current.get -> T TunnelVisionLabs.Collections.Trees.SortedTreeList.Enumerator.Dispose() -> void -TunnelVisionLabs.Collections.Trees.SortedTreeList.Enumerator.Enumerator() -> void TunnelVisionLabs.Collections.Trees.SortedTreeList.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.SortedTreeList.Exists(System.Predicate match) -> bool TunnelVisionLabs.Collections.Trees.SortedTreeList.Find(System.Predicate match) -> T @@ -537,7 +512,6 @@ TunnelVisionLabs.Collections.Trees.SortedTreeSet.Count.get -> int TunnelVisionLabs.Collections.Trees.SortedTreeSet.Enumerator TunnelVisionLabs.Collections.Trees.SortedTreeSet.Enumerator.Current.get -> T TunnelVisionLabs.Collections.Trees.SortedTreeSet.Enumerator.Dispose() -> void -TunnelVisionLabs.Collections.Trees.SortedTreeSet.Enumerator.Enumerator() -> void TunnelVisionLabs.Collections.Trees.SortedTreeSet.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.SortedTreeSet.ExceptWith(System.Collections.Generic.IEnumerable other) -> void TunnelVisionLabs.Collections.Trees.SortedTreeSet.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.SortedTreeSet.Enumerator @@ -573,7 +547,6 @@ TunnelVisionLabs.Collections.Trees.TreeDictionary.Count.get -> int TunnelVisionLabs.Collections.Trees.TreeDictionary.Enumerator TunnelVisionLabs.Collections.Trees.TreeDictionary.Enumerator.Current.get -> System.Collections.Generic.KeyValuePair TunnelVisionLabs.Collections.Trees.TreeDictionary.Enumerator.Dispose() -> void -TunnelVisionLabs.Collections.Trees.TreeDictionary.Enumerator.Enumerator() -> void TunnelVisionLabs.Collections.Trees.TreeDictionary.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.TreeDictionary.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.TreeDictionary.Enumerator TunnelVisionLabs.Collections.Trees.TreeDictionary.KeyCollection @@ -584,10 +557,8 @@ TunnelVisionLabs.Collections.Trees.TreeDictionary.KeyCollection.Co TunnelVisionLabs.Collections.Trees.TreeDictionary.KeyCollection.Enumerator TunnelVisionLabs.Collections.Trees.TreeDictionary.KeyCollection.Enumerator.Current.get -> TKey TunnelVisionLabs.Collections.Trees.TreeDictionary.KeyCollection.Enumerator.Dispose() -> void -TunnelVisionLabs.Collections.Trees.TreeDictionary.KeyCollection.Enumerator.Enumerator() -> void TunnelVisionLabs.Collections.Trees.TreeDictionary.KeyCollection.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.TreeDictionary.KeyCollection.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.TreeDictionary.KeyCollection.Enumerator -TunnelVisionLabs.Collections.Trees.TreeDictionary.KeyCollection.KeyCollection() -> void TunnelVisionLabs.Collections.Trees.TreeDictionary.KeyCollection.Remove(TKey item) -> bool TunnelVisionLabs.Collections.Trees.TreeDictionary.Keys.get -> TunnelVisionLabs.Collections.Trees.TreeDictionary.KeyCollection TunnelVisionLabs.Collections.Trees.TreeDictionary.Remove(TKey key) -> bool @@ -608,10 +579,8 @@ TunnelVisionLabs.Collections.Trees.TreeDictionary.ValueCollection. TunnelVisionLabs.Collections.Trees.TreeDictionary.ValueCollection.Enumerator TunnelVisionLabs.Collections.Trees.TreeDictionary.ValueCollection.Enumerator.Current.get -> TValue TunnelVisionLabs.Collections.Trees.TreeDictionary.ValueCollection.Enumerator.Dispose() -> void -TunnelVisionLabs.Collections.Trees.TreeDictionary.ValueCollection.Enumerator.Enumerator() -> void TunnelVisionLabs.Collections.Trees.TreeDictionary.ValueCollection.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.TreeDictionary.ValueCollection.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.TreeDictionary.ValueCollection.Enumerator -TunnelVisionLabs.Collections.Trees.TreeDictionary.ValueCollection.ValueCollection() -> void TunnelVisionLabs.Collections.Trees.TreeDictionary.Values.get -> TunnelVisionLabs.Collections.Trees.TreeDictionary.ValueCollection TunnelVisionLabs.Collections.Trees.TreeDictionary.this[TKey key].get -> TValue TunnelVisionLabs.Collections.Trees.TreeDictionary.this[TKey key].set -> void @@ -631,7 +600,6 @@ TunnelVisionLabs.Collections.Trees.TreeList.Count.get -> int TunnelVisionLabs.Collections.Trees.TreeList.Enumerator TunnelVisionLabs.Collections.Trees.TreeList.Enumerator.Current.get -> T TunnelVisionLabs.Collections.Trees.TreeList.Enumerator.Dispose() -> void -TunnelVisionLabs.Collections.Trees.TreeList.Enumerator.Enumerator() -> void TunnelVisionLabs.Collections.Trees.TreeList.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.TreeList.Exists(System.Predicate match) -> bool TunnelVisionLabs.Collections.Trees.TreeList.Find(System.Predicate match) -> T @@ -683,7 +651,6 @@ TunnelVisionLabs.Collections.Trees.TreeQueue.Enqueue(T item) -> void TunnelVisionLabs.Collections.Trees.TreeQueue.Enumerator TunnelVisionLabs.Collections.Trees.TreeQueue.Enumerator.Current.get -> T TunnelVisionLabs.Collections.Trees.TreeQueue.Enumerator.Dispose() -> void -TunnelVisionLabs.Collections.Trees.TreeQueue.Enumerator.Enumerator() -> void TunnelVisionLabs.Collections.Trees.TreeQueue.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.TreeQueue.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.TreeQueue.Enumerator TunnelVisionLabs.Collections.Trees.TreeQueue.Peek() -> T @@ -705,7 +672,6 @@ TunnelVisionLabs.Collections.Trees.TreeSet.Count.get -> int TunnelVisionLabs.Collections.Trees.TreeSet.Enumerator TunnelVisionLabs.Collections.Trees.TreeSet.Enumerator.Current.get -> T TunnelVisionLabs.Collections.Trees.TreeSet.Enumerator.Dispose() -> void -TunnelVisionLabs.Collections.Trees.TreeSet.Enumerator.Enumerator() -> void TunnelVisionLabs.Collections.Trees.TreeSet.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.TreeSet.ExceptWith(System.Collections.Generic.IEnumerable other) -> void TunnelVisionLabs.Collections.Trees.TreeSet.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.TreeSet.Enumerator @@ -737,7 +703,6 @@ TunnelVisionLabs.Collections.Trees.TreeStack.Count.get -> int TunnelVisionLabs.Collections.Trees.TreeStack.Enumerator TunnelVisionLabs.Collections.Trees.TreeStack.Enumerator.Current.get -> T TunnelVisionLabs.Collections.Trees.TreeStack.Enumerator.Dispose() -> void -TunnelVisionLabs.Collections.Trees.TreeStack.Enumerator.Enumerator() -> void TunnelVisionLabs.Collections.Trees.TreeStack.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.TreeStack.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.TreeStack.Enumerator TunnelVisionLabs.Collections.Trees.TreeStack.Peek() -> T From 9c627648b3e876bdbab842503521289b8b172bd6 Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Sat, 18 Jul 2020 22:00:26 -0700 Subject: [PATCH 04/23] Enable nullable reference types in Public API files --- .editorconfig | 3 + .../PublicAPI.Shipped.txt | 1 + .../PublicAPI.Unshipped.txt | 1 + .../PublicAPI.Shipped.txt | 1 + .../PublicAPI.Unshipped.txt | 737 +++++++++--------- 5 files changed, 375 insertions(+), 368 deletions(-) diff --git a/.editorconfig b/.editorconfig index c5fcd3d..8fbb96b 100644 --- a/.editorconfig +++ b/.editorconfig @@ -133,3 +133,6 @@ csharp_space_between_method_declaration_name_and_open_parenthesis = false csharp_space_between_method_declaration_parameter_list_parentheses = false csharp_space_between_parentheses = false csharp_space_between_square_brackets = false + +# RS0041: Public members should not use oblivious types +dotnet_diagnostic.RS0041.severity = none diff --git a/TunnelVisionLabs.Collections.Trees.Experimental/PublicAPI.Shipped.txt b/TunnelVisionLabs.Collections.Trees.Experimental/PublicAPI.Shipped.txt index e69de29..7dc5c58 100644 --- a/TunnelVisionLabs.Collections.Trees.Experimental/PublicAPI.Shipped.txt +++ b/TunnelVisionLabs.Collections.Trees.Experimental/PublicAPI.Shipped.txt @@ -0,0 +1 @@ +#nullable enable diff --git a/TunnelVisionLabs.Collections.Trees.Experimental/PublicAPI.Unshipped.txt b/TunnelVisionLabs.Collections.Trees.Experimental/PublicAPI.Unshipped.txt index e69de29..7dc5c58 100644 --- a/TunnelVisionLabs.Collections.Trees.Experimental/PublicAPI.Unshipped.txt +++ b/TunnelVisionLabs.Collections.Trees.Experimental/PublicAPI.Unshipped.txt @@ -0,0 +1 @@ +#nullable enable diff --git a/TunnelVisionLabs.Collections.Trees/PublicAPI.Shipped.txt b/TunnelVisionLabs.Collections.Trees/PublicAPI.Shipped.txt index e69de29..7dc5c58 100644 --- a/TunnelVisionLabs.Collections.Trees/PublicAPI.Shipped.txt +++ b/TunnelVisionLabs.Collections.Trees/PublicAPI.Shipped.txt @@ -0,0 +1 @@ +#nullable enable diff --git a/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt b/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt index 22720a0..8e2321c 100644 --- a/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt +++ b/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt @@ -1,11 +1,12 @@ +#nullable enable TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Add(TKey key, TValue value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.AddRange(System.Collections.Generic.IEnumerable> pairs) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Add(TKey key, TValue value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.AddRange(System.Collections.Generic.IEnumerable> pairs) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.Add(System.Collections.Generic.KeyValuePair item) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.Add(TKey key, TValue value) -> void -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.AddRange(System.Collections.Generic.IEnumerable> items) -> void +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.AddRange(System.Collections.Generic.IEnumerable> items) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.Clear() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.Contains(System.Collections.Generic.KeyValuePair item) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.ContainsKey(TKey key) -> bool @@ -17,29 +18,29 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.KeyCollection TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.KeyCollection.Clear() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.KeyCollection.Contains(TKey item) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.KeyCollection.CopyTo(TKey[] array, int arrayIndex) -> void +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.KeyCollection.CopyTo(TKey[] array, int arrayIndex) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.KeyCollection.Count.get -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.KeyCollection.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.KeyCollection.Enumerator TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.KeyCollection.Remove(TKey item) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.KeyComparer.get -> System.Collections.Generic.IComparer +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.KeyComparer.get -> System.Collections.Generic.IComparer TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.Keys.get -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.KeyCollection TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.Remove(System.Collections.Generic.KeyValuePair item) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.Remove(TKey key) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.RemoveRange(System.Collections.Generic.IEnumerable keys) -> void -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.ToImmutable() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.RemoveRange(System.Collections.Generic.IEnumerable keys) -> void +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.ToImmutable() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.TryGetKey(TKey equalKey, out TKey actualKey) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.TryGetValue(TKey key, out TValue value) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.ValueCollection TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.ValueCollection.Clear() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.ValueCollection.Contains(TValue item) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.ValueCollection.CopyTo(TValue[] array, int arrayIndex) -> void +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.ValueCollection.CopyTo(TValue[] array, int arrayIndex) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.ValueCollection.Count.get -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.ValueCollection.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ValueCollection.Enumerator -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.ValueComparer.get -> System.Collections.Generic.IEqualityComparer +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.ValueComparer.get -> System.Collections.Generic.IEqualityComparer TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.Values.get -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.ValueCollection TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.this[TKey key].get -> TValue TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.this[TKey key].set -> void -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Clear() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Clear() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Contains(System.Collections.Generic.KeyValuePair pair) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ContainsKey(TKey key) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ContainsValue(TValue value) -> bool @@ -60,13 +61,13 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.KeyCollection.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.KeyCollection.Enumerator.Reset() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.KeyCollection.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.KeyCollection.Enumerator -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.KeyComparer.get -> System.Collections.Generic.IComparer +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.KeyComparer.get -> System.Collections.Generic.IComparer TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Keys.get -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.KeyCollection -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Remove(TKey key) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.RemoveRange(System.Collections.Generic.IEnumerable keys) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.SetItem(TKey key, TValue value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.SetItems(System.Collections.Generic.IEnumerable> items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ToBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Remove(TKey key) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.RemoveRange(System.Collections.Generic.IEnumerable keys) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.SetItem(TKey key, TValue value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.SetItems(System.Collections.Generic.IEnumerable> items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ToBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.TryGetKey(TKey equalKey, out TKey actualKey) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.TryGetValue(TKey key, out TValue value) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ValueCollection @@ -78,38 +79,38 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ValueCollection.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ValueCollection.Enumerator.Reset() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ValueCollection.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ValueCollection.Enumerator -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ValueComparer.get -> System.Collections.Generic.IEqualityComparer +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ValueComparer.get -> System.Collections.Generic.IEqualityComparer TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Values.get -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ValueCollection -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.WithComparers(System.Collections.Generic.IComparer keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.WithComparers(System.Collections.Generic.IComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.WithComparers(System.Collections.Generic.IComparer keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.WithComparers(System.Collections.Generic.IComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.this[TKey key].get -> TValue TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Add(T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Add(T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.Add(T item) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.Clear() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.Contains(T item) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.Count.get -> int -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.ExceptWith(System.Collections.Generic.IEnumerable other) -> void +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.ExceptWith(System.Collections.Generic.IEnumerable other) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Enumerator -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.IntersectWith(System.Collections.Generic.IEnumerable other) -> void -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.IsProperSubsetOf(System.Collections.Generic.IEnumerable other) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.IsProperSupersetOf(System.Collections.Generic.IEnumerable other) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.IsSubsetOf(System.Collections.Generic.IEnumerable other) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.IsSupersetOf(System.Collections.Generic.IEnumerable other) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.KeyComparer.get -> System.Collections.Generic.IComparer +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.IntersectWith(System.Collections.Generic.IEnumerable other) -> void +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.IsProperSubsetOf(System.Collections.Generic.IEnumerable other) -> bool +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.IsProperSupersetOf(System.Collections.Generic.IEnumerable other) -> bool +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.IsSubsetOf(System.Collections.Generic.IEnumerable other) -> bool +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.IsSupersetOf(System.Collections.Generic.IEnumerable other) -> bool +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.KeyComparer.get -> System.Collections.Generic.IComparer TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.Max.get -> T TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.Min.get -> T -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.Overlaps(System.Collections.Generic.IEnumerable other) -> bool +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.Overlaps(System.Collections.Generic.IEnumerable other) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.Remove(T item) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.Reverse() -> System.Collections.Generic.IEnumerable -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.SetEquals(System.Collections.Generic.IEnumerable other) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.SymmetricExceptWith(System.Collections.Generic.IEnumerable other) -> void -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.ToImmutable() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.UnionWith(System.Collections.Generic.IEnumerable other) -> void +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.Reverse() -> System.Collections.Generic.IEnumerable +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.SetEquals(System.Collections.Generic.IEnumerable other) -> bool +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.SymmetricExceptWith(System.Collections.Generic.IEnumerable other) -> void +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.ToImmutable() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.UnionWith(System.Collections.Generic.IEnumerable other) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.this[int index].get -> T -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Clear() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Clear() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Contains(T value) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Count.get -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Enumerator @@ -117,36 +118,36 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Enumerato TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Enumerator.Dispose() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Enumerator.Reset() -> void -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Except(System.Collections.Generic.IEnumerable other) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Except(System.Collections.Generic.IEnumerable other) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Enumerator TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.IndexOf(T item) -> int -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Intersect(System.Collections.Generic.IEnumerable other) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Intersect(System.Collections.Generic.IEnumerable other) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.IsEmpty.get -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.IsProperSubsetOf(System.Collections.Generic.IEnumerable other) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.IsProperSupersetOf(System.Collections.Generic.IEnumerable other) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.IsSubsetOf(System.Collections.Generic.IEnumerable other) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.IsSupersetOf(System.Collections.Generic.IEnumerable other) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.KeyComparer.get -> System.Collections.Generic.IComparer +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.IsProperSubsetOf(System.Collections.Generic.IEnumerable other) -> bool +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.IsProperSupersetOf(System.Collections.Generic.IEnumerable other) -> bool +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.IsSubsetOf(System.Collections.Generic.IEnumerable other) -> bool +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.IsSupersetOf(System.Collections.Generic.IEnumerable other) -> bool +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.KeyComparer.get -> System.Collections.Generic.IComparer TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Max.get -> T TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Min.get -> T -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Overlaps(System.Collections.Generic.IEnumerable other) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Remove(T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Reverse() -> System.Collections.Generic.IEnumerable -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.SetEquals(System.Collections.Generic.IEnumerable other) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.SymmetricExcept(System.Collections.Generic.IEnumerable other) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.ToBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Overlaps(System.Collections.Generic.IEnumerable other) -> bool +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Remove(T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Reverse() -> System.Collections.Generic.IEnumerable +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.SetEquals(System.Collections.Generic.IEnumerable other) -> bool +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.SymmetricExcept(System.Collections.Generic.IEnumerable other) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.ToBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.TryGetValue(T equalValue, out T actualValue) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Union(System.Collections.Generic.IEnumerable other) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.WithComparer(System.Collections.Generic.IComparer comparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Union(System.Collections.Generic.IEnumerable other) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.WithComparer(System.Collections.Generic.IComparer comparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.this[int index].get -> T TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Add(TKey key, TValue value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.AddRange(System.Collections.Generic.IEnumerable> pairs) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Add(TKey key, TValue value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.AddRange(System.Collections.Generic.IEnumerable> pairs) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.Add(System.Collections.Generic.KeyValuePair item) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.Add(TKey key, TValue value) -> void -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.AddRange(System.Collections.Generic.IEnumerable> items) -> void +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.AddRange(System.Collections.Generic.IEnumerable> items) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.Clear() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.Contains(System.Collections.Generic.KeyValuePair item) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.ContainsKey(TKey key) -> bool @@ -158,29 +159,29 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.KeyCollection TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.KeyCollection.Clear() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.KeyCollection.Contains(TKey item) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.KeyCollection.CopyTo(TKey[] array, int arrayIndex) -> void +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.KeyCollection.CopyTo(TKey[] array, int arrayIndex) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.KeyCollection.Count.get -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.KeyCollection.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.KeyCollection.Enumerator TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.KeyCollection.Remove(TKey item) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.KeyComparer.get -> System.Collections.Generic.IEqualityComparer +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.KeyComparer.get -> System.Collections.Generic.IEqualityComparer TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.Keys.get -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.KeyCollection TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.Remove(System.Collections.Generic.KeyValuePair item) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.Remove(TKey key) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.RemoveRange(System.Collections.Generic.IEnumerable keys) -> void -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.ToImmutable() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.RemoveRange(System.Collections.Generic.IEnumerable keys) -> void +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.ToImmutable() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.TryGetKey(TKey equalKey, out TKey actualKey) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.TryGetValue(TKey key, out TValue value) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.ValueCollection TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.ValueCollection.Clear() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.ValueCollection.Contains(TValue item) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.ValueCollection.CopyTo(TValue[] array, int arrayIndex) -> void +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.ValueCollection.CopyTo(TValue[] array, int arrayIndex) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.ValueCollection.Count.get -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.ValueCollection.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ValueCollection.Enumerator -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.ValueComparer.get -> System.Collections.Generic.IEqualityComparer +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.ValueComparer.get -> System.Collections.Generic.IEqualityComparer TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.Values.get -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.ValueCollection TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.this[TKey key].get -> TValue TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.this[TKey key].set -> void -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Clear() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Clear() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Contains(System.Collections.Generic.KeyValuePair pair) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ContainsKey(TKey key) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ContainsValue(TValue value) -> bool @@ -201,13 +202,13 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.KeyCollection.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.KeyCollection.Enumerator.Reset() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.KeyCollection.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.KeyCollection.Enumerator -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.KeyComparer.get -> System.Collections.Generic.IEqualityComparer +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.KeyComparer.get -> System.Collections.Generic.IEqualityComparer TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Keys.get -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.KeyCollection -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Remove(TKey key) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.RemoveRange(System.Collections.Generic.IEnumerable keys) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.SetItem(TKey key, TValue value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.SetItems(System.Collections.Generic.IEnumerable> items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Remove(TKey key) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.RemoveRange(System.Collections.Generic.IEnumerable keys) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.SetItem(TKey key, TValue value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.SetItems(System.Collections.Generic.IEnumerable> items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.TryGetKey(TKey equalKey, out TKey actualKey) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.TryGetValue(TKey key, out TValue value) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ValueCollection @@ -219,123 +220,123 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ValueCollection.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ValueCollection.Enumerator.Reset() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ValueCollection.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ValueCollection.Enumerator -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ValueComparer.get -> System.Collections.Generic.IEqualityComparer +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ValueComparer.get -> System.Collections.Generic.IEqualityComparer TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Values.get -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ValueCollection -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.WithComparers(System.Collections.Generic.IEqualityComparer keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.WithComparers(System.Collections.Generic.IEqualityComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.WithComparers(System.Collections.Generic.IEqualityComparer keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.WithComparers(System.Collections.Generic.IEqualityComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.this[TKey key].get -> TValue TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Add(T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.AddRange(System.Collections.Generic.IEnumerable items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Add(T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.AddRange(System.Collections.Generic.IEnumerable items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.BinarySearch(T item) -> int -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.BinarySearch(T item, System.Collections.Generic.IComparer comparer) -> int -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.BinarySearch(int index, int count, T item, System.Collections.Generic.IComparer comparer) -> int +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.BinarySearch(T item, System.Collections.Generic.IComparer comparer) -> int +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.BinarySearch(int index, int count, T item, System.Collections.Generic.IComparer comparer) -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Add(T item) -> void -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.AddRange(System.Collections.Generic.IEnumerable items) -> void +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.AddRange(System.Collections.Generic.IEnumerable items) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.BinarySearch(T item) -> int -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.BinarySearch(T item, System.Collections.Generic.IComparer comparer) -> int -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.BinarySearch(int index, int count, T item, System.Collections.Generic.IComparer comparer) -> int +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.BinarySearch(T item, System.Collections.Generic.IComparer comparer) -> int +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.BinarySearch(int index, int count, T item, System.Collections.Generic.IComparer comparer) -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Clear() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Contains(T item) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.ConvertAll(System.Func converter) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.CopyTo(T[] array) -> void -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.CopyTo(T[] array, int arrayIndex) -> void -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.CopyTo(int index, T[] array, int arrayIndex, int count) -> void +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.ConvertAll(System.Func converter) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.CopyTo(T[] array) -> void +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.CopyTo(T[] array, int arrayIndex) -> void +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.CopyTo(int index, T[] array, int arrayIndex, int count) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Count.get -> int -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Exists(System.Predicate match) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Find(System.Predicate match) -> T -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.FindAll(System.Predicate match) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.FindIndex(System.Predicate match) -> int -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.FindIndex(int startIndex, System.Predicate match) -> int -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.FindIndex(int startIndex, int count, System.Predicate match) -> int -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.FindLast(System.Predicate match) -> T -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.FindLastIndex(System.Predicate match) -> int -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.FindLastIndex(int startIndex, System.Predicate match) -> int -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.FindLastIndex(int startIndex, int count, System.Predicate match) -> int -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.ForEach(System.Action action) -> void +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Exists(System.Predicate match) -> bool +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Find(System.Predicate match) -> T +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.FindAll(System.Predicate match) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.FindIndex(System.Predicate match) -> int +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.FindIndex(int startIndex, System.Predicate match) -> int +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.FindIndex(int startIndex, int count, System.Predicate match) -> int +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.FindLast(System.Predicate match) -> T +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.FindLastIndex(System.Predicate match) -> int +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.FindLastIndex(int startIndex, System.Predicate match) -> int +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.FindLastIndex(int startIndex, int count, System.Predicate match) -> int +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.ForEach(System.Action action) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Enumerator -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.GetRange(int index, int count) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.GetRange(int index, int count) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.IndexOf(T item) -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.IndexOf(T item, int index) -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.IndexOf(T item, int index, int count) -> int -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.IndexOf(T item, int index, int count, System.Collections.Generic.IEqualityComparer equalityComparer) -> int +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.IndexOf(T item, int index, int count, System.Collections.Generic.IEqualityComparer equalityComparer) -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Insert(int index, T item) -> void -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.InsertRange(int index, System.Collections.Generic.IEnumerable items) -> void +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.InsertRange(int index, System.Collections.Generic.IEnumerable items) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.LastIndexOf(T item) -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.LastIndexOf(T item, int startIndex) -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.LastIndexOf(T item, int startIndex, int count) -> int -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.LastIndexOf(T item, int startIndex, int count, System.Collections.Generic.IEqualityComparer equalityComparer) -> int +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.LastIndexOf(T item, int startIndex, int count, System.Collections.Generic.IEqualityComparer equalityComparer) -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Remove(T item) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.RemoveAll(System.Predicate match) -> int +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.RemoveAll(System.Predicate match) -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.RemoveAt(int index) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Reverse() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Reverse(int index, int count) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Sort() -> void -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Sort(System.Collections.Generic.IComparer comparer) -> void -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Sort(System.Comparison comparison) -> void -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Sort(int index, int count, System.Collections.Generic.IComparer comparer) -> void -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.ToImmutable() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.TrueForAll(System.Predicate match) -> bool +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Sort(System.Collections.Generic.IComparer comparer) -> void +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Sort(System.Comparison comparison) -> void +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Sort(int index, int count, System.Collections.Generic.IComparer comparer) -> void +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.ToImmutable() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.TrueForAll(System.Predicate match) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.this[int index].get -> T TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.this[int index].set -> void -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Clear() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Clear() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Contains(T value) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.ConvertAll(System.Func converter) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.CopyTo(T[] array) -> void -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.CopyTo(T[] array, int arrayIndex) -> void -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.CopyTo(int index, T[] array, int arrayIndex, int count) -> void +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.ConvertAll(System.Func converter) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.CopyTo(T[] array) -> void +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.CopyTo(T[] array, int arrayIndex) -> void +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.CopyTo(int index, T[] array, int arrayIndex, int count) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Count.get -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Enumerator TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Enumerator.Current.get -> T TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Enumerator.Dispose() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Enumerator.Reset() -> void -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Exists(System.Predicate match) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Find(System.Predicate match) -> T -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.FindAll(System.Predicate match) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.FindIndex(System.Predicate match) -> int -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.FindIndex(int startIndex, System.Predicate match) -> int -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.FindIndex(int startIndex, int count, System.Predicate match) -> int -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.FindLast(System.Predicate match) -> T -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.FindLastIndex(System.Predicate match) -> int -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.FindLastIndex(int startIndex, System.Predicate match) -> int -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.FindLastIndex(int startIndex, int count, System.Predicate match) -> int -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.ForEach(System.Action action) -> void +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Exists(System.Predicate match) -> bool +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Find(System.Predicate match) -> T +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.FindAll(System.Predicate match) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.FindIndex(System.Predicate match) -> int +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.FindIndex(int startIndex, System.Predicate match) -> int +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.FindIndex(int startIndex, int count, System.Predicate match) -> int +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.FindLast(System.Predicate match) -> T +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.FindLastIndex(System.Predicate match) -> int +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.FindLastIndex(int startIndex, System.Predicate match) -> int +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.FindLastIndex(int startIndex, int count, System.Predicate match) -> int +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.ForEach(System.Action action) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Enumerator -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.GetRange(int index, int count) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.IndexOf(T item, int index, int count, System.Collections.Generic.IEqualityComparer equalityComparer) -> int +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.GetRange(int index, int count) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.IndexOf(T item, int index, int count, System.Collections.Generic.IEqualityComparer equalityComparer) -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.IndexOf(T value) -> int -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Insert(int index, T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.InsertRange(int index, System.Collections.Generic.IEnumerable items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Insert(int index, T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.InsertRange(int index, System.Collections.Generic.IEnumerable items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.IsEmpty.get -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.LastIndexOf(T item, int index, int count, System.Collections.Generic.IEqualityComparer equalityComparer) -> int -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Remove(T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Remove(T value, System.Collections.Generic.IEqualityComparer equalityComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.RemoveAll(System.Predicate match) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.RemoveAt(int index) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.RemoveRange(System.Collections.Generic.IEnumerable items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.RemoveRange(System.Collections.Generic.IEnumerable items, System.Collections.Generic.IEqualityComparer equalityComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.RemoveRange(int index, int count) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Replace(T oldValue, T newValue) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Replace(T oldValue, T newValue, System.Collections.Generic.IEqualityComparer equalityComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Reverse() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Reverse(int index, int count) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.SetItem(int index, T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Sort() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Sort(System.Collections.Generic.IComparer comparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Sort(System.Comparison comparison) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Sort(int index, int count, System.Collections.Generic.IComparer comparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.ToBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.TrueForAll(System.Predicate match) -> bool +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.LastIndexOf(T item, int index, int count, System.Collections.Generic.IEqualityComparer equalityComparer) -> int +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Remove(T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Remove(T value, System.Collections.Generic.IEqualityComparer equalityComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.RemoveAll(System.Predicate match) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.RemoveAt(int index) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.RemoveRange(System.Collections.Generic.IEnumerable items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.RemoveRange(System.Collections.Generic.IEnumerable items, System.Collections.Generic.IEqualityComparer equalityComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.RemoveRange(int index, int count) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Replace(T oldValue, T newValue) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Replace(T oldValue, T newValue, System.Collections.Generic.IEqualityComparer equalityComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Reverse() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Reverse(int index, int count) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.SetItem(int index, T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Sort() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Sort(System.Collections.Generic.IComparer comparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Sort(System.Comparison comparison) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Sort(int index, int count, System.Collections.Generic.IComparer comparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.ToBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.TrueForAll(System.Predicate match) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.this[int index].get -> T TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Clear() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Dequeue() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Dequeue(out T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Enqueue(T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Clear() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Dequeue() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Dequeue(out T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Enqueue(T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Enumerator TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Enumerator.Current.get -> T TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Enumerator.MoveNext() -> bool @@ -344,27 +345,27 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.IsEmpty.get - TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Peek() -> T TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Add(T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Add(T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.Add(T item) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.Clear() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.Contains(T item) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.Count.get -> int -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.ExceptWith(System.Collections.Generic.IEnumerable other) -> void +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.ExceptWith(System.Collections.Generic.IEnumerable other) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Enumerator -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.IntersectWith(System.Collections.Generic.IEnumerable other) -> void -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.IsProperSubsetOf(System.Collections.Generic.IEnumerable other) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.IsProperSupersetOf(System.Collections.Generic.IEnumerable other) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.IsSubsetOf(System.Collections.Generic.IEnumerable other) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.IsSupersetOf(System.Collections.Generic.IEnumerable other) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.KeyComparer.get -> System.Collections.Generic.IEqualityComparer -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.Overlaps(System.Collections.Generic.IEnumerable other) -> bool +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.IntersectWith(System.Collections.Generic.IEnumerable other) -> void +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.IsProperSubsetOf(System.Collections.Generic.IEnumerable other) -> bool +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.IsProperSupersetOf(System.Collections.Generic.IEnumerable other) -> bool +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.IsSubsetOf(System.Collections.Generic.IEnumerable other) -> bool +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.IsSupersetOf(System.Collections.Generic.IEnumerable other) -> bool +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.KeyComparer.get -> System.Collections.Generic.IEqualityComparer +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.Overlaps(System.Collections.Generic.IEnumerable other) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.Remove(T item) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.SetEquals(System.Collections.Generic.IEnumerable other) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.SymmetricExceptWith(System.Collections.Generic.IEnumerable other) -> void -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.ToImmutable() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.UnionWith(System.Collections.Generic.IEnumerable other) -> void -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Clear() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.SetEquals(System.Collections.Generic.IEnumerable other) -> bool +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.SymmetricExceptWith(System.Collections.Generic.IEnumerable other) -> void +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.ToImmutable() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.UnionWith(System.Collections.Generic.IEnumerable other) -> void +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Clear() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Contains(T value) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Count.get -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Enumerator @@ -372,39 +373,39 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Enumerator.Curr TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Enumerator.Dispose() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Enumerator.Reset() -> void -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Except(System.Collections.Generic.IEnumerable other) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Except(System.Collections.Generic.IEnumerable other) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Enumerator -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Intersect(System.Collections.Generic.IEnumerable other) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Intersect(System.Collections.Generic.IEnumerable other) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.IsEmpty.get -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.IsProperSubsetOf(System.Collections.Generic.IEnumerable other) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.IsProperSupersetOf(System.Collections.Generic.IEnumerable other) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.IsSubsetOf(System.Collections.Generic.IEnumerable other) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.IsSupersetOf(System.Collections.Generic.IEnumerable other) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.KeyComparer.get -> System.Collections.Generic.IEqualityComparer -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Overlaps(System.Collections.Generic.IEnumerable other) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Remove(T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.SetEquals(System.Collections.Generic.IEnumerable other) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.SymmetricExcept(System.Collections.Generic.IEnumerable other) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.ToBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.IsProperSubsetOf(System.Collections.Generic.IEnumerable other) -> bool +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.IsProperSupersetOf(System.Collections.Generic.IEnumerable other) -> bool +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.IsSubsetOf(System.Collections.Generic.IEnumerable other) -> bool +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.IsSupersetOf(System.Collections.Generic.IEnumerable other) -> bool +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.KeyComparer.get -> System.Collections.Generic.IEqualityComparer +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Overlaps(System.Collections.Generic.IEnumerable other) -> bool +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Remove(T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.SetEquals(System.Collections.Generic.IEnumerable other) -> bool +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.SymmetricExcept(System.Collections.Generic.IEnumerable other) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.ToBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.TryGetValue(T equalValue, out T actualValue) -> bool -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Union(System.Collections.Generic.IEnumerable other) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.WithComparer(System.Collections.Generic.IEqualityComparer equalityComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Union(System.Collections.Generic.IEnumerable other) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.WithComparer(System.Collections.Generic.IEqualityComparer equalityComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Clear() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Clear() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Enumerator TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Enumerator.Current.get -> T TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Enumerator TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.IsEmpty.get -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Peek() -> T -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Pop() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Pop(out T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack -TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Push(T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Pop() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Pop(out T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack +~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Push(T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack TunnelVisionLabs.Collections.Trees.SortedTreeDictionary TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.Add(TKey key, TValue value) -> void TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.Clear() -> void -TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.Comparer.get -> System.Collections.Generic.IComparer +~TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.Comparer.get -> System.Collections.Generic.IComparer TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.ContainsKey(TKey key) -> bool TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.ContainsValue(TValue value) -> bool TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.Count.get -> int @@ -418,7 +419,7 @@ TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.IndexOfVal TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.KeyCollection TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.KeyCollection.Clear() -> void TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.KeyCollection.Contains(TKey item) -> bool -TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.KeyCollection.CopyTo(TKey[] array, int arrayIndex) -> void +~TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.KeyCollection.CopyTo(TKey[] array, int arrayIndex) -> void TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.KeyCollection.Count.get -> int TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.KeyCollection.Enumerator TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.KeyCollection.Enumerator.Current.get -> TKey @@ -429,18 +430,18 @@ TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.KeyCollect TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.Keys.get -> TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.KeyCollection TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.Remove(TKey key) -> bool TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.SortedTreeDictionary() -> void -TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.SortedTreeDictionary(System.Collections.Generic.IComparer comparer) -> void -TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.SortedTreeDictionary(System.Collections.Generic.IEnumerable> collection) -> void -TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.SortedTreeDictionary(System.Collections.Generic.IEnumerable> collection, System.Collections.Generic.IComparer comparer) -> void +~TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.SortedTreeDictionary(System.Collections.Generic.IComparer comparer) -> void +~TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.SortedTreeDictionary(System.Collections.Generic.IEnumerable> collection) -> void +~TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.SortedTreeDictionary(System.Collections.Generic.IEnumerable> collection, System.Collections.Generic.IComparer comparer) -> void TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.SortedTreeDictionary(int branchingFactor) -> void -TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.SortedTreeDictionary(int branchingFactor, System.Collections.Generic.IComparer comparer) -> void -TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.SortedTreeDictionary(int branchingFactor, System.Collections.Generic.IEnumerable> collection, System.Collections.Generic.IComparer comparer) -> void +~TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.SortedTreeDictionary(int branchingFactor, System.Collections.Generic.IComparer comparer) -> void +~TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.SortedTreeDictionary(int branchingFactor, System.Collections.Generic.IEnumerable> collection, System.Collections.Generic.IComparer comparer) -> void TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.TryAdd(TKey key, TValue value) -> bool TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.TryGetValue(TKey key, out TValue value) -> bool TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.ValueCollection TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.ValueCollection.Clear() -> void TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.ValueCollection.Contains(TValue item) -> bool -TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.ValueCollection.CopyTo(TValue[] array, int arrayIndex) -> void +~TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.ValueCollection.CopyTo(TValue[] array, int arrayIndex) -> void TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.ValueCollection.Count.get -> int TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.ValueCollection.Enumerator TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.ValueCollection.Enumerator.Current.get -> TValue @@ -452,33 +453,33 @@ TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.this[TKey TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.this[TKey key].set -> void TunnelVisionLabs.Collections.Trees.SortedTreeList TunnelVisionLabs.Collections.Trees.SortedTreeList.Add(T item) -> void -TunnelVisionLabs.Collections.Trees.SortedTreeList.AddRange(System.Collections.Generic.IEnumerable collection) -> void +~TunnelVisionLabs.Collections.Trees.SortedTreeList.AddRange(System.Collections.Generic.IEnumerable collection) -> void TunnelVisionLabs.Collections.Trees.SortedTreeList.BinarySearch(T item) -> int TunnelVisionLabs.Collections.Trees.SortedTreeList.BinarySearch(int index, int count, T item) -> int TunnelVisionLabs.Collections.Trees.SortedTreeList.Clear() -> void -TunnelVisionLabs.Collections.Trees.SortedTreeList.Comparer.get -> System.Collections.Generic.IComparer +~TunnelVisionLabs.Collections.Trees.SortedTreeList.Comparer.get -> System.Collections.Generic.IComparer TunnelVisionLabs.Collections.Trees.SortedTreeList.Contains(T item) -> bool -TunnelVisionLabs.Collections.Trees.SortedTreeList.CopyTo(T[] array) -> void -TunnelVisionLabs.Collections.Trees.SortedTreeList.CopyTo(T[] array, int arrayIndex) -> void -TunnelVisionLabs.Collections.Trees.SortedTreeList.CopyTo(int index, T[] array, int arrayIndex, int count) -> void +~TunnelVisionLabs.Collections.Trees.SortedTreeList.CopyTo(T[] array) -> void +~TunnelVisionLabs.Collections.Trees.SortedTreeList.CopyTo(T[] array, int arrayIndex) -> void +~TunnelVisionLabs.Collections.Trees.SortedTreeList.CopyTo(int index, T[] array, int arrayIndex, int count) -> void TunnelVisionLabs.Collections.Trees.SortedTreeList.Count.get -> int TunnelVisionLabs.Collections.Trees.SortedTreeList.Enumerator TunnelVisionLabs.Collections.Trees.SortedTreeList.Enumerator.Current.get -> T TunnelVisionLabs.Collections.Trees.SortedTreeList.Enumerator.Dispose() -> void TunnelVisionLabs.Collections.Trees.SortedTreeList.Enumerator.MoveNext() -> bool -TunnelVisionLabs.Collections.Trees.SortedTreeList.Exists(System.Predicate match) -> bool -TunnelVisionLabs.Collections.Trees.SortedTreeList.Find(System.Predicate match) -> T -TunnelVisionLabs.Collections.Trees.SortedTreeList.FindAll(System.Predicate match) -> TunnelVisionLabs.Collections.Trees.SortedTreeList -TunnelVisionLabs.Collections.Trees.SortedTreeList.FindIndex(System.Predicate match) -> int -TunnelVisionLabs.Collections.Trees.SortedTreeList.FindIndex(int startIndex, System.Predicate match) -> int -TunnelVisionLabs.Collections.Trees.SortedTreeList.FindIndex(int startIndex, int count, System.Predicate match) -> int -TunnelVisionLabs.Collections.Trees.SortedTreeList.FindLast(System.Predicate match) -> T -TunnelVisionLabs.Collections.Trees.SortedTreeList.FindLastIndex(System.Predicate match) -> int -TunnelVisionLabs.Collections.Trees.SortedTreeList.FindLastIndex(int startIndex, System.Predicate match) -> int -TunnelVisionLabs.Collections.Trees.SortedTreeList.FindLastIndex(int startIndex, int count, System.Predicate match) -> int -TunnelVisionLabs.Collections.Trees.SortedTreeList.ForEach(System.Action action) -> void +~TunnelVisionLabs.Collections.Trees.SortedTreeList.Exists(System.Predicate match) -> bool +~TunnelVisionLabs.Collections.Trees.SortedTreeList.Find(System.Predicate match) -> T +~TunnelVisionLabs.Collections.Trees.SortedTreeList.FindAll(System.Predicate match) -> TunnelVisionLabs.Collections.Trees.SortedTreeList +~TunnelVisionLabs.Collections.Trees.SortedTreeList.FindIndex(System.Predicate match) -> int +~TunnelVisionLabs.Collections.Trees.SortedTreeList.FindIndex(int startIndex, System.Predicate match) -> int +~TunnelVisionLabs.Collections.Trees.SortedTreeList.FindIndex(int startIndex, int count, System.Predicate match) -> int +~TunnelVisionLabs.Collections.Trees.SortedTreeList.FindLast(System.Predicate match) -> T +~TunnelVisionLabs.Collections.Trees.SortedTreeList.FindLastIndex(System.Predicate match) -> int +~TunnelVisionLabs.Collections.Trees.SortedTreeList.FindLastIndex(int startIndex, System.Predicate match) -> int +~TunnelVisionLabs.Collections.Trees.SortedTreeList.FindLastIndex(int startIndex, int count, System.Predicate match) -> int +~TunnelVisionLabs.Collections.Trees.SortedTreeList.ForEach(System.Action action) -> void TunnelVisionLabs.Collections.Trees.SortedTreeList.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.SortedTreeList.Enumerator -TunnelVisionLabs.Collections.Trees.SortedTreeList.GetRange(int index, int count) -> TunnelVisionLabs.Collections.Trees.SortedTreeList +~TunnelVisionLabs.Collections.Trees.SortedTreeList.GetRange(int index, int count) -> TunnelVisionLabs.Collections.Trees.SortedTreeList TunnelVisionLabs.Collections.Trees.SortedTreeList.IndexOf(T item) -> int TunnelVisionLabs.Collections.Trees.SortedTreeList.IndexOf(T item, int index) -> int TunnelVisionLabs.Collections.Trees.SortedTreeList.IndexOf(T item, int index, int count) -> int @@ -486,61 +487,61 @@ TunnelVisionLabs.Collections.Trees.SortedTreeList.LastIndexOf(T item) -> int TunnelVisionLabs.Collections.Trees.SortedTreeList.LastIndexOf(T item, int index) -> int TunnelVisionLabs.Collections.Trees.SortedTreeList.LastIndexOf(T item, int index, int count) -> int TunnelVisionLabs.Collections.Trees.SortedTreeList.Remove(T item) -> bool -TunnelVisionLabs.Collections.Trees.SortedTreeList.RemoveAll(System.Predicate match) -> int +~TunnelVisionLabs.Collections.Trees.SortedTreeList.RemoveAll(System.Predicate match) -> int TunnelVisionLabs.Collections.Trees.SortedTreeList.RemoveAt(int index) -> void TunnelVisionLabs.Collections.Trees.SortedTreeList.RemoveRange(int index, int count) -> void TunnelVisionLabs.Collections.Trees.SortedTreeList.SortedTreeList() -> void -TunnelVisionLabs.Collections.Trees.SortedTreeList.SortedTreeList(System.Collections.Generic.IComparer comparer) -> void -TunnelVisionLabs.Collections.Trees.SortedTreeList.SortedTreeList(System.Collections.Generic.IEnumerable collection) -> void -TunnelVisionLabs.Collections.Trees.SortedTreeList.SortedTreeList(System.Collections.Generic.IEnumerable collection, System.Collections.Generic.IComparer comparer) -> void +~TunnelVisionLabs.Collections.Trees.SortedTreeList.SortedTreeList(System.Collections.Generic.IComparer comparer) -> void +~TunnelVisionLabs.Collections.Trees.SortedTreeList.SortedTreeList(System.Collections.Generic.IEnumerable collection) -> void +~TunnelVisionLabs.Collections.Trees.SortedTreeList.SortedTreeList(System.Collections.Generic.IEnumerable collection, System.Collections.Generic.IComparer comparer) -> void TunnelVisionLabs.Collections.Trees.SortedTreeList.SortedTreeList(int branchingFactor) -> void -TunnelVisionLabs.Collections.Trees.SortedTreeList.SortedTreeList(int branchingFactor, System.Collections.Generic.IComparer comparer) -> void -TunnelVisionLabs.Collections.Trees.SortedTreeList.SortedTreeList(int branchingFactor, System.Collections.Generic.IEnumerable collection, System.Collections.Generic.IComparer comparer) -> void -TunnelVisionLabs.Collections.Trees.SortedTreeList.ToArray() -> T[] +~TunnelVisionLabs.Collections.Trees.SortedTreeList.SortedTreeList(int branchingFactor, System.Collections.Generic.IComparer comparer) -> void +~TunnelVisionLabs.Collections.Trees.SortedTreeList.SortedTreeList(int branchingFactor, System.Collections.Generic.IEnumerable collection, System.Collections.Generic.IComparer comparer) -> void +~TunnelVisionLabs.Collections.Trees.SortedTreeList.ToArray() -> T[] TunnelVisionLabs.Collections.Trees.SortedTreeList.TrimExcess() -> void -TunnelVisionLabs.Collections.Trees.SortedTreeList.TrueForAll(System.Predicate match) -> bool +~TunnelVisionLabs.Collections.Trees.SortedTreeList.TrueForAll(System.Predicate match) -> bool TunnelVisionLabs.Collections.Trees.SortedTreeList.this[int index].get -> T TunnelVisionLabs.Collections.Trees.SortedTreeSet TunnelVisionLabs.Collections.Trees.SortedTreeSet.Add(T item) -> bool TunnelVisionLabs.Collections.Trees.SortedTreeSet.Clear() -> void -TunnelVisionLabs.Collections.Trees.SortedTreeSet.Comparer.get -> System.Collections.Generic.IComparer +~TunnelVisionLabs.Collections.Trees.SortedTreeSet.Comparer.get -> System.Collections.Generic.IComparer TunnelVisionLabs.Collections.Trees.SortedTreeSet.Contains(T item) -> bool -TunnelVisionLabs.Collections.Trees.SortedTreeSet.CopyTo(T[] array) -> void -TunnelVisionLabs.Collections.Trees.SortedTreeSet.CopyTo(T[] array, int arrayIndex) -> void -TunnelVisionLabs.Collections.Trees.SortedTreeSet.CopyTo(T[] array, int arrayIndex, int count) -> void +~TunnelVisionLabs.Collections.Trees.SortedTreeSet.CopyTo(T[] array) -> void +~TunnelVisionLabs.Collections.Trees.SortedTreeSet.CopyTo(T[] array, int arrayIndex) -> void +~TunnelVisionLabs.Collections.Trees.SortedTreeSet.CopyTo(T[] array, int arrayIndex, int count) -> void TunnelVisionLabs.Collections.Trees.SortedTreeSet.Count.get -> int TunnelVisionLabs.Collections.Trees.SortedTreeSet.Enumerator TunnelVisionLabs.Collections.Trees.SortedTreeSet.Enumerator.Current.get -> T TunnelVisionLabs.Collections.Trees.SortedTreeSet.Enumerator.Dispose() -> void TunnelVisionLabs.Collections.Trees.SortedTreeSet.Enumerator.MoveNext() -> bool -TunnelVisionLabs.Collections.Trees.SortedTreeSet.ExceptWith(System.Collections.Generic.IEnumerable other) -> void +~TunnelVisionLabs.Collections.Trees.SortedTreeSet.ExceptWith(System.Collections.Generic.IEnumerable other) -> void TunnelVisionLabs.Collections.Trees.SortedTreeSet.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.SortedTreeSet.Enumerator -TunnelVisionLabs.Collections.Trees.SortedTreeSet.IntersectWith(System.Collections.Generic.IEnumerable other) -> void -TunnelVisionLabs.Collections.Trees.SortedTreeSet.IsProperSubsetOf(System.Collections.Generic.IEnumerable other) -> bool -TunnelVisionLabs.Collections.Trees.SortedTreeSet.IsProperSupersetOf(System.Collections.Generic.IEnumerable other) -> bool -TunnelVisionLabs.Collections.Trees.SortedTreeSet.IsSubsetOf(System.Collections.Generic.IEnumerable other) -> bool -TunnelVisionLabs.Collections.Trees.SortedTreeSet.IsSupersetOf(System.Collections.Generic.IEnumerable other) -> bool +~TunnelVisionLabs.Collections.Trees.SortedTreeSet.IntersectWith(System.Collections.Generic.IEnumerable other) -> void +~TunnelVisionLabs.Collections.Trees.SortedTreeSet.IsProperSubsetOf(System.Collections.Generic.IEnumerable other) -> bool +~TunnelVisionLabs.Collections.Trees.SortedTreeSet.IsProperSupersetOf(System.Collections.Generic.IEnumerable other) -> bool +~TunnelVisionLabs.Collections.Trees.SortedTreeSet.IsSubsetOf(System.Collections.Generic.IEnumerable other) -> bool +~TunnelVisionLabs.Collections.Trees.SortedTreeSet.IsSupersetOf(System.Collections.Generic.IEnumerable other) -> bool TunnelVisionLabs.Collections.Trees.SortedTreeSet.Max.get -> T TunnelVisionLabs.Collections.Trees.SortedTreeSet.Min.get -> T -TunnelVisionLabs.Collections.Trees.SortedTreeSet.Overlaps(System.Collections.Generic.IEnumerable other) -> bool +~TunnelVisionLabs.Collections.Trees.SortedTreeSet.Overlaps(System.Collections.Generic.IEnumerable other) -> bool TunnelVisionLabs.Collections.Trees.SortedTreeSet.Remove(T item) -> bool -TunnelVisionLabs.Collections.Trees.SortedTreeSet.RemoveWhere(System.Predicate match) -> int -TunnelVisionLabs.Collections.Trees.SortedTreeSet.SetEquals(System.Collections.Generic.IEnumerable other) -> bool +~TunnelVisionLabs.Collections.Trees.SortedTreeSet.RemoveWhere(System.Predicate match) -> int +~TunnelVisionLabs.Collections.Trees.SortedTreeSet.SetEquals(System.Collections.Generic.IEnumerable other) -> bool TunnelVisionLabs.Collections.Trees.SortedTreeSet.SortedTreeSet() -> void -TunnelVisionLabs.Collections.Trees.SortedTreeSet.SortedTreeSet(System.Collections.Generic.IComparer comparer) -> void -TunnelVisionLabs.Collections.Trees.SortedTreeSet.SortedTreeSet(System.Collections.Generic.IEnumerable collection) -> void -TunnelVisionLabs.Collections.Trees.SortedTreeSet.SortedTreeSet(System.Collections.Generic.IEnumerable collection, System.Collections.Generic.IComparer comparer) -> void +~TunnelVisionLabs.Collections.Trees.SortedTreeSet.SortedTreeSet(System.Collections.Generic.IComparer comparer) -> void +~TunnelVisionLabs.Collections.Trees.SortedTreeSet.SortedTreeSet(System.Collections.Generic.IEnumerable collection) -> void +~TunnelVisionLabs.Collections.Trees.SortedTreeSet.SortedTreeSet(System.Collections.Generic.IEnumerable collection, System.Collections.Generic.IComparer comparer) -> void TunnelVisionLabs.Collections.Trees.SortedTreeSet.SortedTreeSet(int branchingFactor) -> void -TunnelVisionLabs.Collections.Trees.SortedTreeSet.SortedTreeSet(int branchingFactor, System.Collections.Generic.IComparer comparer) -> void -TunnelVisionLabs.Collections.Trees.SortedTreeSet.SortedTreeSet(int branchingFactor, System.Collections.Generic.IEnumerable collection, System.Collections.Generic.IComparer comparer) -> void -TunnelVisionLabs.Collections.Trees.SortedTreeSet.SymmetricExceptWith(System.Collections.Generic.IEnumerable other) -> void +~TunnelVisionLabs.Collections.Trees.SortedTreeSet.SortedTreeSet(int branchingFactor, System.Collections.Generic.IComparer comparer) -> void +~TunnelVisionLabs.Collections.Trees.SortedTreeSet.SortedTreeSet(int branchingFactor, System.Collections.Generic.IEnumerable collection, System.Collections.Generic.IComparer comparer) -> void +~TunnelVisionLabs.Collections.Trees.SortedTreeSet.SymmetricExceptWith(System.Collections.Generic.IEnumerable other) -> void TunnelVisionLabs.Collections.Trees.SortedTreeSet.TrimExcess() -> void TunnelVisionLabs.Collections.Trees.SortedTreeSet.TryGetValue(T equalValue, out T actualValue) -> bool -TunnelVisionLabs.Collections.Trees.SortedTreeSet.UnionWith(System.Collections.Generic.IEnumerable other) -> void +~TunnelVisionLabs.Collections.Trees.SortedTreeSet.UnionWith(System.Collections.Generic.IEnumerable other) -> void TunnelVisionLabs.Collections.Trees.TreeDictionary TunnelVisionLabs.Collections.Trees.TreeDictionary.Add(TKey key, TValue value) -> void TunnelVisionLabs.Collections.Trees.TreeDictionary.Clear() -> void -TunnelVisionLabs.Collections.Trees.TreeDictionary.Comparer.get -> System.Collections.Generic.IEqualityComparer +~TunnelVisionLabs.Collections.Trees.TreeDictionary.Comparer.get -> System.Collections.Generic.IEqualityComparer TunnelVisionLabs.Collections.Trees.TreeDictionary.ContainsKey(TKey key) -> bool TunnelVisionLabs.Collections.Trees.TreeDictionary.ContainsValue(TValue value) -> bool TunnelVisionLabs.Collections.Trees.TreeDictionary.Count.get -> int @@ -552,7 +553,7 @@ TunnelVisionLabs.Collections.Trees.TreeDictionary.GetEnumerator() TunnelVisionLabs.Collections.Trees.TreeDictionary.KeyCollection TunnelVisionLabs.Collections.Trees.TreeDictionary.KeyCollection.Clear() -> void TunnelVisionLabs.Collections.Trees.TreeDictionary.KeyCollection.Contains(TKey item) -> bool -TunnelVisionLabs.Collections.Trees.TreeDictionary.KeyCollection.CopyTo(TKey[] array, int arrayIndex) -> void +~TunnelVisionLabs.Collections.Trees.TreeDictionary.KeyCollection.CopyTo(TKey[] array, int arrayIndex) -> void TunnelVisionLabs.Collections.Trees.TreeDictionary.KeyCollection.Count.get -> int TunnelVisionLabs.Collections.Trees.TreeDictionary.KeyCollection.Enumerator TunnelVisionLabs.Collections.Trees.TreeDictionary.KeyCollection.Enumerator.Current.get -> TKey @@ -563,18 +564,18 @@ TunnelVisionLabs.Collections.Trees.TreeDictionary.KeyCollection.Re TunnelVisionLabs.Collections.Trees.TreeDictionary.Keys.get -> TunnelVisionLabs.Collections.Trees.TreeDictionary.KeyCollection TunnelVisionLabs.Collections.Trees.TreeDictionary.Remove(TKey key) -> bool TunnelVisionLabs.Collections.Trees.TreeDictionary.TreeDictionary() -> void -TunnelVisionLabs.Collections.Trees.TreeDictionary.TreeDictionary(System.Collections.Generic.IEnumerable> collection) -> void -TunnelVisionLabs.Collections.Trees.TreeDictionary.TreeDictionary(System.Collections.Generic.IEnumerable> collection, System.Collections.Generic.IEqualityComparer comparer) -> void -TunnelVisionLabs.Collections.Trees.TreeDictionary.TreeDictionary(System.Collections.Generic.IEqualityComparer comparer) -> void +~TunnelVisionLabs.Collections.Trees.TreeDictionary.TreeDictionary(System.Collections.Generic.IEnumerable> collection) -> void +~TunnelVisionLabs.Collections.Trees.TreeDictionary.TreeDictionary(System.Collections.Generic.IEnumerable> collection, System.Collections.Generic.IEqualityComparer comparer) -> void +~TunnelVisionLabs.Collections.Trees.TreeDictionary.TreeDictionary(System.Collections.Generic.IEqualityComparer comparer) -> void TunnelVisionLabs.Collections.Trees.TreeDictionary.TreeDictionary(int branchingFactor) -> void -TunnelVisionLabs.Collections.Trees.TreeDictionary.TreeDictionary(int branchingFactor, System.Collections.Generic.IEnumerable> collection, System.Collections.Generic.IEqualityComparer comparer) -> void -TunnelVisionLabs.Collections.Trees.TreeDictionary.TreeDictionary(int branchingFactor, System.Collections.Generic.IEqualityComparer comparer) -> void +~TunnelVisionLabs.Collections.Trees.TreeDictionary.TreeDictionary(int branchingFactor, System.Collections.Generic.IEnumerable> collection, System.Collections.Generic.IEqualityComparer comparer) -> void +~TunnelVisionLabs.Collections.Trees.TreeDictionary.TreeDictionary(int branchingFactor, System.Collections.Generic.IEqualityComparer comparer) -> void TunnelVisionLabs.Collections.Trees.TreeDictionary.TryAdd(TKey key, TValue value) -> bool TunnelVisionLabs.Collections.Trees.TreeDictionary.TryGetValue(TKey key, out TValue value) -> bool TunnelVisionLabs.Collections.Trees.TreeDictionary.ValueCollection TunnelVisionLabs.Collections.Trees.TreeDictionary.ValueCollection.Clear() -> void TunnelVisionLabs.Collections.Trees.TreeDictionary.ValueCollection.Contains(TValue item) -> bool -TunnelVisionLabs.Collections.Trees.TreeDictionary.ValueCollection.CopyTo(TValue[] array, int arrayIndex) -> void +~TunnelVisionLabs.Collections.Trees.TreeDictionary.ValueCollection.CopyTo(TValue[] array, int arrayIndex) -> void TunnelVisionLabs.Collections.Trees.TreeDictionary.ValueCollection.Count.get -> int TunnelVisionLabs.Collections.Trees.TreeDictionary.ValueCollection.Enumerator TunnelVisionLabs.Collections.Trees.TreeDictionary.ValueCollection.Enumerator.Current.get -> TValue @@ -586,65 +587,65 @@ TunnelVisionLabs.Collections.Trees.TreeDictionary.this[TKey key].g TunnelVisionLabs.Collections.Trees.TreeDictionary.this[TKey key].set -> void TunnelVisionLabs.Collections.Trees.TreeList TunnelVisionLabs.Collections.Trees.TreeList.Add(T item) -> void -TunnelVisionLabs.Collections.Trees.TreeList.AddRange(System.Collections.Generic.IEnumerable collection) -> void +~TunnelVisionLabs.Collections.Trees.TreeList.AddRange(System.Collections.Generic.IEnumerable collection) -> void TunnelVisionLabs.Collections.Trees.TreeList.BinarySearch(T item) -> int -TunnelVisionLabs.Collections.Trees.TreeList.BinarySearch(T item, System.Collections.Generic.IComparer comparer) -> int -TunnelVisionLabs.Collections.Trees.TreeList.BinarySearch(int index, int count, T item, System.Collections.Generic.IComparer comparer) -> int +~TunnelVisionLabs.Collections.Trees.TreeList.BinarySearch(T item, System.Collections.Generic.IComparer comparer) -> int +~TunnelVisionLabs.Collections.Trees.TreeList.BinarySearch(int index, int count, T item, System.Collections.Generic.IComparer comparer) -> int TunnelVisionLabs.Collections.Trees.TreeList.Clear() -> void TunnelVisionLabs.Collections.Trees.TreeList.Contains(T item) -> bool -TunnelVisionLabs.Collections.Trees.TreeList.ConvertAll(System.Func converter) -> TunnelVisionLabs.Collections.Trees.TreeList -TunnelVisionLabs.Collections.Trees.TreeList.CopyTo(T[] array) -> void -TunnelVisionLabs.Collections.Trees.TreeList.CopyTo(T[] array, int arrayIndex) -> void -TunnelVisionLabs.Collections.Trees.TreeList.CopyTo(int srcIndex, T[] dest, int dstIndex, int length) -> void +~TunnelVisionLabs.Collections.Trees.TreeList.ConvertAll(System.Func converter) -> TunnelVisionLabs.Collections.Trees.TreeList +~TunnelVisionLabs.Collections.Trees.TreeList.CopyTo(T[] array) -> void +~TunnelVisionLabs.Collections.Trees.TreeList.CopyTo(T[] array, int arrayIndex) -> void +~TunnelVisionLabs.Collections.Trees.TreeList.CopyTo(int srcIndex, T[] dest, int dstIndex, int length) -> void TunnelVisionLabs.Collections.Trees.TreeList.Count.get -> int TunnelVisionLabs.Collections.Trees.TreeList.Enumerator TunnelVisionLabs.Collections.Trees.TreeList.Enumerator.Current.get -> T TunnelVisionLabs.Collections.Trees.TreeList.Enumerator.Dispose() -> void TunnelVisionLabs.Collections.Trees.TreeList.Enumerator.MoveNext() -> bool -TunnelVisionLabs.Collections.Trees.TreeList.Exists(System.Predicate match) -> bool -TunnelVisionLabs.Collections.Trees.TreeList.Find(System.Predicate match) -> T -TunnelVisionLabs.Collections.Trees.TreeList.FindAll(System.Predicate match) -> TunnelVisionLabs.Collections.Trees.TreeList -TunnelVisionLabs.Collections.Trees.TreeList.FindIndex(System.Predicate match) -> int -TunnelVisionLabs.Collections.Trees.TreeList.FindIndex(int startIndex, System.Predicate match) -> int -TunnelVisionLabs.Collections.Trees.TreeList.FindIndex(int startIndex, int count, System.Predicate match) -> int -TunnelVisionLabs.Collections.Trees.TreeList.FindLast(System.Predicate match) -> T -TunnelVisionLabs.Collections.Trees.TreeList.FindLastIndex(System.Predicate match) -> int -TunnelVisionLabs.Collections.Trees.TreeList.FindLastIndex(int startIndex, System.Predicate match) -> int -TunnelVisionLabs.Collections.Trees.TreeList.FindLastIndex(int startIndex, int count, System.Predicate match) -> int -TunnelVisionLabs.Collections.Trees.TreeList.ForEach(System.Action action) -> void +~TunnelVisionLabs.Collections.Trees.TreeList.Exists(System.Predicate match) -> bool +~TunnelVisionLabs.Collections.Trees.TreeList.Find(System.Predicate match) -> T +~TunnelVisionLabs.Collections.Trees.TreeList.FindAll(System.Predicate match) -> TunnelVisionLabs.Collections.Trees.TreeList +~TunnelVisionLabs.Collections.Trees.TreeList.FindIndex(System.Predicate match) -> int +~TunnelVisionLabs.Collections.Trees.TreeList.FindIndex(int startIndex, System.Predicate match) -> int +~TunnelVisionLabs.Collections.Trees.TreeList.FindIndex(int startIndex, int count, System.Predicate match) -> int +~TunnelVisionLabs.Collections.Trees.TreeList.FindLast(System.Predicate match) -> T +~TunnelVisionLabs.Collections.Trees.TreeList.FindLastIndex(System.Predicate match) -> int +~TunnelVisionLabs.Collections.Trees.TreeList.FindLastIndex(int startIndex, System.Predicate match) -> int +~TunnelVisionLabs.Collections.Trees.TreeList.FindLastIndex(int startIndex, int count, System.Predicate match) -> int +~TunnelVisionLabs.Collections.Trees.TreeList.ForEach(System.Action action) -> void TunnelVisionLabs.Collections.Trees.TreeList.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.TreeList.Enumerator -TunnelVisionLabs.Collections.Trees.TreeList.GetRange(int index, int count) -> TunnelVisionLabs.Collections.Trees.TreeList +~TunnelVisionLabs.Collections.Trees.TreeList.GetRange(int index, int count) -> TunnelVisionLabs.Collections.Trees.TreeList TunnelVisionLabs.Collections.Trees.TreeList.IndexOf(T item) -> int TunnelVisionLabs.Collections.Trees.TreeList.IndexOf(T item, int index) -> int TunnelVisionLabs.Collections.Trees.TreeList.IndexOf(T item, int index, int count) -> int TunnelVisionLabs.Collections.Trees.TreeList.Insert(int index, T item) -> void -TunnelVisionLabs.Collections.Trees.TreeList.InsertRange(int index, System.Collections.Generic.IEnumerable collection) -> void +~TunnelVisionLabs.Collections.Trees.TreeList.InsertRange(int index, System.Collections.Generic.IEnumerable collection) -> void TunnelVisionLabs.Collections.Trees.TreeList.LastIndexOf(T item) -> int TunnelVisionLabs.Collections.Trees.TreeList.LastIndexOf(T item, int index) -> int TunnelVisionLabs.Collections.Trees.TreeList.LastIndexOf(T item, int index, int count) -> int TunnelVisionLabs.Collections.Trees.TreeList.Remove(T item) -> bool -TunnelVisionLabs.Collections.Trees.TreeList.RemoveAll(System.Predicate match) -> int +~TunnelVisionLabs.Collections.Trees.TreeList.RemoveAll(System.Predicate match) -> int TunnelVisionLabs.Collections.Trees.TreeList.RemoveAt(int index) -> void TunnelVisionLabs.Collections.Trees.TreeList.RemoveRange(int index, int count) -> void TunnelVisionLabs.Collections.Trees.TreeList.Reverse() -> void TunnelVisionLabs.Collections.Trees.TreeList.Reverse(int index, int count) -> void TunnelVisionLabs.Collections.Trees.TreeList.Sort() -> void -TunnelVisionLabs.Collections.Trees.TreeList.Sort(System.Collections.Generic.IComparer comparer) -> void -TunnelVisionLabs.Collections.Trees.TreeList.Sort(System.Comparison comparison) -> void -TunnelVisionLabs.Collections.Trees.TreeList.Sort(int index, int count, System.Collections.Generic.IComparer comparer) -> void -TunnelVisionLabs.Collections.Trees.TreeList.ToArray() -> T[] +~TunnelVisionLabs.Collections.Trees.TreeList.Sort(System.Collections.Generic.IComparer comparer) -> void +~TunnelVisionLabs.Collections.Trees.TreeList.Sort(System.Comparison comparison) -> void +~TunnelVisionLabs.Collections.Trees.TreeList.Sort(int index, int count, System.Collections.Generic.IComparer comparer) -> void +~TunnelVisionLabs.Collections.Trees.TreeList.ToArray() -> T[] TunnelVisionLabs.Collections.Trees.TreeList.TreeList() -> void -TunnelVisionLabs.Collections.Trees.TreeList.TreeList(System.Collections.Generic.IEnumerable collection) -> void +~TunnelVisionLabs.Collections.Trees.TreeList.TreeList(System.Collections.Generic.IEnumerable collection) -> void TunnelVisionLabs.Collections.Trees.TreeList.TreeList(int branchingFactor) -> void -TunnelVisionLabs.Collections.Trees.TreeList.TreeList(int branchingFactor, System.Collections.Generic.IEnumerable collection) -> void +~TunnelVisionLabs.Collections.Trees.TreeList.TreeList(int branchingFactor, System.Collections.Generic.IEnumerable collection) -> void TunnelVisionLabs.Collections.Trees.TreeList.TrimExcess() -> void -TunnelVisionLabs.Collections.Trees.TreeList.TrueForAll(System.Predicate match) -> bool +~TunnelVisionLabs.Collections.Trees.TreeList.TrueForAll(System.Predicate match) -> bool TunnelVisionLabs.Collections.Trees.TreeList.this[int index].get -> T TunnelVisionLabs.Collections.Trees.TreeList.this[int index].set -> void TunnelVisionLabs.Collections.Trees.TreeQueue TunnelVisionLabs.Collections.Trees.TreeQueue.Clear() -> void TunnelVisionLabs.Collections.Trees.TreeQueue.Contains(T item) -> bool -TunnelVisionLabs.Collections.Trees.TreeQueue.CopyTo(T[] array, int arrayIndex) -> void +~TunnelVisionLabs.Collections.Trees.TreeQueue.CopyTo(T[] array, int arrayIndex) -> void TunnelVisionLabs.Collections.Trees.TreeQueue.Count.get -> int TunnelVisionLabs.Collections.Trees.TreeQueue.Dequeue() -> T TunnelVisionLabs.Collections.Trees.TreeQueue.Enqueue(T item) -> void @@ -654,7 +655,7 @@ TunnelVisionLabs.Collections.Trees.TreeQueue.Enumerator.Dispose() -> void TunnelVisionLabs.Collections.Trees.TreeQueue.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.TreeQueue.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.TreeQueue.Enumerator TunnelVisionLabs.Collections.Trees.TreeQueue.Peek() -> T -TunnelVisionLabs.Collections.Trees.TreeQueue.ToArray() -> T[] +~TunnelVisionLabs.Collections.Trees.TreeQueue.ToArray() -> T[] TunnelVisionLabs.Collections.Trees.TreeQueue.TreeQueue() -> void TunnelVisionLabs.Collections.Trees.TreeQueue.TreeQueue(int branchingFactor) -> void TunnelVisionLabs.Collections.Trees.TreeQueue.TrimExcess() -> void @@ -663,42 +664,42 @@ TunnelVisionLabs.Collections.Trees.TreeQueue.TryPeek(out T result) -> bool TunnelVisionLabs.Collections.Trees.TreeSet TunnelVisionLabs.Collections.Trees.TreeSet.Add(T item) -> bool TunnelVisionLabs.Collections.Trees.TreeSet.Clear() -> void -TunnelVisionLabs.Collections.Trees.TreeSet.Comparer.get -> System.Collections.Generic.IEqualityComparer +~TunnelVisionLabs.Collections.Trees.TreeSet.Comparer.get -> System.Collections.Generic.IEqualityComparer TunnelVisionLabs.Collections.Trees.TreeSet.Contains(T item) -> bool -TunnelVisionLabs.Collections.Trees.TreeSet.CopyTo(T[] array) -> void -TunnelVisionLabs.Collections.Trees.TreeSet.CopyTo(T[] array, int arrayIndex) -> void -TunnelVisionLabs.Collections.Trees.TreeSet.CopyTo(T[] array, int arrayIndex, int count) -> void +~TunnelVisionLabs.Collections.Trees.TreeSet.CopyTo(T[] array) -> void +~TunnelVisionLabs.Collections.Trees.TreeSet.CopyTo(T[] array, int arrayIndex) -> void +~TunnelVisionLabs.Collections.Trees.TreeSet.CopyTo(T[] array, int arrayIndex, int count) -> void TunnelVisionLabs.Collections.Trees.TreeSet.Count.get -> int TunnelVisionLabs.Collections.Trees.TreeSet.Enumerator TunnelVisionLabs.Collections.Trees.TreeSet.Enumerator.Current.get -> T TunnelVisionLabs.Collections.Trees.TreeSet.Enumerator.Dispose() -> void TunnelVisionLabs.Collections.Trees.TreeSet.Enumerator.MoveNext() -> bool -TunnelVisionLabs.Collections.Trees.TreeSet.ExceptWith(System.Collections.Generic.IEnumerable other) -> void +~TunnelVisionLabs.Collections.Trees.TreeSet.ExceptWith(System.Collections.Generic.IEnumerable other) -> void TunnelVisionLabs.Collections.Trees.TreeSet.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.TreeSet.Enumerator -TunnelVisionLabs.Collections.Trees.TreeSet.IntersectWith(System.Collections.Generic.IEnumerable other) -> void -TunnelVisionLabs.Collections.Trees.TreeSet.IsProperSubsetOf(System.Collections.Generic.IEnumerable other) -> bool -TunnelVisionLabs.Collections.Trees.TreeSet.IsProperSupersetOf(System.Collections.Generic.IEnumerable other) -> bool -TunnelVisionLabs.Collections.Trees.TreeSet.IsSubsetOf(System.Collections.Generic.IEnumerable other) -> bool -TunnelVisionLabs.Collections.Trees.TreeSet.IsSupersetOf(System.Collections.Generic.IEnumerable other) -> bool -TunnelVisionLabs.Collections.Trees.TreeSet.Overlaps(System.Collections.Generic.IEnumerable other) -> bool +~TunnelVisionLabs.Collections.Trees.TreeSet.IntersectWith(System.Collections.Generic.IEnumerable other) -> void +~TunnelVisionLabs.Collections.Trees.TreeSet.IsProperSubsetOf(System.Collections.Generic.IEnumerable other) -> bool +~TunnelVisionLabs.Collections.Trees.TreeSet.IsProperSupersetOf(System.Collections.Generic.IEnumerable other) -> bool +~TunnelVisionLabs.Collections.Trees.TreeSet.IsSubsetOf(System.Collections.Generic.IEnumerable other) -> bool +~TunnelVisionLabs.Collections.Trees.TreeSet.IsSupersetOf(System.Collections.Generic.IEnumerable other) -> bool +~TunnelVisionLabs.Collections.Trees.TreeSet.Overlaps(System.Collections.Generic.IEnumerable other) -> bool TunnelVisionLabs.Collections.Trees.TreeSet.Remove(T item) -> bool -TunnelVisionLabs.Collections.Trees.TreeSet.RemoveWhere(System.Predicate match) -> int -TunnelVisionLabs.Collections.Trees.TreeSet.SetEquals(System.Collections.Generic.IEnumerable other) -> bool -TunnelVisionLabs.Collections.Trees.TreeSet.SymmetricExceptWith(System.Collections.Generic.IEnumerable other) -> void +~TunnelVisionLabs.Collections.Trees.TreeSet.RemoveWhere(System.Predicate match) -> int +~TunnelVisionLabs.Collections.Trees.TreeSet.SetEquals(System.Collections.Generic.IEnumerable other) -> bool +~TunnelVisionLabs.Collections.Trees.TreeSet.SymmetricExceptWith(System.Collections.Generic.IEnumerable other) -> void TunnelVisionLabs.Collections.Trees.TreeSet.TreeSet() -> void -TunnelVisionLabs.Collections.Trees.TreeSet.TreeSet(System.Collections.Generic.IEnumerable collection) -> void -TunnelVisionLabs.Collections.Trees.TreeSet.TreeSet(System.Collections.Generic.IEnumerable collection, System.Collections.Generic.IEqualityComparer comparer) -> void -TunnelVisionLabs.Collections.Trees.TreeSet.TreeSet(System.Collections.Generic.IEqualityComparer comparer) -> void +~TunnelVisionLabs.Collections.Trees.TreeSet.TreeSet(System.Collections.Generic.IEnumerable collection) -> void +~TunnelVisionLabs.Collections.Trees.TreeSet.TreeSet(System.Collections.Generic.IEnumerable collection, System.Collections.Generic.IEqualityComparer comparer) -> void +~TunnelVisionLabs.Collections.Trees.TreeSet.TreeSet(System.Collections.Generic.IEqualityComparer comparer) -> void TunnelVisionLabs.Collections.Trees.TreeSet.TreeSet(int branchingFactor) -> void -TunnelVisionLabs.Collections.Trees.TreeSet.TreeSet(int branchingFactor, System.Collections.Generic.IEnumerable collection, System.Collections.Generic.IEqualityComparer comparer) -> void -TunnelVisionLabs.Collections.Trees.TreeSet.TreeSet(int branchingFactor, System.Collections.Generic.IEqualityComparer comparer) -> void +~TunnelVisionLabs.Collections.Trees.TreeSet.TreeSet(int branchingFactor, System.Collections.Generic.IEnumerable collection, System.Collections.Generic.IEqualityComparer comparer) -> void +~TunnelVisionLabs.Collections.Trees.TreeSet.TreeSet(int branchingFactor, System.Collections.Generic.IEqualityComparer comparer) -> void TunnelVisionLabs.Collections.Trees.TreeSet.TrimExcess() -> void TunnelVisionLabs.Collections.Trees.TreeSet.TryGetValue(T equalValue, out T actualValue) -> bool -TunnelVisionLabs.Collections.Trees.TreeSet.UnionWith(System.Collections.Generic.IEnumerable other) -> void +~TunnelVisionLabs.Collections.Trees.TreeSet.UnionWith(System.Collections.Generic.IEnumerable other) -> void TunnelVisionLabs.Collections.Trees.TreeStack TunnelVisionLabs.Collections.Trees.TreeStack.Clear() -> void TunnelVisionLabs.Collections.Trees.TreeStack.Contains(T item) -> bool -TunnelVisionLabs.Collections.Trees.TreeStack.CopyTo(T[] array, int arrayIndex) -> void +~TunnelVisionLabs.Collections.Trees.TreeStack.CopyTo(T[] array, int arrayIndex) -> void TunnelVisionLabs.Collections.Trees.TreeStack.Count.get -> int TunnelVisionLabs.Collections.Trees.TreeStack.Enumerator TunnelVisionLabs.Collections.Trees.TreeStack.Enumerator.Current.get -> T @@ -708,89 +709,89 @@ TunnelVisionLabs.Collections.Trees.TreeStack.GetEnumerator() -> TunnelVisionL TunnelVisionLabs.Collections.Trees.TreeStack.Peek() -> T TunnelVisionLabs.Collections.Trees.TreeStack.Pop() -> T TunnelVisionLabs.Collections.Trees.TreeStack.Push(T item) -> void -TunnelVisionLabs.Collections.Trees.TreeStack.ToArray() -> T[] +~TunnelVisionLabs.Collections.Trees.TreeStack.ToArray() -> T[] TunnelVisionLabs.Collections.Trees.TreeStack.TreeStack() -> void TunnelVisionLabs.Collections.Trees.TreeStack.TreeStack(int branchingFactor) -> void TunnelVisionLabs.Collections.Trees.TreeStack.TrimExcess() -> void TunnelVisionLabs.Collections.Trees.TreeStack.TryPeek(out T result) -> bool TunnelVisionLabs.Collections.Trees.TreeStack.TryPop(out T result) -> bool -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Create() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Create(System.Collections.Generic.IComparer keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Create(System.Collections.Generic.IComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.CreateBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.CreateBuilder(System.Collections.Generic.IComparer keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.CreateBuilder(System.Collections.Generic.IComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.CreateRange(System.Collections.Generic.IComparer keyComparer, System.Collections.Generic.IEnumerable> items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.CreateRange(System.Collections.Generic.IComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer, System.Collections.Generic.IEnumerable> items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.CreateRange(System.Collections.Generic.IEnumerable> items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ToImmutableSortedTreeDictionary(this System.Collections.Generic.IEnumerable> items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ToImmutableSortedTreeDictionary(this System.Collections.Generic.IEnumerable> items, System.Collections.Generic.IComparer keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ToImmutableSortedTreeDictionary(this System.Collections.Generic.IEnumerable> items, System.Collections.Generic.IComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ToImmutableSortedTreeDictionary(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Func elementSelector) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ToImmutableSortedTreeDictionary(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Func elementSelector, System.Collections.Generic.IComparer keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ToImmutableSortedTreeDictionary(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Func elementSelector, System.Collections.Generic.IComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Create() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Create(System.Collections.Generic.IComparer comparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Create(System.Collections.Generic.IComparer comparer, T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Create(System.Collections.Generic.IComparer comparer, params T[] items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Create(T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Create(params T[] items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.CreateBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.CreateBuilder(System.Collections.Generic.IComparer comparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.CreateRange(System.Collections.Generic.IComparer comparer, System.Collections.Generic.IEnumerable items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.CreateRange(System.Collections.Generic.IEnumerable items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.ToImmutableSortedTreeSet(this System.Collections.Generic.IEnumerable source) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.ToImmutableSortedTreeSet(this System.Collections.Generic.IEnumerable source, System.Collections.Generic.IComparer comparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Create() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Create(System.Collections.Generic.IEqualityComparer keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Create(System.Collections.Generic.IEqualityComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.CreateBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.CreateBuilder(System.Collections.Generic.IEqualityComparer keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.CreateBuilder(System.Collections.Generic.IEqualityComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.CreateRange(System.Collections.Generic.IEnumerable> items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.CreateRange(System.Collections.Generic.IEqualityComparer keyComparer, System.Collections.Generic.IEnumerable> items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.CreateRange(System.Collections.Generic.IEqualityComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer, System.Collections.Generic.IEnumerable> items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToImmutableTreeDictionary(this System.Collections.Generic.IEnumerable> items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToImmutableTreeDictionary(this System.Collections.Generic.IEnumerable> items, System.Collections.Generic.IEqualityComparer keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToImmutableTreeDictionary(this System.Collections.Generic.IEnumerable> items, System.Collections.Generic.IEqualityComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToImmutableTreeDictionary(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Func elementSelector) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToImmutableTreeDictionary(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Func elementSelector, System.Collections.Generic.IEqualityComparer keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToImmutableTreeDictionary(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Func elementSelector, System.Collections.Generic.IEqualityComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToImmutableTreeDictionary(this System.Collections.Generic.IEnumerable source, System.Func keySelector) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToImmutableTreeDictionary(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Collections.Generic.IEqualityComparer keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Create() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Create(T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Create(params T[] items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.CreateBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.CreateRange(System.Collections.Generic.IEnumerable items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.ToImmutableTreeList(this System.Collections.Generic.IEnumerable source) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Create() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Create(T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Create(params T[] items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.CreateRange(System.Collections.Generic.IEnumerable items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Create() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Create(System.Collections.Generic.IEqualityComparer equalityComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Create(System.Collections.Generic.IEqualityComparer equalityComparer, T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Create(System.Collections.Generic.IEqualityComparer equalityComparer, params T[] items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Create(T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Create(params T[] items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.CreateBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.CreateBuilder(System.Collections.Generic.IEqualityComparer equalityComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.CreateRange(System.Collections.Generic.IEnumerable items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.CreateRange(System.Collections.Generic.IEqualityComparer equalityComparer, System.Collections.Generic.IEnumerable items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.ToImmutableTreeSet(this System.Collections.Generic.IEnumerable source) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.ToImmutableTreeSet(this System.Collections.Generic.IEnumerable source, System.Collections.Generic.IEqualityComparer equalityComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Create() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Create(T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Create(params T[] items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack -static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.CreateRange(System.Collections.Generic.IEnumerable items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack -static TunnelVisionLabs.Collections.Trees.SortedTreeSet.CreateSetComparer() -> System.Collections.Generic.IEqualityComparer> -static TunnelVisionLabs.Collections.Trees.SortedTreeSet.CreateSetComparer(System.Collections.Generic.IEqualityComparer memberEqualityComparer) -> System.Collections.Generic.IEqualityComparer> -static TunnelVisionLabs.Collections.Trees.TreeSet.CreateSetComparer() -> System.Collections.Generic.IEqualityComparer> -static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet -static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue -static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet -static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Create() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Create(System.Collections.Generic.IComparer keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Create(System.Collections.Generic.IComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.CreateBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.CreateBuilder(System.Collections.Generic.IComparer keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.CreateBuilder(System.Collections.Generic.IComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.CreateRange(System.Collections.Generic.IComparer keyComparer, System.Collections.Generic.IEnumerable> items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.CreateRange(System.Collections.Generic.IComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer, System.Collections.Generic.IEnumerable> items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.CreateRange(System.Collections.Generic.IEnumerable> items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ToImmutableSortedTreeDictionary(this System.Collections.Generic.IEnumerable> items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ToImmutableSortedTreeDictionary(this System.Collections.Generic.IEnumerable> items, System.Collections.Generic.IComparer keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ToImmutableSortedTreeDictionary(this System.Collections.Generic.IEnumerable> items, System.Collections.Generic.IComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ToImmutableSortedTreeDictionary(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Func elementSelector) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ToImmutableSortedTreeDictionary(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Func elementSelector, System.Collections.Generic.IComparer keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ToImmutableSortedTreeDictionary(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Func elementSelector, System.Collections.Generic.IComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Create() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Create(System.Collections.Generic.IComparer comparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Create(System.Collections.Generic.IComparer comparer, T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Create(System.Collections.Generic.IComparer comparer, params T[] items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Create(T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Create(params T[] items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.CreateBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.CreateBuilder(System.Collections.Generic.IComparer comparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.CreateRange(System.Collections.Generic.IComparer comparer, System.Collections.Generic.IEnumerable items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.CreateRange(System.Collections.Generic.IEnumerable items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.ToImmutableSortedTreeSet(this System.Collections.Generic.IEnumerable source) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.ToImmutableSortedTreeSet(this System.Collections.Generic.IEnumerable source, System.Collections.Generic.IComparer comparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Create() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Create(System.Collections.Generic.IEqualityComparer keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Create(System.Collections.Generic.IEqualityComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.CreateBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.CreateBuilder(System.Collections.Generic.IEqualityComparer keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.CreateBuilder(System.Collections.Generic.IEqualityComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.CreateRange(System.Collections.Generic.IEnumerable> items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.CreateRange(System.Collections.Generic.IEqualityComparer keyComparer, System.Collections.Generic.IEnumerable> items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.CreateRange(System.Collections.Generic.IEqualityComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer, System.Collections.Generic.IEnumerable> items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToImmutableTreeDictionary(this System.Collections.Generic.IEnumerable> items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToImmutableTreeDictionary(this System.Collections.Generic.IEnumerable> items, System.Collections.Generic.IEqualityComparer keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToImmutableTreeDictionary(this System.Collections.Generic.IEnumerable> items, System.Collections.Generic.IEqualityComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToImmutableTreeDictionary(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Func elementSelector) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToImmutableTreeDictionary(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Func elementSelector, System.Collections.Generic.IEqualityComparer keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToImmutableTreeDictionary(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Func elementSelector, System.Collections.Generic.IEqualityComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToImmutableTreeDictionary(this System.Collections.Generic.IEnumerable source, System.Func keySelector) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToImmutableTreeDictionary(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Collections.Generic.IEqualityComparer keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Create() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Create(T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Create(params T[] items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.CreateBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.CreateRange(System.Collections.Generic.IEnumerable items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.ToImmutableTreeList(this System.Collections.Generic.IEnumerable source) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Create() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Create(T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Create(params T[] items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.CreateRange(System.Collections.Generic.IEnumerable items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Create() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Create(System.Collections.Generic.IEqualityComparer equalityComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Create(System.Collections.Generic.IEqualityComparer equalityComparer, T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Create(System.Collections.Generic.IEqualityComparer equalityComparer, params T[] items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Create(T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Create(params T[] items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.CreateBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.CreateBuilder(System.Collections.Generic.IEqualityComparer equalityComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.CreateRange(System.Collections.Generic.IEnumerable items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.CreateRange(System.Collections.Generic.IEqualityComparer equalityComparer, System.Collections.Generic.IEnumerable items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.ToImmutableTreeSet(this System.Collections.Generic.IEnumerable source) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.ToImmutableTreeSet(this System.Collections.Generic.IEnumerable source, System.Collections.Generic.IEqualityComparer equalityComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Create() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Create(T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Create(params T[] items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack +~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.CreateRange(System.Collections.Generic.IEnumerable items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack +~static TunnelVisionLabs.Collections.Trees.SortedTreeSet.CreateSetComparer() -> System.Collections.Generic.IEqualityComparer> +~static TunnelVisionLabs.Collections.Trees.SortedTreeSet.CreateSetComparer(System.Collections.Generic.IEqualityComparer memberEqualityComparer) -> System.Collections.Generic.IEqualityComparer> +~static TunnelVisionLabs.Collections.Trees.TreeSet.CreateSetComparer() -> System.Collections.Generic.IEqualityComparer> +~static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary +~static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet +~static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary +~static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +~static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue +~static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet +~static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack From 8526d236b5373377241e5d4a6ad049887dd82e33 Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Sat, 18 Jul 2020 22:13:26 -0700 Subject: [PATCH 05/23] Add a target for .NET Standard 2.1 --- .../TunnelVisionLabs.Collections.Trees.Experimental.csproj | 2 +- .../TunnelVisionLabs.Collections.Trees.csproj | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/TunnelVisionLabs.Collections.Trees.Experimental/TunnelVisionLabs.Collections.Trees.Experimental.csproj b/TunnelVisionLabs.Collections.Trees.Experimental/TunnelVisionLabs.Collections.Trees.Experimental.csproj index 7062e86..8e961b7 100644 --- a/TunnelVisionLabs.Collections.Trees.Experimental/TunnelVisionLabs.Collections.Trees.Experimental.csproj +++ b/TunnelVisionLabs.Collections.Trees.Experimental/TunnelVisionLabs.Collections.Trees.Experimental.csproj @@ -2,7 +2,7 @@ - net45;netstandard1.1;netstandard2.0 + net45;netstandard1.1;netstandard2.0;netstandard2.1 TunnelVisionLabs.Collections.Trees true diff --git a/TunnelVisionLabs.Collections.Trees/TunnelVisionLabs.Collections.Trees.csproj b/TunnelVisionLabs.Collections.Trees/TunnelVisionLabs.Collections.Trees.csproj index 6851139..436aafd 100644 --- a/TunnelVisionLabs.Collections.Trees/TunnelVisionLabs.Collections.Trees.csproj +++ b/TunnelVisionLabs.Collections.Trees/TunnelVisionLabs.Collections.Trees.csproj @@ -2,12 +2,12 @@ - net45;netstandard1.1;netstandard2.0 + net45;netstandard1.1;netstandard2.0;netstandard2.1 true - true + true From e80f386b345d5e116c1b43b830308335e255315d Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Sat, 18 Jul 2020 22:15:45 -0700 Subject: [PATCH 06/23] Enable nullable reference types for FixedArray --- .../Immutable/FixedArray8Test.cs | 2 -- .../Immutable/FixedArray8`1.cs | 14 ++++++++++---- .../Immutable/ImmutableTreeList`1+IndexNode.cs | 12 ++++++------ .../Immutable/ImmutableTreeList`1+LeafNode.cs | 6 +++--- 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/FixedArray8Test.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/FixedArray8Test.cs index cf9df79..a2546e3 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/FixedArray8Test.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/FixedArray8Test.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/FixedArray8`1.cs b/TunnelVisionLabs.Collections.Trees/Immutable/FixedArray8`1.cs index 8d04884..4c7ccd7 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/FixedArray8`1.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/FixedArray8`1.cs @@ -1,13 +1,12 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; using System.Collections.Generic; using System.Diagnostics; + using System.Runtime.CompilerServices; internal struct FixedArray8 { @@ -195,11 +194,18 @@ internal void Copy(int sourceIndex, Array destinationArray, int destinationIndex } } - internal void Clear(int index, int length) + internal void MarkAsUnused(int index, int length) { +#if !NET45 && !NETSTANDARD1_1 && !NETSTANDARD2_0 + if (!RuntimeHelpers.IsReferenceOrContainsReferences()) + { + return; + } +#endif + for (int i = 0; i < length; i++) { - this[i + index] = default; + this[i + index] = default!; } } diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+IndexNode.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+IndexNode.cs index f80326d..d2e6ca7 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+IndexNode.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+IndexNode.cs @@ -434,8 +434,8 @@ internal override (Node currentNode, Node nextNode) RemoveAt(int index, Node nex int transferCount = nextIndex._nodeCount - minimumNodeCount; nextIndex._nodes.Copy(0, ref _nodes, _nodeCount, transferCount); nextIndex._nodes.Copy(transferCount, ref nextIndex._nodes, 0, nextIndex._nodeCount - transferCount); - nextIndex._offsets.Clear(nextIndex._nodeCount - transferCount, transferCount); - nextIndex._nodes.Clear(nextIndex._nodeCount - transferCount, transferCount); + nextIndex._offsets.MarkAsUnused(nextIndex._nodeCount - transferCount, transferCount); + nextIndex._nodes.MarkAsUnused(nextIndex._nodeCount - transferCount, transferCount); for (int i = 0; i < transferCount; i++) { _offsets[_nodeCount + i] = _offsets[_nodeCount + i - 1] + _nodes[_nodeCount + i - 1].Count; @@ -781,8 +781,8 @@ private static (Node currentNode, Node nextNode) TrimExcessImpl(IndexNode curren nextNode._nodes.Copy(elementsToMove, ref nextNode._nodes, 0, nextNode._nodeCount - elementsToMove); nextNode._nodeCount -= elementsToMove; - nextNode._offsets.Clear(nextNode._nodeCount, elementsToMove); - nextNode._nodes.Clear(nextNode._nodeCount, elementsToMove); + nextNode._offsets.MarkAsUnused(nextNode._nodeCount, elementsToMove); + nextNode._nodes.MarkAsUnused(nextNode._nodeCount, elementsToMove); for (int i = 1; i < nextNode._nodeCount; i++) { nextNode._offsets[i] = nextNode._offsets[i - 1] + nextNode._nodes[i - 1].Count; @@ -873,8 +873,8 @@ private TreeSpan MapSpanDownToChild(TreeSpan span, int childIndex) _nodes.Copy(splitPoint, ref splitNode._nodes, 0, _nodeCount - splitPoint); _offsets.Copy(splitPoint, ref splitNode._offsets, 0, _nodeCount - splitPoint); - _nodes.Clear(splitPoint, _nodeCount - splitPoint); - _offsets.Clear(splitPoint, _nodeCount - splitPoint); + _nodes.MarkAsUnused(splitPoint, _nodeCount - splitPoint); + _offsets.MarkAsUnused(splitPoint, _nodeCount - splitPoint); splitNode._nodeCount = _nodeCount - splitPoint; int adjustment = splitNode._offsets[0]; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+LeafNode.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+LeafNode.cs index 853c830..ce6b75b 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+LeafNode.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+LeafNode.cs @@ -144,7 +144,7 @@ internal override (Node currentNode, Node splitNode) Insert(bool isAppend, int i #endif _data.Copy(splitPoint, ref splitNode._data, 0, _count - splitPoint); - _data.Clear(splitPoint, _count - splitPoint); + _data.MarkAsUnused(splitPoint, _count - splitPoint); splitNode._count = _count - splitPoint; _count = splitPoint; @@ -261,7 +261,7 @@ internal override (Node currentNode, Node nextNode) RemoveAt(int index, Node nex int transferCount = nextNode.Count - minimumNodeCount; ((LeafNode)nextNode)._data.Copy(0, ref _data, _count, transferCount); ((LeafNode)nextNode)._data.Copy(transferCount, ref ((LeafNode)nextNode)._data, 0, nextNode.Count - transferCount); - ((LeafNode)nextNode)._data.Clear(nextNode.Count - transferCount, transferCount); + ((LeafNode)nextNode)._data.MarkAsUnused(nextNode.Count - transferCount, transferCount); _count += transferCount; ((LeafNode)nextNode)._count -= transferCount; return (this, nextNode); @@ -326,7 +326,7 @@ internal override (Node currentNode, Node nextNode) TrimExcessImpl(Node nextNode { nextLeaf._data.Copy(elementsToMove, ref nextLeaf._data, 0, nextLeaf._count - elementsToMove); nextLeaf._count -= elementsToMove; - nextLeaf._data.Clear(nextLeaf._count, elementsToMove); + nextLeaf._data.MarkAsUnused(nextLeaf._count, elementsToMove); } return (this, nextLeaf); From f5ebfe560261235404ae2aded5b397719f855ba0 Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Sat, 18 Jul 2020 22:51:51 -0700 Subject: [PATCH 07/23] Enable nullable reference types for ImmutableSortedTreeDictionary --- .../AbstractImmutableDictionaryTest.cs | 5 +- ...mmutableSortedTreeDictionaryBuilderTest.cs | 20 +++--- .../ImmutableSortedTreeDictionaryTest.cs | 42 ++++++----- .../ImmutableSortedTreeDictionary.cs | 37 ++++++---- ...dTreeDictionary`2+Builder+KeyCollection.cs | 2 - ...reeDictionary`2+Builder+ValueCollection.cs | 4 +- ...ImmutableSortedTreeDictionary`2+Builder.cs | 31 ++++---- ...utableSortedTreeDictionary`2+Enumerator.cs | 4 +- ...eeDictionary`2+KeyCollection+Enumerator.cs | 2 - ...bleSortedTreeDictionary`2+KeyCollection.cs | 2 - ...Dictionary`2+ValueCollection+Enumerator.cs | 4 +- ...eSortedTreeDictionary`2+ValueCollection.cs | 4 +- .../ImmutableSortedTreeDictionary`2.cs | 32 +++++---- .../PublicAPI.Unshipped.txt | 70 +++++++++---------- 14 files changed, 130 insertions(+), 129 deletions(-) diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/AbstractImmutableDictionaryTest.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/AbstractImmutableDictionaryTest.cs index 09489b3..2b8aa50 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/AbstractImmutableDictionaryTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/AbstractImmutableDictionaryTest.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; @@ -164,6 +162,7 @@ public void TestRemove() dictionary.Remove(1)); } - protected abstract IImmutableDictionary CreateDictionary(); + protected abstract IImmutableDictionary CreateDictionary() + where TKey : notnull; } } diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeDictionaryBuilderTest.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeDictionaryBuilderTest.cs index e0dcdcf..8591a8e 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeDictionaryBuilderTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeDictionaryBuilderTest.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; @@ -80,7 +78,7 @@ public void TestRemoveRange() dictionary.RemoveRange(itemsToRemove); Assert.Equal(new[] { 1, 3, 5, 7, 9 }.Select(x => new KeyValuePair(x, x)), dictionary); - Assert.Throws("keys", () => dictionary.RemoveRange(null)); + Assert.Throws("keys", () => dictionary.RemoveRange(null!)); } [Fact] @@ -134,7 +132,7 @@ public void TestIDictionaryT() Assert.Equal(Enumerable.Range(0, 9), dictionary.Values); Assert.Throws(() => dictionary.Keys.Add(0)); - Assert.Throws("array", () => dictionary.Keys.CopyTo(null, 0)); + Assert.Throws("array", () => dictionary.Keys.CopyTo(null!, 0)); Assert.Throws("arrayIndex", () => dictionary.Keys.CopyTo(new int[dictionary.Count], -1)); Assert.Throws("arrayIndex", () => dictionary.Keys.CopyTo(new int[dictionary.Count], dictionary.Count + 1)); Assert.Throws(() => dictionary.Keys.CopyTo(new int[dictionary.Count], 1)); @@ -164,7 +162,7 @@ public void TestIDictionaryT() Assert.Equal(0, keyEnumerator.Current); Assert.Throws(() => dictionary.Values.Add(0)); - Assert.Throws("array", () => dictionary.Values.CopyTo(null, 0)); + Assert.Throws("array", () => dictionary.Values.CopyTo(null!, 0)); Assert.Throws("arrayIndex", () => dictionary.Values.CopyTo(new int[dictionary.Count], -1)); Assert.Throws("arrayIndex", () => dictionary.Values.CopyTo(new int[dictionary.Count], dictionary.Count + 1)); Assert.Throws(() => dictionary.Values.CopyTo(new int[dictionary.Count], 1)); @@ -217,7 +215,7 @@ public void TestIDictionary() Assert.False(dictionary.IsReadOnly); Assert.False(dictionary.IsSynchronized); - Assert.Throws("key", () => dictionary.Add(key: null, value: 1)); + Assert.Throws("key", () => dictionary.Add(key: null!, value: 1)); Assert.Throws("value", () => dictionary.Add(key: 1, value: null)); Assert.Throws("key", () => dictionary.Add(key: "string value", value: 0)); Assert.Throws("value", () => dictionary.Add(key: 0, value: "string value")); @@ -230,11 +228,11 @@ public void TestIDictionary() dictionary.Add(10, 11); Assert.Equal(11, dictionary.Count); - Assert.Throws("key", () => dictionary[key: null]); + Assert.Throws("key", () => dictionary[key: null!]); Assert.Null(dictionary["string key"]); Assert.Equal(11, dictionary[10]); - Assert.Throws("key", () => dictionary[key: null] = 12); + Assert.Throws("key", () => dictionary[key: null!] = 12); Assert.Throws("key", () => dictionary["string key"] = 12); Assert.Throws("value", () => dictionary[10] = null); Assert.Throws("value", () => dictionary[10] = "string value"); @@ -249,11 +247,11 @@ public void TestIDictionary() Assert.Equal(entries.Select(i => i.Key), dictionary.Keys.Cast()); Assert.Equal(entries.Select(i => i.Value), dictionary.Values.Cast()); - Assert.Throws(() => dictionary.Contains(null)); + Assert.Throws(() => dictionary.Contains(null!)); Assert.False(dictionary.Contains("string value")); Assert.True(dictionary.Contains(10)); - Assert.Throws(() => dictionary.Remove(null)); + Assert.Throws(() => dictionary.Remove(null!)); Assert.Equal(11, dictionary.Count); dictionary.Remove("string value"); Assert.Equal(11, dictionary.Count); @@ -302,7 +300,7 @@ void TestCollection(ICollection collection, Func indexToExpectedValue Assert.False(collection.IsSynchronized); Assert.Same(dictionary, collection.SyncRoot); - Assert.Throws("array", () => collection.CopyTo(null, 0)); + Assert.Throws("array", () => collection.CopyTo(null!, 0)); Assert.Throws(() => collection.CopyTo(new int[collection.Count, 1], 0)); Assert.Throws(() => collection.CopyTo(Array.CreateInstance(typeof(int), lengths: new[] { collection.Count }, lowerBounds: new[] { 1 }), 0)); Assert.Throws("index", () => collection.CopyTo(new int[collection.Count], -1)); diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeDictionaryTest.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeDictionaryTest.cs index bcbdc26..ee837c0 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeDictionaryTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeDictionaryTest.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; @@ -136,21 +134,21 @@ public void TestImmutableSortedTreeDictionaryCreateRange() [Fact] public void TestImmutableSortedTreeDictionaryCreateRangeValidation() { - Assert.Throws("items", () => ImmutableSortedTreeDictionary.CreateRange(null)); - Assert.Throws("items", () => ImmutableSortedTreeDictionary.CreateRange(Comparer.Default, null)); - Assert.Throws("items", () => ImmutableSortedTreeDictionary.CreateRange(Comparer.Default, EqualityComparer.Default, null)); + Assert.Throws("items", () => ImmutableSortedTreeDictionary.CreateRange(null!)); + Assert.Throws("items", () => ImmutableSortedTreeDictionary.CreateRange(Comparer.Default, null!)); + Assert.Throws("items", () => ImmutableSortedTreeDictionary.CreateRange(Comparer.Default, EqualityComparer.Default, null!)); - Assert.Throws("items", () => default(IEnumerable>).ToImmutableSortedTreeDictionary()); - Assert.Throws("items", () => default(IEnumerable>).ToImmutableSortedTreeDictionary(Comparer.Default)); - Assert.Throws("items", () => default(IEnumerable>).ToImmutableSortedTreeDictionary(Comparer.Default, EqualityComparer.Default)); - Assert.Throws("source", () => default(IEnumerable>).ToImmutableSortedTreeDictionary(x => x.Key, x => x.Value, Comparer.Default)); - Assert.Throws("source", () => default(IEnumerable>).ToImmutableSortedTreeDictionary(x => x.Key, x => x.Value, Comparer.Default, EqualityComparer.Default)); + Assert.Throws("items", () => default(IEnumerable>)!.ToImmutableSortedTreeDictionary()); + Assert.Throws("items", () => default(IEnumerable>)!.ToImmutableSortedTreeDictionary(Comparer.Default)); + Assert.Throws("items", () => default(IEnumerable>)!.ToImmutableSortedTreeDictionary(Comparer.Default, EqualityComparer.Default)); + Assert.Throws("source", () => default(IEnumerable>)!.ToImmutableSortedTreeDictionary(x => x.Key, x => x.Value, Comparer.Default)); + Assert.Throws("source", () => default(IEnumerable>)!.ToImmutableSortedTreeDictionary(x => x.Key, x => x.Value, Comparer.Default, EqualityComparer.Default)); - Assert.Throws("keySelector", () => Enumerable.Empty>().ToImmutableSortedTreeDictionary(keySelector: null, x => x.Value, Comparer.Default)); - Assert.Throws("keySelector", () => Enumerable.Empty>().ToImmutableSortedTreeDictionary(keySelector: null, x => x.Value, Comparer.Default, EqualityComparer.Default)); + Assert.Throws("keySelector", () => Enumerable.Empty>().ToImmutableSortedTreeDictionary(keySelector: null!, x => x.Value, Comparer.Default)); + Assert.Throws("keySelector", () => Enumerable.Empty>().ToImmutableSortedTreeDictionary(keySelector: null!, x => x.Value, Comparer.Default, EqualityComparer.Default)); - Assert.Throws("elementSelector", () => Enumerable.Empty>().ToImmutableSortedTreeDictionary, string, int>(x => x.Key, elementSelector: null, Comparer.Default)); - Assert.Throws("elementSelector", () => Enumerable.Empty>().ToImmutableSortedTreeDictionary(x => x.Key, elementSelector: null, Comparer.Default, EqualityComparer.Default)); + Assert.Throws("elementSelector", () => Enumerable.Empty>().ToImmutableSortedTreeDictionary, string, int>(x => x.Key, elementSelector: null!, Comparer.Default)); + Assert.Throws("elementSelector", () => Enumerable.Empty>().ToImmutableSortedTreeDictionary(x => x.Key, elementSelector: null!, Comparer.Default, EqualityComparer.Default)); } [Fact] @@ -239,7 +237,7 @@ public void TestExplicitComparer() var intComparer = new ComparisonComparer((x, y) => 0); var comparableComparer = new ComparisonComparer((x, y) => 0); - ZeroHashCodeEqualityComparer objValueComparer = ZeroHashCodeEqualityComparer.Default; + ZeroHashCodeEqualityComparer objValueComparer = ZeroHashCodeEqualityComparer.Default; Assert.Same(objComparer, ImmutableSortedTreeDictionary.Create(keyComparer: objComparer).KeyComparer); Assert.Same(intComparer, ImmutableSortedTreeDictionary.Create(keyComparer: intComparer).KeyComparer); @@ -251,8 +249,8 @@ public void TestExplicitComparer() Assert.Same(Comparer.Default, ImmutableSortedTreeDictionary.Create(keyComparer: null, valueComparer: objValueComparer).KeyComparer); Assert.Same(objValueComparer, ImmutableSortedTreeDictionary.Create(keyComparer: null, valueComparer: objValueComparer).ValueComparer); - Assert.Same(Comparer.Default, ImmutableSortedTreeDictionary.Create().Add(new object(), null).WithComparers(keyComparer: null, valueComparer: objValueComparer).KeyComparer); - Assert.Same(objValueComparer, ImmutableSortedTreeDictionary.Create().Add(new object(), null).WithComparers(keyComparer: null, valueComparer: objValueComparer).ValueComparer); + Assert.Same(Comparer.Default, ImmutableSortedTreeDictionary.Create().Add(new object(), null).WithComparers(keyComparer: null, valueComparer: objValueComparer).KeyComparer); + Assert.Same(objValueComparer, ImmutableSortedTreeDictionary.Create().Add(new object(), null).WithComparers(keyComparer: null, valueComparer: objValueComparer).ValueComparer); } [Fact] @@ -285,7 +283,7 @@ public void TestIDictionaryT() Assert.Equal(Enumerable.Range(0, 9), dictionary.Values); Assert.Throws(() => dictionary.Keys.Add(0)); - Assert.Throws("array", () => dictionary.Keys.CopyTo(null, 0)); + Assert.Throws("array", () => dictionary.Keys.CopyTo(null!, 0)); Assert.Throws("arrayIndex", () => dictionary.Keys.CopyTo(new int[dictionary.Count], -1)); Assert.Throws("arrayIndex", () => dictionary.Keys.CopyTo(new int[dictionary.Count], dictionary.Count + 1)); Assert.Throws(() => dictionary.Keys.CopyTo(new int[dictionary.Count], 1)); @@ -303,7 +301,7 @@ public void TestIDictionaryT() Assert.Equal(0, keyEnumerator.Current); Assert.Throws(() => dictionary.Values.Add(0)); - Assert.Throws("array", () => dictionary.Values.CopyTo(null, 0)); + Assert.Throws("array", () => dictionary.Values.CopyTo(null!, 0)); Assert.Throws("arrayIndex", () => dictionary.Values.CopyTo(new int[dictionary.Count], -1)); Assert.Throws("arrayIndex", () => dictionary.Values.CopyTo(new int[dictionary.Count], dictionary.Count + 1)); Assert.Throws(() => dictionary.Values.CopyTo(new int[dictionary.Count], 1)); @@ -357,7 +355,7 @@ public void TestIDictionary() dictionary = Enumerable.Range(0, 11).ToImmutableSortedTreeDictionary(x => x, x => x + 1); - Assert.Throws("key", () => dictionary[key: null]); + Assert.Throws("key", () => dictionary[key: null!]); Assert.Null(dictionary["string key"]); Assert.Equal(11, dictionary[10]); @@ -372,7 +370,7 @@ public void TestIDictionary() Assert.Equal(entries.Select(i => i.Key), dictionary.Keys.Cast()); Assert.Equal(entries.Select(i => i.Value), dictionary.Values.Cast()); - Assert.Throws(() => dictionary.Contains(null)); + Assert.Throws(() => dictionary.Contains(null!)); Assert.False(dictionary.Contains("string value")); Assert.True(dictionary.Contains(10)); @@ -424,7 +422,7 @@ void TestCollection(ICollection collection, Func indexToExpectedValue Assert.True(collection.IsSynchronized); Assert.Same(dictionary, collection.SyncRoot); - Assert.Throws("array", () => collection.CopyTo(null, 0)); + Assert.Throws("array", () => collection.CopyTo(null!, 0)); Assert.Throws(() => collection.CopyTo(new int[collection.Count, 1], 0)); Assert.Throws(() => collection.CopyTo(Array.CreateInstance(typeof(int), lengths: new[] { collection.Count }, lowerBounds: new[] { 1 }), 0)); Assert.Throws("index", () => collection.CopyTo(new int[collection.Count], -1)); diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary.cs index 5736fea..014bdad 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; @@ -12,39 +10,51 @@ namespace TunnelVisionLabs.Collections.Trees.Immutable public static class ImmutableSortedTreeDictionary { public static ImmutableSortedTreeDictionary Create() + where TKey : notnull => ImmutableSortedTreeDictionary.Empty; - public static ImmutableSortedTreeDictionary Create(IComparer keyComparer) + public static ImmutableSortedTreeDictionary Create(IComparer? keyComparer) + where TKey : notnull => ImmutableSortedTreeDictionary.Empty.WithComparers(keyComparer); - public static ImmutableSortedTreeDictionary Create(IComparer keyComparer, IEqualityComparer valueComparer) + public static ImmutableSortedTreeDictionary Create(IComparer? keyComparer, IEqualityComparer? valueComparer) + where TKey : notnull => ImmutableSortedTreeDictionary.Empty.WithComparers(keyComparer, valueComparer); public static ImmutableSortedTreeDictionary.Builder CreateBuilder() + where TKey : notnull => Create().ToBuilder(); - public static ImmutableSortedTreeDictionary.Builder CreateBuilder(IComparer keyComparer) + public static ImmutableSortedTreeDictionary.Builder CreateBuilder(IComparer? keyComparer) + where TKey : notnull => Create(keyComparer).ToBuilder(); - public static ImmutableSortedTreeDictionary.Builder CreateBuilder(IComparer keyComparer, IEqualityComparer valueComparer) + public static ImmutableSortedTreeDictionary.Builder CreateBuilder(IComparer? keyComparer, IEqualityComparer? valueComparer) + where TKey : notnull => Create(keyComparer, valueComparer).ToBuilder(); public static ImmutableSortedTreeDictionary CreateRange(IEnumerable> items) + where TKey : notnull => ImmutableSortedTreeDictionary.Empty.AddRange(items); - public static ImmutableSortedTreeDictionary CreateRange(IComparer keyComparer, IEnumerable> items) + public static ImmutableSortedTreeDictionary CreateRange(IComparer? keyComparer, IEnumerable> items) + where TKey : notnull => ImmutableSortedTreeDictionary.Empty.WithComparers(keyComparer).AddRange(items); - public static ImmutableSortedTreeDictionary CreateRange(IComparer keyComparer, IEqualityComparer valueComparer, IEnumerable> items) + public static ImmutableSortedTreeDictionary CreateRange(IComparer? keyComparer, IEqualityComparer? valueComparer, IEnumerable> items) + where TKey : notnull => ImmutableSortedTreeDictionary.Empty.WithComparers(keyComparer, valueComparer).AddRange(items); public static ImmutableSortedTreeDictionary ToImmutableSortedTreeDictionary(this IEnumerable> items) + where TKey : notnull => ToImmutableSortedTreeDictionary(items, keyComparer: null, valueComparer: null); - public static ImmutableSortedTreeDictionary ToImmutableSortedTreeDictionary(this IEnumerable> items, IComparer keyComparer) + public static ImmutableSortedTreeDictionary ToImmutableSortedTreeDictionary(this IEnumerable> items, IComparer? keyComparer) + where TKey : notnull => ToImmutableSortedTreeDictionary(items, keyComparer, valueComparer: null); - public static ImmutableSortedTreeDictionary ToImmutableSortedTreeDictionary(this IEnumerable> items, IComparer keyComparer, IEqualityComparer valueComparer) + public static ImmutableSortedTreeDictionary ToImmutableSortedTreeDictionary(this IEnumerable> items, IComparer? keyComparer, IEqualityComparer? valueComparer) + where TKey : notnull { if (items is null) throw new ArgumentNullException(nameof(items)); @@ -56,12 +66,15 @@ public static ImmutableSortedTreeDictionary ToImmutableSortedTreeD } public static ImmutableSortedTreeDictionary ToImmutableSortedTreeDictionary(this IEnumerable source, Func keySelector, Func elementSelector) + where TKey : notnull => ToImmutableSortedTreeDictionary(source, keySelector, elementSelector, keyComparer: null, valueComparer: null); - public static ImmutableSortedTreeDictionary ToImmutableSortedTreeDictionary(this IEnumerable source, Func keySelector, Func elementSelector, IComparer keyComparer) + public static ImmutableSortedTreeDictionary ToImmutableSortedTreeDictionary(this IEnumerable source, Func keySelector, Func elementSelector, IComparer? keyComparer) + where TKey : notnull => ToImmutableSortedTreeDictionary(source, keySelector, elementSelector, keyComparer, valueComparer: null); - public static ImmutableSortedTreeDictionary ToImmutableSortedTreeDictionary(this IEnumerable source, Func keySelector, Func elementSelector, IComparer keyComparer, IEqualityComparer valueComparer) + public static ImmutableSortedTreeDictionary ToImmutableSortedTreeDictionary(this IEnumerable source, Func keySelector, Func elementSelector, IComparer? keyComparer, IEqualityComparer? valueComparer) + where TKey : notnull { if (source is null) throw new ArgumentNullException(nameof(source)); diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+Builder+KeyCollection.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+Builder+KeyCollection.cs index 2a64348..2ba7d0a 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+Builder+KeyCollection.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+Builder+KeyCollection.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+Builder+ValueCollection.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+Builder+ValueCollection.cs index baf3549..8e94327 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+Builder+ValueCollection.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+Builder+ValueCollection.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; @@ -77,7 +75,7 @@ void ICollection.CopyTo(Array array, int index) { CopyTo(values, index); } - else if (array is object[] objects) + else if (array is object?[] objects) { try { diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+Builder.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+Builder.cs index 7446448..cfa5daa 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+Builder.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+Builder.cs @@ -1,13 +1,12 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; using System.Collections; using System.Collections.Generic; + using System.Diagnostics.CodeAnalysis; using System.Linq; public partial class ImmutableSortedTreeDictionary @@ -67,12 +66,12 @@ public TValue this[TKey key] set { - _treeSetBuilder.Remove(new KeyValuePair(key, default)); + _treeSetBuilder.Remove(new KeyValuePair(key, default!)); _treeSetBuilder.Add(new KeyValuePair(key, value)); } } - object IDictionary.this[object key] + object? IDictionary.this[object key] { get { @@ -99,7 +98,7 @@ object IDictionary.this[object key] var typedKey = (TKey)key; try { - this[typedKey] = (TValue)value; + this[typedKey] = (TValue)value!; } catch (InvalidCastException) { @@ -146,7 +145,7 @@ public bool Contains(KeyValuePair item) } public bool ContainsKey(TKey key) - => _treeSetBuilder.Contains(new KeyValuePair(key, default)); + => _treeSetBuilder.Contains(new KeyValuePair(key, default!)); public bool ContainsValue(TValue value) => _treeSetBuilder.Any(pair => ValueComparer.Equals(pair.Value, value)); @@ -154,8 +153,14 @@ public bool ContainsValue(TValue value) public Enumerator GetEnumerator() => new Enumerator(_treeSetBuilder.GetEnumerator(), Enumerator.ReturnType.KeyValuePair); + [return: MaybeNull] public TValue GetValueOrDefault(TKey key) - => GetValueOrDefault(key, default); + { + if (TryGetValue(key, out TValue value)) + return value; + + return default; + } public TValue GetValueOrDefault(TKey key, TValue defaultValue) { @@ -166,7 +171,7 @@ public TValue GetValueOrDefault(TKey key, TValue defaultValue) } public bool Remove(TKey key) - => _treeSetBuilder.Remove(new KeyValuePair(key, default)); + => _treeSetBuilder.Remove(new KeyValuePair(key, default!)); public bool Remove(KeyValuePair item) { @@ -184,13 +189,13 @@ public void RemoveRange(IEnumerable keys) if (keys is null) throw new ArgumentNullException(nameof(keys)); - _treeSetBuilder.ExceptWith(keys.Select(key => new KeyValuePair(key, default))); + _treeSetBuilder.ExceptWith(keys.Select(key => new KeyValuePair(key, default!))); } - public bool TryGetKey(TKey equalKey, out TKey actualKey) + public bool TryGetKey(TKey equalKey, [MaybeNullWhen(false)] out TKey actualKey) => ToImmutable().TryGetKey(equalKey, out actualKey); - public bool TryGetValue(TKey key, out TValue value) + public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value) => ToImmutable().TryGetValue(key, out value); public ImmutableSortedTreeDictionary ToImmutable() @@ -224,7 +229,7 @@ bool IDictionary.Contains(object key) return key is TKey typedKey && ContainsKey(typedKey); } - void IDictionary.Add(object key, object value) + void IDictionary.Add(object key, object? value) { if (key == null) throw new ArgumentNullException(nameof(key)); @@ -236,7 +241,7 @@ void IDictionary.Add(object key, object value) var typedKey = (TKey)key; try { - Add(typedKey, (TValue)value); + Add(typedKey, (TValue)value!); } catch (InvalidCastException) { diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+Enumerator.cs index 9f8b005..4e360ca 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+Enumerator.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System.Collections; @@ -47,7 +45,7 @@ internal enum ReturnType object IDictionaryEnumerator.Key => Current.Key; - object IDictionaryEnumerator.Value => Current.Value; + object? IDictionaryEnumerator.Value => Current.Value; public void Dispose() => _enumerator.Dispose(); diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+KeyCollection+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+KeyCollection+Enumerator.cs index 30fb846..7d9a88d 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+KeyCollection+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+KeyCollection+Enumerator.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System.Collections; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+KeyCollection.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+KeyCollection.cs index d7ded25..dc85b21 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+KeyCollection.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+KeyCollection.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+ValueCollection+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+ValueCollection+Enumerator.cs index e66c8c6..c05e5e6 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+ValueCollection+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+ValueCollection+Enumerator.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System.Collections; @@ -23,7 +21,7 @@ internal Enumerator(ImmutableSortedTreeDictionary.Enumerator enume public TValue Current => _enumerator.Current.Value; - object IEnumerator.Current => Current; + object? IEnumerator.Current => Current; public void Dispose() => _enumerator.Dispose(); diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+ValueCollection.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+ValueCollection.cs index 01eb4af..5c81f2c 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+ValueCollection.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2+ValueCollection.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; @@ -72,7 +70,7 @@ void ICollection.CopyTo(Array array, int index) { ((ICollection)this).CopyTo(values, index); } - else if (array is object[] objects) + else if (array is object?[] objects) { try { diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2.cs index ed0e9a0..bf11afc 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeDictionary`2.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; @@ -10,9 +8,11 @@ namespace TunnelVisionLabs.Collections.Trees.Immutable using System.Collections.Generic; using System.Collections.Immutable; using System.Diagnostics; + using System.Diagnostics.CodeAnalysis; using System.Linq; public sealed partial class ImmutableSortedTreeDictionary : IImmutableDictionary, IDictionary, IReadOnlyDictionary, IDictionary + where TKey : notnull { public static readonly ImmutableSortedTreeDictionary Empty = new ImmutableSortedTreeDictionary(ImmutableSortedTreeSet>.Empty.WithComparer(KeyOfPairComparer.Default), keyComparer: null, valueComparer: null); @@ -21,7 +21,7 @@ public static readonly ImmutableSortedTreeDictionary Empty private readonly IComparer _keyComparer; private readonly IEqualityComparer _valueComparer; - private ImmutableSortedTreeDictionary(ImmutableSortedTreeSet> treeSet, IComparer keyComparer, IEqualityComparer valueComparer) + private ImmutableSortedTreeDictionary(ImmutableSortedTreeSet> treeSet, IComparer? keyComparer, IEqualityComparer? valueComparer) { keyComparer = keyComparer ?? Comparer.Default; valueComparer = valueComparer ?? EqualityComparer.Default; @@ -73,7 +73,7 @@ public TValue this[TKey key] { get { - if (!_treeSet.TryGetValue(new KeyValuePair(key, default), out KeyValuePair value)) + if (!_treeSet.TryGetValue(new KeyValuePair(key, default!), out KeyValuePair value)) throw new KeyNotFoundException(); return value.Value; @@ -86,7 +86,7 @@ TValue IDictionary.this[TKey key] set => throw new NotSupportedException(); } - object IDictionary.this[object key] + object? IDictionary.this[object key] { get { @@ -145,7 +145,7 @@ public bool Contains(KeyValuePair pair) } public bool ContainsKey(TKey key) - => _treeSet.Contains(new KeyValuePair(key, default)); + => _treeSet.Contains(new KeyValuePair(key, default!)); public bool ContainsValue(TValue value) => _treeSet.Any(pair => ValueComparer.Equals(pair.Value, value)); @@ -155,7 +155,7 @@ public Enumerator GetEnumerator() public ImmutableSortedTreeDictionary Remove(TKey key) { - ImmutableSortedTreeSet> result = _treeSet.Remove(new KeyValuePair(key, default)); + ImmutableSortedTreeSet> result = _treeSet.Remove(new KeyValuePair(key, default!)); if (result == _treeSet) { return this; @@ -169,7 +169,7 @@ public ImmutableSortedTreeDictionary RemoveRange(IEnumerable if (keys is null) throw new ArgumentNullException(nameof(keys)); - ImmutableSortedTreeSet> result = _treeSet.Except(keys.Select(key => new KeyValuePair(key, default))); + ImmutableSortedTreeSet> result = _treeSet.Except(keys.Select(key => new KeyValuePair(key, default!))); if (result == _treeSet) { return this; @@ -195,9 +195,11 @@ public ImmutableSortedTreeDictionary SetItems(IEnumerable(equalKey, default), out KeyValuePair value)) + if (!_treeSet.TryGetValue(new KeyValuePair(equalKey, default!), out KeyValuePair value)) { actualKey = default; return false; @@ -207,9 +209,9 @@ public bool TryGetKey(TKey equalKey, out TKey actualKey) return true; } - public bool TryGetValue(TKey key, out TValue value) + public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value) { - if (!_treeSet.TryGetValue(new KeyValuePair(key, default), out KeyValuePair actualValue)) + if (!_treeSet.TryGetValue(new KeyValuePair(key, default!), out KeyValuePair actualValue)) { value = default; return false; @@ -219,10 +221,10 @@ public bool TryGetValue(TKey key, out TValue value) return true; } - public ImmutableSortedTreeDictionary WithComparers(IComparer keyComparer) + public ImmutableSortedTreeDictionary WithComparers(IComparer? keyComparer) => WithComparers(keyComparer, valueComparer: null); - public ImmutableSortedTreeDictionary WithComparers(IComparer keyComparer, IEqualityComparer valueComparer) + public ImmutableSortedTreeDictionary WithComparers(IComparer? keyComparer, IEqualityComparer? valueComparer) { keyComparer = keyComparer ?? Comparer.Default; valueComparer = valueComparer ?? EqualityComparer.Default; @@ -356,7 +358,7 @@ void ICollection.CopyTo(Array array, int index) bool ICollection>.Remove(KeyValuePair item) => throw new NotSupportedException(); - void IDictionary.Add(object key, object value) => throw new NotSupportedException(); + void IDictionary.Add(object key, object? value) => throw new NotSupportedException(); void IDictionary.Clear() => throw new NotSupportedException(); diff --git a/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt b/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt index 8e2321c..654495c 100644 --- a/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt +++ b/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt @@ -1,12 +1,12 @@ #nullable enable TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Add(TKey key, TValue value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.AddRange(System.Collections.Generic.IEnumerable> pairs) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Add(TKey key, TValue value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.AddRange(System.Collections.Generic.IEnumerable>! pairs) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.Add(System.Collections.Generic.KeyValuePair item) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.Add(TKey key, TValue value) -> void -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.AddRange(System.Collections.Generic.IEnumerable> items) -> void +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.AddRange(System.Collections.Generic.IEnumerable>! items) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.Clear() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.Contains(System.Collections.Generic.KeyValuePair item) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.ContainsKey(TKey key) -> bool @@ -18,29 +18,29 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.KeyCollection TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.KeyCollection.Clear() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.KeyCollection.Contains(TKey item) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.KeyCollection.CopyTo(TKey[] array, int arrayIndex) -> void +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.KeyCollection.CopyTo(TKey[]! array, int arrayIndex) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.KeyCollection.Count.get -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.KeyCollection.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.KeyCollection.Enumerator TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.KeyCollection.Remove(TKey item) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.KeyComparer.get -> System.Collections.Generic.IComparer +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.KeyComparer.get -> System.Collections.Generic.IComparer! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.Keys.get -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.KeyCollection TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.Remove(System.Collections.Generic.KeyValuePair item) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.Remove(TKey key) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.RemoveRange(System.Collections.Generic.IEnumerable keys) -> void -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.ToImmutable() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.RemoveRange(System.Collections.Generic.IEnumerable! keys) -> void +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.ToImmutable() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.TryGetKey(TKey equalKey, out TKey actualKey) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.TryGetValue(TKey key, out TValue value) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.ValueCollection TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.ValueCollection.Clear() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.ValueCollection.Contains(TValue item) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.ValueCollection.CopyTo(TValue[] array, int arrayIndex) -> void +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.ValueCollection.CopyTo(TValue[]! array, int arrayIndex) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.ValueCollection.Count.get -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.ValueCollection.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ValueCollection.Enumerator -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.ValueComparer.get -> System.Collections.Generic.IEqualityComparer +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.ValueComparer.get -> System.Collections.Generic.IEqualityComparer! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.Values.get -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.ValueCollection TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.this[TKey key].get -> TValue TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder.this[TKey key].set -> void -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Clear() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Clear() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Contains(System.Collections.Generic.KeyValuePair pair) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ContainsKey(TKey key) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ContainsValue(TValue value) -> bool @@ -61,13 +61,13 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.KeyCollection.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.KeyCollection.Enumerator.Reset() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.KeyCollection.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.KeyCollection.Enumerator -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.KeyComparer.get -> System.Collections.Generic.IComparer +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.KeyComparer.get -> System.Collections.Generic.IComparer! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Keys.get -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.KeyCollection -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Remove(TKey key) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.RemoveRange(System.Collections.Generic.IEnumerable keys) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.SetItem(TKey key, TValue value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.SetItems(System.Collections.Generic.IEnumerable> items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ToBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Remove(TKey key) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.RemoveRange(System.Collections.Generic.IEnumerable! keys) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.SetItem(TKey key, TValue value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.SetItems(System.Collections.Generic.IEnumerable>! items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ToBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.TryGetKey(TKey equalKey, out TKey actualKey) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.TryGetValue(TKey key, out TValue value) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ValueCollection @@ -79,10 +79,10 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ValueCollection.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ValueCollection.Enumerator.Reset() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ValueCollection.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ValueCollection.Enumerator -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ValueComparer.get -> System.Collections.Generic.IEqualityComparer +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ValueComparer.get -> System.Collections.Generic.IEqualityComparer! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Values.get -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ValueCollection -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.WithComparers(System.Collections.Generic.IComparer keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.WithComparers(System.Collections.Generic.IComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.WithComparers(System.Collections.Generic.IComparer? keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.WithComparers(System.Collections.Generic.IComparer? keyComparer, System.Collections.Generic.IEqualityComparer? valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.this[TKey key].get -> TValue TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet @@ -715,21 +715,21 @@ TunnelVisionLabs.Collections.Trees.TreeStack.TreeStack(int branchingFactor) - TunnelVisionLabs.Collections.Trees.TreeStack.TrimExcess() -> void TunnelVisionLabs.Collections.Trees.TreeStack.TryPeek(out T result) -> bool TunnelVisionLabs.Collections.Trees.TreeStack.TryPop(out T result) -> bool -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Create() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Create(System.Collections.Generic.IComparer keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Create(System.Collections.Generic.IComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.CreateBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.CreateBuilder(System.Collections.Generic.IComparer keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.CreateBuilder(System.Collections.Generic.IComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.CreateRange(System.Collections.Generic.IComparer keyComparer, System.Collections.Generic.IEnumerable> items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.CreateRange(System.Collections.Generic.IComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer, System.Collections.Generic.IEnumerable> items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.CreateRange(System.Collections.Generic.IEnumerable> items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ToImmutableSortedTreeDictionary(this System.Collections.Generic.IEnumerable> items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ToImmutableSortedTreeDictionary(this System.Collections.Generic.IEnumerable> items, System.Collections.Generic.IComparer keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ToImmutableSortedTreeDictionary(this System.Collections.Generic.IEnumerable> items, System.Collections.Generic.IComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ToImmutableSortedTreeDictionary(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Func elementSelector) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ToImmutableSortedTreeDictionary(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Func elementSelector, System.Collections.Generic.IComparer keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ToImmutableSortedTreeDictionary(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Func elementSelector, System.Collections.Generic.IComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Create() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Create(System.Collections.Generic.IComparer? keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Create(System.Collections.Generic.IComparer? keyComparer, System.Collections.Generic.IEqualityComparer? valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.CreateBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.CreateBuilder(System.Collections.Generic.IComparer? keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.CreateBuilder(System.Collections.Generic.IComparer? keyComparer, System.Collections.Generic.IEqualityComparer? valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Builder! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.CreateRange(System.Collections.Generic.IComparer? keyComparer, System.Collections.Generic.IEnumerable>! items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.CreateRange(System.Collections.Generic.IComparer? keyComparer, System.Collections.Generic.IEqualityComparer? valueComparer, System.Collections.Generic.IEnumerable>! items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.CreateRange(System.Collections.Generic.IEnumerable>! items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ToImmutableSortedTreeDictionary(this System.Collections.Generic.IEnumerable>! items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ToImmutableSortedTreeDictionary(this System.Collections.Generic.IEnumerable>! items, System.Collections.Generic.IComparer? keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ToImmutableSortedTreeDictionary(this System.Collections.Generic.IEnumerable>! items, System.Collections.Generic.IComparer? keyComparer, System.Collections.Generic.IEqualityComparer? valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ToImmutableSortedTreeDictionary(this System.Collections.Generic.IEnumerable! source, System.Func! keySelector, System.Func! elementSelector) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ToImmutableSortedTreeDictionary(this System.Collections.Generic.IEnumerable! source, System.Func! keySelector, System.Func! elementSelector, System.Collections.Generic.IComparer? keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ToImmutableSortedTreeDictionary(this System.Collections.Generic.IEnumerable! source, System.Func! keySelector, System.Func! elementSelector, System.Collections.Generic.IComparer? keyComparer, System.Collections.Generic.IEqualityComparer? valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary! ~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Create() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet ~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Create(System.Collections.Generic.IComparer comparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet ~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Create(System.Collections.Generic.IComparer comparer, T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet @@ -788,7 +788,7 @@ TunnelVisionLabs.Collections.Trees.TreeStack.TryPop(out T result) -> bool ~static TunnelVisionLabs.Collections.Trees.SortedTreeSet.CreateSetComparer() -> System.Collections.Generic.IEqualityComparer> ~static TunnelVisionLabs.Collections.Trees.SortedTreeSet.CreateSetComparer(System.Collections.Generic.IEqualityComparer memberEqualityComparer) -> System.Collections.Generic.IEqualityComparer> ~static TunnelVisionLabs.Collections.Trees.TreeSet.CreateSetComparer() -> System.Collections.Generic.IEqualityComparer> -~static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary +static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary! ~static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet ~static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary ~static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList From 7017d3c2853a836b2c76f744a3afce298a579284 Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Sat, 18 Jul 2020 23:09:12 -0700 Subject: [PATCH 08/23] Enable nullable reference types for ImmutableSortedTreeList --- .../ImmutableSortedTreeListBuilderTest.cs | 38 +++--- .../ImmutableSortedTreeListTest+ForEach.cs | 8 +- .../ImmutableSortedTreeListTest+GetRange.cs | 2 - .../Immutable/ImmutableSortedTreeListTest.cs | 126 +++++++++--------- .../Immutable/ImmutableSortedTreeList.cs | 14 +- .../ImmutableSortedTreeList`1+Builder.cs | 24 ++-- .../ImmutableSortedTreeList`1+Enumerator.cs | 4 +- .../Immutable/ImmutableSortedTreeList`1.cs | 35 ++--- 8 files changed, 121 insertions(+), 130 deletions(-) diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeListBuilderTest.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeListBuilderTest.cs index 1b35c83..24ca6dd 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeListBuilderTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeListBuilderTest.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; @@ -23,7 +21,7 @@ public void TestSortedTreeListBuilderConstructor() Assert.Empty(list); Assert.Equal(Comparer.Default, list.Comparer); - ImmutableSortedTreeList.Builder stringList = ImmutableSortedTreeList.CreateBuilder(StringComparer.Ordinal); + ImmutableSortedTreeList.Builder stringList = ImmutableSortedTreeList.CreateBuilder(StringComparer.Ordinal); Assert.Same(StringComparer.Ordinal, stringList.Comparer); stringList = ImmutableSortedTreeList.CreateBuilder(StringComparer.OrdinalIgnoreCase); @@ -110,7 +108,7 @@ private static void TestIListInterfaceImpl(IList list, bool supportsNullValues) list.Remove("Text"); Assert.Equal(originalCount, list.Count); - object removedItem = list[0]; + object? removedItem = list[0]; list.Remove(list[0]); Assert.Equal(originalCount - 1, list.Count); Assert.True(list.Contains(removedItem)); @@ -242,7 +240,7 @@ public void TestIndexer() public void TestCopyToValidation() { var list = ImmutableSortedTreeList.CreateRange(Enumerable.Range(0, 10)).ToBuilder(); - Assert.Throws("array", () => list.CopyTo(0, null, 0, list.Count)); + Assert.Throws("array", () => list.CopyTo(0, null!, 0, list.Count)); Assert.Throws("index", () => list.CopyTo(-1, new int[list.Count], 0, list.Count)); Assert.Throws("arrayIndex", () => list.CopyTo(0, new int[list.Count], -1, list.Count)); Assert.Throws("count", () => list.CopyTo(0, new int[list.Count], 0, -1)); @@ -316,7 +314,7 @@ public void TestAddRange() int[] actual = list.ToArray(); Assert.Equal(expected, actual); - Assert.Throws(() => list.AddRange(null)); + Assert.Throws(() => list.AddRange(null!)); } [Fact] @@ -391,8 +389,8 @@ public void TestForEach() var list = ImmutableSortedTreeList.CreateRange(comparer: null, Enumerable.Range(0, 100)).ToBuilder(); var reference = new List(Enumerable.Range(0, 100)); - Assert.Throws("action", () => list.ForEach(null)); - Assert.Throws(() => reference.ForEach(null)); + Assert.Throws("action", () => list.ForEach(null!)); + Assert.Throws(() => reference.ForEach(null!)); var listOutput = new List(); var referenceOutput = new List(); @@ -543,9 +541,9 @@ public void TestFindIndex() reference.Sort(); - Assert.Throws(() => list.FindIndex(null)); - Assert.Throws(() => list.FindIndex(0, null)); - Assert.Throws(() => list.FindIndex(0, 0, null)); + Assert.Throws(() => list.FindIndex(null!)); + Assert.Throws(() => list.FindIndex(0, null!)); + Assert.Throws(() => list.FindIndex(0, 0, null!)); Assert.Throws(() => list.FindIndex(-1, i => true)); Assert.Throws(() => list.FindIndex(0, -1, i => true)); @@ -585,9 +583,9 @@ public void TestFindLastIndex() reference.Sort(); - Assert.Throws(() => list.FindLastIndex(null)); - Assert.Throws(() => list.FindLastIndex(-1, null)); - Assert.Throws(() => list.FindLastIndex(-1, 0, null)); + Assert.Throws(() => list.FindLastIndex(null!)); + Assert.Throws(() => list.FindLastIndex(-1, null!)); + Assert.Throws(() => list.FindLastIndex(-1, 0, null!)); Assert.Throws(() => list.FindLastIndex(list.Count, i => true)); Assert.Throws(() => list.FindLastIndex(list.Count - 1, -1, i => true)); @@ -733,7 +731,7 @@ public void TestRemoveValue() public void TestRemoveAll() { var list = ImmutableSortedTreeList.CreateRange(comparer: null, Enumerable.Range(0, 10)).ToBuilder(); - Assert.Throws(() => list.RemoveAll(null)); + Assert.Throws(() => list.RemoveAll(null!)); Assert.Equal(5, list.RemoveAll(i => (i % 2) == 0)); Assert.Equal(new[] { 1, 3, 5, 7, 9 }, list); @@ -745,7 +743,7 @@ public void TestRemoveAll() public void TestExists() { var list = ImmutableSortedTreeList.CreateRange(comparer: null, Enumerable.Range(0, 10)).ToBuilder(); - Assert.Throws(() => list.Exists(null)); + Assert.Throws(() => list.Exists(null!)); Assert.False(list.Exists(value => value < 0)); foreach (var i in list) @@ -760,7 +758,7 @@ public void TestExists() public void TestFind() { var list = ImmutableSortedTreeList.CreateRange(comparer: null, Enumerable.Range(1, 10)).ToBuilder(); - Assert.Throws(() => list.Find(null)); + Assert.Throws(() => list.Find(null!)); Assert.Equal(0, list.Find(value => value < 0)); foreach (var i in list) @@ -775,7 +773,7 @@ public void TestFind() public void TestFindAll() { var list = ImmutableSortedTreeList.CreateRange(comparer: null, Enumerable.Range(0, 10)).ToBuilder(); - Assert.Throws(() => list.FindAll(null)); + Assert.Throws(() => list.FindAll(null!)); ImmutableSortedTreeList found = list.FindAll(i => (i % 2) == 0); @@ -791,7 +789,7 @@ public void TestFindLast() { var list = ImmutableSortedTreeList.CreateRange(comparer: null, Enumerable.Range(1, 10)).ToBuilder(); var reference = new List(Enumerable.Range(1, 10)); - Assert.Throws(() => list.FindLast(null)); + Assert.Throws(() => list.FindLast(null!)); Assert.Equal(0, list.FindLast(i => i < 0)); Assert.Equal(0, reference.FindLast(i => i < 0)); @@ -826,7 +824,7 @@ public void TestTrueForAll() { ImmutableSortedTreeList.Builder list = ImmutableSortedTreeList.CreateBuilder(); Assert.True(list.TrueForAll(i => false)); - Assert.Throws(() => list.TrueForAll(null)); + Assert.Throws(() => list.TrueForAll(null!)); list.Add(1); Assert.True(list.TrueForAll(i => i > 0)); diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeListTest+ForEach.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeListTest+ForEach.cs index d3701ad..4e09c81 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeListTest+ForEach.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeListTest+ForEach.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; @@ -60,15 +58,15 @@ public void NegTest1() { int[] iArray = { 1, 9, 3, 6, -1, 8, 7, 1, 2, 4 }; var listObject = ImmutableSortedTreeList.Create(iArray); - Action action = null; - Assert.Throws(() => listObject.ForEach(action)); + Action? action = null; + Assert.Throws(() => listObject.ForEach(action!)); } public class MyClass { public int Sum { get; set; } = 0; - public string Result + public string? Result { get; set; } diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeListTest+GetRange.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeListTest+GetRange.cs index af9b9b9..c087629 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeListTest+GetRange.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeListTest+GetRange.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeListTest.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeListTest.cs index 381c65e..e98b2be 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeListTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeListTest.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; @@ -76,8 +74,8 @@ public void TestMultipleElementList() [Fact] public void TestImmutableSortedTreeListCreateValidation() { - Assert.Throws("items", () => ImmutableSortedTreeList.Create(default(int[]))); - Assert.Throws("items", () => ImmutableSortedTreeList.Create(Comparer.Default, default(int[]))); + Assert.Throws("items", () => ImmutableSortedTreeList.Create(default(int[])!)); + Assert.Throws("items", () => ImmutableSortedTreeList.Create(Comparer.Default, default(int[])!)); } [Fact] @@ -91,10 +89,10 @@ public void TestImmutableSortedTreeListCreateRange() [Fact] public void TestImmutableSortedTreeListCreateRangeValidation() { - Assert.Throws("items", () => ImmutableSortedTreeList.CreateRange(null)); - Assert.Throws("items", () => ImmutableSortedTreeList.CreateRange(Comparer.Default, null)); - Assert.Throws("items", () => default(IEnumerable).ToImmutableSortedTreeList()); - Assert.Throws("items", () => default(IEnumerable).ToImmutableSortedTreeList(Comparer.Default)); + Assert.Throws("items", () => ImmutableSortedTreeList.CreateRange(null!)); + Assert.Throws("items", () => ImmutableSortedTreeList.CreateRange(Comparer.Default, null!)); + Assert.Throws("items", () => default(IEnumerable)!.ToImmutableSortedTreeList()); + Assert.Throws("items", () => default(IEnumerable)!.ToImmutableSortedTreeList(Comparer.Default)); } [Fact] @@ -184,29 +182,29 @@ private static void TestIListTInterfaceImpl(IList list, bool supportsNullV { Assert.True(list.IsReadOnly); - Assert.Equal(600, list[0]); - Assert.Equal(601, list[1]); + Assert.Equal(600, list[0]); + Assert.Equal(601, list[1]); Assert.True(list.Contains((T)(object)600)); - Assert.False(list.Contains(default)); + Assert.False(list.Contains(default!)); Assert.Equal(0, list.IndexOf((T)(object)600)); Assert.Equal(1, list.IndexOf((T)(object)601)); - Assert.Equal(-1, list.IndexOf(default)); + Assert.Equal(-1, list.IndexOf(default!)); Assert.Throws(() => list[-1]); - Assert.Throws(() => list[-1] = default); + Assert.Throws(() => list[-1] = default!); Assert.Throws(() => list[list.Count]); - Assert.Throws(() => list[list.Count] = default); - Assert.Throws(() => list.Insert(-1, default)); - Assert.Throws(() => list.Insert(list.Count + 1, default)); + Assert.Throws(() => list[list.Count] = default!); + Assert.Throws(() => list.Insert(-1, default!)); + Assert.Throws(() => list.Insert(list.Count + 1, default!)); Assert.NotEqual(list[1], list[0]); Assert.Throws(() => list.Insert(0, list[0])); Assert.NotEqual(list[1], list[0]); int originalCount = list.Count; - Assert.Throws(() => list.Remove(default)); + Assert.Throws(() => list.Remove(default!)); Assert.Equal(originalCount, list.Count); Assert.Throws(() => list.RemoveAt(0)); Assert.Equal(originalCount, list.Count); @@ -218,27 +216,27 @@ private static void TestIListTInterfaceImpl(IList list, bool supportsNullV if (supportsNullValues) { - Assert.Throws(() => list.Add(default)); - Assert.NotEqual(default, list[list.Count - 1]); - Assert.False(list.Contains(default)); + Assert.Throws(() => list.Add(default!)); + Assert.NotEqual(default!, list[list.Count - 1]); + Assert.False(list.Contains(default!)); Assert.Equal(list.Count - 1, list.IndexOf((T)(object)601)); - Assert.Throws(() => list[list.Count - 1] = default); + Assert.Throws(() => list[list.Count - 1] = default!); Assert.Equal((T)(object)601, list[list.Count - 1]); - Assert.False(list.Contains(default)); - Assert.Equal(-1, list.IndexOf(default)); + Assert.False(list.Contains(default!)); + Assert.Equal(-1, list.IndexOf(default!)); - Assert.Throws(() => list[list.Count - 1] = default); - Assert.NotEqual(default, list[list.Count - 1]); + Assert.Throws(() => list[list.Count - 1] = default!); + Assert.NotEqual(default!, list[list.Count - 1]); } else { // In the face of two errors, verify consistent behavior - Assert.Throws(() => list[list.Count] = default); - Assert.Throws(() => list.Insert(-1, default)); + Assert.Throws(() => list[list.Count] = default!); + Assert.Throws(() => list.Insert(-1, default!)); - Assert.Throws(() => list.Add(default)); - Assert.Throws(() => list[list.Count - 1] = default); + Assert.Throws(() => list.Add(default!)); + Assert.Throws(() => list[list.Count - 1] = default!); Assert.Throws(() => list.Add(Activator.CreateInstance())); Assert.Throws(() => list[list.Count - 1] = Activator.CreateInstance()); Assert.Throws(() => list.Insert(0, Activator.CreateInstance())); @@ -277,7 +275,7 @@ private static void TestICollectionInterfaceImpl(ICollection collection, bool su Assert.NotNull(collection.SyncRoot); Assert.Same(collection, collection.SyncRoot); - Assert.Throws("array", () => collection.CopyTo(null, 0)); + Assert.Throws("array", () => collection.CopyTo(null!, 0)); Assert.Throws(() => collection.CopyTo(new int[collection.Count, 1], 0)); void CopyToArrayWithNonZeroLowerBound() => collection.CopyTo(Array.CreateInstance(typeof(int), lengths: new[] { collection.Count }, lowerBounds: new[] { 1 }), 0); @@ -360,45 +358,45 @@ private static void TestICollectionTInterfaceImpl(ICollection collection, var copy = new T[collection.Count]; Assert.Throws(() => collection.CopyTo(copy, -1)); - Assert.All(copy, item => Assert.Equal(default, item)); + Assert.All(copy, item => Assert.Equal(default!, item)); Assert.Throws(() => collection.CopyTo(copy, 1)); - Assert.All(copy, item => Assert.Equal(default, item)); + Assert.All(copy, item => Assert.Equal(default!, item)); collection.CopyTo(copy, 0); - Assert.Equal(600, copy[0]); - Assert.Equal(601, copy[1]); + Assert.Equal(600, copy[0]); + Assert.Equal(601, copy[1]); copy = new T[collection.Count + 2]; collection.CopyTo(copy, 1); - Assert.Equal(default, copy[0]); - Assert.Equal(600, copy[1]); - Assert.Equal(601, copy[2]); - Assert.Equal(default, copy[3]); + Assert.Equal(default!, copy[0]); + Assert.Equal(600, copy[1]); + Assert.Equal(601, copy[2]); + Assert.Equal(default!, copy[3]); } else { var copy = new T[collection.Count]; Assert.Throws(() => collection.CopyTo(copy, -1)); - Assert.All(copy, item => Assert.Equal(default, item)); + Assert.All(copy, item => Assert.Equal(default!, item)); Assert.Throws(() => collection.CopyTo(copy, 1)); - Assert.All(copy, item => Assert.Equal(default, item)); + Assert.All(copy, item => Assert.Equal(default!, item)); collection.CopyTo(copy, 0); - Assert.Equal(600, copy[0]); - Assert.Equal(601, copy[1]); + Assert.Equal(600, copy[0]); + Assert.Equal(601, copy[1]); copy = new T[collection.Count + 2]; collection.CopyTo(copy, 1); - Assert.Equal(default, copy[0]); - Assert.Equal(600, copy[1]); - Assert.Equal(601, copy[2]); - Assert.Equal(default, copy[3]); + Assert.Equal(default!, copy[0]); + Assert.Equal(600, copy[1]); + Assert.Equal(601, copy[2]); + Assert.Equal(default!, copy[3]); } Assert.Throws(() => collection.Clear()); - Assert.Throws(() => collection.Add(default)); - Assert.Throws(() => collection.Remove(default)); + Assert.Throws(() => collection.Add(default!)); + Assert.Throws(() => collection.Remove(default!)); } [Fact] @@ -416,8 +414,8 @@ public void TestIndexer() public void TestCopyToValidation() { ImmutableSortedTreeList list = ImmutableSortedTreeList.CreateRange(Enumerable.Range(0, 10)); - Assert.Throws("array", () => list.CopyTo(null)); - Assert.Throws("array", () => list.CopyTo(0, null, 0, list.Count)); + Assert.Throws("array", () => list.CopyTo(null!)); + Assert.Throws("array", () => list.CopyTo(0, null!, 0, list.Count)); Assert.Throws("index", () => list.CopyTo(-1, new int[list.Count], 0, list.Count)); Assert.Throws("arrayIndex", () => list.CopyTo(0, new int[list.Count], -1, list.Count)); Assert.Throws("count", () => list.CopyTo(0, new int[list.Count], 0, -1)); @@ -500,7 +498,7 @@ public void TestAddRange() ImmutableSortedTreeList list = ImmutableSortedTreeList.Create(); CollectionAssert.EnumeratorNotInvalidated(list, () => list = list.AddRange(expected)); - Assert.Throws("items", () => list.AddRange(null)); + Assert.Throws("items", () => list.AddRange(null!)); CollectionAssert.EnumeratorNotInvalidated(list, () => list.AddRange(Enumerable.Empty())); Assert.Equal(expected.Length, list.Count); @@ -693,9 +691,9 @@ public void TestFindIndex() reference.Add(i); } - Assert.Throws(() => list.FindIndex(null)); - Assert.Throws(() => list.FindIndex(0, null)); - Assert.Throws(() => list.FindIndex(0, 0, null)); + Assert.Throws(() => list.FindIndex(null!)); + Assert.Throws(() => list.FindIndex(0, null!)); + Assert.Throws(() => list.FindIndex(0, 0, null!)); Assert.Throws(() => list.FindIndex(-1, i => true)); Assert.Throws(() => list.FindIndex(0, -1, i => true)); @@ -732,9 +730,9 @@ public void TestFindLastIndex() reference.Add(i); } - Assert.Throws(() => list.FindLastIndex(null)); - Assert.Throws(() => list.FindLastIndex(-1, null)); - Assert.Throws(() => list.FindLastIndex(-1, 0, null)); + Assert.Throws(() => list.FindLastIndex(null!)); + Assert.Throws(() => list.FindLastIndex(-1, null!)); + Assert.Throws(() => list.FindLastIndex(-1, 0, null!)); Assert.Throws(() => list.FindLastIndex(list.Count, i => true)); Assert.Throws(() => list.FindLastIndex(list.Count - 1, -1, i => true)); @@ -830,7 +828,7 @@ public void TestRemoveRangeItems() Assert.IsType>(prunedViaInterface); Assert.Equal(referencePruned, prunedViaInterface); - Assert.Throws("items", () => list.RemoveRange(items: null)); + Assert.Throws("items", () => list.RemoveRange(items: null!)); Assert.Throws("items", () => ((IImmutableList)list).RemoveRange(items: null, equalityComparer: null)); } @@ -986,7 +984,7 @@ public void TestReplaceValue() public void TestRemoveAll() { var list = ImmutableSortedTreeList.CreateRange(Enumerable.Range(0, 20)); - Assert.Throws(() => list.RemoveAll(null)); + Assert.Throws(() => list.RemoveAll(null!)); Assert.Equal(10, list.Count - list.RemoveAll(i => (i % 2) == 0).Count); Assert.Equal(Enumerable.Range(0, 20), list); @@ -1004,7 +1002,7 @@ public void TestRemoveAll() public void TestExists() { var list = ImmutableSortedTreeList.CreateRange(Enumerable.Range(0, 20)); - Assert.Throws(() => list.Exists(null)); + Assert.Throws(() => list.Exists(null!)); Assert.False(list.Exists(value => value < 0)); foreach (var i in list) @@ -1019,7 +1017,7 @@ public void TestExists() public void TestFind() { var list = ImmutableSortedTreeList.CreateRange(Enumerable.Range(1, 20)); - Assert.Throws(() => list.Find(null)); + Assert.Throws(() => list.Find(null!)); Assert.Equal(0, list.Find(value => value < 0)); foreach (var i in list) @@ -1034,7 +1032,7 @@ public void TestFind() public void TestFindAll() { var list = ImmutableSortedTreeList.CreateRange(Enumerable.Range(0, 20)); - Assert.Throws(() => list.FindAll(null)); + Assert.Throws(() => list.FindAll(null!)); ImmutableSortedTreeList found = list.FindAll(i => (i % 2) == 0); @@ -1052,7 +1050,7 @@ public void TestFindLast() { var list = ImmutableSortedTreeList.CreateRange(Enumerable.Range(1, 20)); var reference = new List(Enumerable.Range(1, 20)); - Assert.Throws(() => list.FindLast(null)); + Assert.Throws(() => list.FindLast(null!)); Assert.Equal(0, list.FindLast(i => i < 0)); Assert.Equal(0, reference.FindLast(i => i < 0)); @@ -1069,7 +1067,7 @@ public void TestTrueForAll() { var list = ImmutableSortedTreeList.Create(); Assert.True(list.TrueForAll(i => false)); - Assert.Throws(() => list.TrueForAll(null)); + Assert.Throws(() => list.TrueForAll(null!)); list = list.Add(1); Assert.True(list.TrueForAll(i => i > 0)); diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeList.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeList.cs index 0678a34..6d546d2 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeList.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeList.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System.Collections.Generic; @@ -18,31 +16,31 @@ public static ImmutableSortedTreeList Create(T item) public static ImmutableSortedTreeList Create(params T[] items) => ImmutableSortedTreeList.Empty.AddRange(items); - public static ImmutableSortedTreeList Create(IComparer comparer) + public static ImmutableSortedTreeList Create(IComparer? comparer) => ImmutableSortedTreeList.Empty.WithComparer(comparer); - public static ImmutableSortedTreeList Create(IComparer comparer, T item) + public static ImmutableSortedTreeList Create(IComparer? comparer, T item) => ImmutableSortedTreeList.Empty.WithComparer(comparer).Add(item); - public static ImmutableSortedTreeList Create(IComparer comparer, params T[] items) + public static ImmutableSortedTreeList Create(IComparer? comparer, params T[] items) => ImmutableSortedTreeList.Empty.WithComparer(comparer).AddRange(items); public static ImmutableSortedTreeList.Builder CreateBuilder() => Create().ToBuilder(); - public static ImmutableSortedTreeList.Builder CreateBuilder(IComparer comparer) + public static ImmutableSortedTreeList.Builder CreateBuilder(IComparer? comparer) => Create(comparer).ToBuilder(); public static ImmutableSortedTreeList CreateRange(IEnumerable items) => ImmutableSortedTreeList.Empty.AddRange(items); - public static ImmutableSortedTreeList CreateRange(IComparer comparer, IEnumerable items) + public static ImmutableSortedTreeList CreateRange(IComparer? comparer, IEnumerable items) => ImmutableSortedTreeList.Empty.WithComparer(comparer).AddRange(items); public static ImmutableSortedTreeList ToImmutableSortedTreeList(this IEnumerable source) => ToImmutableSortedTreeList(source, comparer: null); - public static ImmutableSortedTreeList ToImmutableSortedTreeList(this IEnumerable source, IComparer comparer) + public static ImmutableSortedTreeList ToImmutableSortedTreeList(this IEnumerable source, IComparer? comparer) => ImmutableSortedTreeList.Empty.WithComparer(comparer).AddRange(source); } } diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeList`1+Builder.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeList`1+Builder.cs index 72837be..37574d1 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeList`1+Builder.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeList`1+Builder.cs @@ -1,14 +1,13 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; + using System.Diagnostics.CodeAnalysis; internal sealed partial class ImmutableSortedTreeList { @@ -45,7 +44,7 @@ T IList.this[int index] set => throw new NotSupportedException(); } - object IList.this[int index] + object? IList.this[int index] { get => this[index]; set => throw new NotSupportedException(); @@ -98,6 +97,7 @@ public void CopyTo(int index, T[] array, int arrayIndex, int count) public bool Exists(Predicate match) => FindIndex(match) >= 0; + [return: MaybeNull] public T Find(Predicate match) => _treeList.Find(match); @@ -113,6 +113,7 @@ public int FindIndex(int startIndex, Predicate match) public int FindIndex(int startIndex, int count, Predicate match) => _treeList.FindIndex(startIndex, count, match); + [return: MaybeNull] public T FindLast(Predicate match) => _treeList.FindLast(match); @@ -207,29 +208,30 @@ IEnumerator IEnumerable.GetEnumerator() IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); - int IList.Add(object value) + int IList.Add(object? value) { if (value == null && default(T) != null) throw new ArgumentNullException(nameof(value)); try { - Add((T)value); + Add((T)value!); } catch (InvalidCastException) { + Debug.Assert(value is object, $"Assertion failed: {nameof(value)} is object"); throw new ArgumentException(string.Format("The value \"{0}\" isn't of type \"{1}\" and can't be used in this generic collection.", value.GetType(), typeof(T)), nameof(value)); } return Count - 1; } - bool IList.Contains(object value) + bool IList.Contains(object? value) { if (value == null) { if (default(T) == null) - return Contains(default); + return Contains(default!); } else if (value is T) { @@ -239,12 +241,12 @@ bool IList.Contains(object value) return false; } - int IList.IndexOf(object value) + int IList.IndexOf(object? value) { if (value == null) { if (default(T) == null) - return IndexOf(default); + return IndexOf(default!); } else if (value is T) { @@ -254,7 +256,7 @@ int IList.IndexOf(object value) return -1; } - void IList.Remove(object value) + void IList.Remove(object? value) { int index = ((IList)this).IndexOf(value); if (index >= 0) @@ -269,7 +271,7 @@ void ICollection.CopyTo(Array array, int index) void IList.Insert(int index, T item) => throw new NotSupportedException(); - void IList.Insert(int index, object value) => throw new NotSupportedException(); + void IList.Insert(int index, object? value) => throw new NotSupportedException(); internal void TrimExcess() => _treeList.TrimExcess(); diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeList`1+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeList`1+Enumerator.cs index 02a43ff..8a03e38 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeList`1+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeList`1+Enumerator.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System.Collections; @@ -21,7 +19,7 @@ internal Enumerator(ImmutableTreeList.Enumerator enumerator) public T Current => _enumerator.Current; - object IEnumerator.Current => Current; + object? IEnumerator.Current => Current; public void Dispose() => _enumerator.Dispose(); diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeList`1.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeList`1.cs index 75d6b1b..110a6fd 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeList`1.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeList`1.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; @@ -10,6 +8,7 @@ namespace TunnelVisionLabs.Collections.Trees.Immutable using System.Collections.Generic; using System.Collections.Immutable; using System.Diagnostics; + using System.Diagnostics.CodeAnalysis; internal sealed partial class ImmutableSortedTreeList : IImmutableList, IReadOnlyList, IList, IList { @@ -48,7 +47,7 @@ T IList.this[int index] set => throw new NotSupportedException(); } - object IList.this[int index] + object? IList.this[int index] { get => this[index]; set => throw new NotSupportedException(); @@ -115,6 +114,7 @@ public void CopyTo(int index, T[] array, int arrayIndex, int count) public bool Exists(Predicate match) => _treeList.Exists(match); + [return: MaybeNull] public T Find(Predicate match) => _treeList.Find(match); @@ -138,6 +138,7 @@ public int FindIndex(int startIndex, Predicate match) public int FindIndex(int startIndex, int count, Predicate match) => _treeList.FindIndex(startIndex, count, match); + [return: MaybeNull] public T FindLast(Predicate match) => _treeList.FindLast(match); @@ -183,7 +184,7 @@ public int IndexOf(T value, int index, int count) return ~result; } - int IImmutableList.IndexOf(T value, int index, int count, IEqualityComparer equalityComparer) + int IImmutableList.IndexOf(T value, int index, int count, IEqualityComparer? equalityComparer) => _treeList.IndexOf(value, index, count, equalityComparer); public int LastIndexOf(T item) @@ -207,7 +208,7 @@ public int LastIndexOf(T item, int index, int count) return ~result - 1; } - int IImmutableList.LastIndexOf(T item, int index, int count, IEqualityComparer equalityComparer) + int IImmutableList.LastIndexOf(T item, int index, int count, IEqualityComparer? equalityComparer) => _treeList.LastIndexOf(item, index, count, equalityComparer); public ImmutableSortedTreeList Remove(T value) @@ -272,7 +273,7 @@ public ImmutableSortedTreeList Replace(T oldValue, T newValue) public IEnumerable Reverse() => _treeList.Reverse(); - public ImmutableSortedTreeList WithComparer(IComparer comparer) + public ImmutableSortedTreeList WithComparer(IComparer? comparer) { comparer = comparer ?? Comparer.Default; if (comparer == _comparer) @@ -296,7 +297,7 @@ IImmutableList IImmutableList.Add(T value) IImmutableList IImmutableList.AddRange(IEnumerable items) => AddRange(items); - IImmutableList IImmutableList.Remove(T value, IEqualityComparer equalityComparer) + IImmutableList IImmutableList.Remove(T value, IEqualityComparer? equalityComparer) { int index = ((IImmutableList)this).IndexOf(value, 0, Count, equalityComparer); if (index < 0) @@ -308,7 +309,7 @@ IImmutableList IImmutableList.Remove(T value, IEqualityComparer equalit IImmutableList IImmutableList.RemoveAll(Predicate match) => RemoveAll(match); - IImmutableList IImmutableList.RemoveRange(IEnumerable items, IEqualityComparer equalityComparer) + IImmutableList IImmutableList.RemoveRange(IEnumerable items, IEqualityComparer? equalityComparer) { if (items is null) throw new ArgumentNullException(nameof(items)); @@ -328,7 +329,7 @@ IImmutableList IImmutableList.RemoveRange(int index, int count) IImmutableList IImmutableList.RemoveAt(int index) => RemoveAt(index); - IImmutableList IImmutableList.Replace(T oldValue, T newValue, IEqualityComparer equalityComparer) + IImmutableList IImmutableList.Replace(T oldValue, T newValue, IEqualityComparer? equalityComparer) { int index = ((IImmutableList)this).IndexOf(oldValue, 0, Count, equalityComparer); if (index < 0) @@ -343,12 +344,12 @@ IEnumerator IEnumerable.GetEnumerator() IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); - bool IList.Contains(object value) + bool IList.Contains(object? value) { if (value == null) { if (default(T) == null) - return Contains(default); + return Contains(default!); } else if (value is T) { @@ -358,12 +359,12 @@ bool IList.Contains(object value) return false; } - int IList.IndexOf(object value) + int IList.IndexOf(object? value) { if (value == null) { if (default(T) == null) - return IndexOf(default); + return IndexOf(default!); } else if (value is T) { @@ -395,13 +396,13 @@ void ICollection.CopyTo(Array array, int index) bool ICollection.Remove(T item) => throw new NotSupportedException(); - int IList.Add(object value) => throw new NotSupportedException(); + int IList.Add(object? value) => throw new NotSupportedException(); void IList.Clear() => throw new NotSupportedException(); - void IList.Insert(int index, object value) => throw new NotSupportedException(); + void IList.Insert(int index, object? value) => throw new NotSupportedException(); - void IList.Remove(object value) => throw new NotSupportedException(); + void IList.Remove(object? value) => throw new NotSupportedException(); void IList.RemoveAt(int index) => throw new NotSupportedException(); @@ -433,7 +434,7 @@ public CoercingComparer(IComparer underlyingComparer, int coerceResult) public bool FoundMatch => _foundMatch; - public int Compare(T x, T y) + public int Compare([AllowNull] T x, [AllowNull] T y) { int result = _underlyingComparer.Compare(x, y); if (result != 0) From 2c545e7295edbb809fb098b77a8c0afa8885aa7b Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Sat, 18 Jul 2020 23:16:42 -0700 Subject: [PATCH 09/23] Enable nullable reference types for ImmutableSortedTreeSet --- .../Immutable/AbstractImmutableSetTest.cs | 4 +- ...edTreeSetBuilderTest+ImmutableArguments.cs | 2 - .../ImmutableSortedTreeSetBuilderTest.cs | 10 +- .../Immutable/ImmutableSortedTreeSetTest.cs | 98 +++++++++---------- .../Immutable/ImmutableSortedTreeSet.cs | 14 ++- .../ImmutableSortedTreeSet`1+Builder.cs | 7 +- .../ImmutableSortedTreeSet`1+Enumerator.cs | 4 +- .../Immutable/ImmutableSortedTreeSet`1.cs | 23 +++-- .../PublicAPI.Unshipped.txt | 86 ++++++++-------- 9 files changed, 120 insertions(+), 128 deletions(-) diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/AbstractImmutableSetTest.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/AbstractImmutableSetTest.cs index c396899..477ffa9 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/AbstractImmutableSetTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/AbstractImmutableSetTest.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; @@ -333,7 +331,7 @@ protected static void TestICollectionInterfaceImpl(ICollection collection, bool Assert.NotNull(collection.SyncRoot); Assert.Same(collection, collection.SyncRoot); - Assert.Throws("array", () => collection.CopyTo(null, 0)); + Assert.Throws("array", () => collection.CopyTo(null!, 0)); Assert.Throws(() => collection.CopyTo(new int[collection.Count, 1], 0)); void CopyToArrayWithNonZeroLowerBound() => collection.CopyTo(Array.CreateInstance(typeof(int), lengths: new[] { collection.Count }, lowerBounds: new[] { 1 }), 0); diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeSetBuilderTest+ImmutableArguments.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeSetBuilderTest+ImmutableArguments.cs index c896726..51ea047 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeSetBuilderTest+ImmutableArguments.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeSetBuilderTest+ImmutableArguments.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System.Collections.Generic; diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeSetBuilderTest.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeSetBuilderTest.cs index a617109..8e9fbbe 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeSetBuilderTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeSetBuilderTest.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; @@ -45,7 +43,7 @@ public void TestCollectionConstructorUsesCorrectComparer() Assert.Equal(2, objectSet.Count); Assert.Equal(new[] { instance1, instance2 }, objectSet); - ImmutableSortedTreeSet.Builder stringSet = ImmutableSortedTreeSet.CreateBuilder(); + ImmutableSortedTreeSet.Builder stringSet = ImmutableSortedTreeSet.CreateBuilder(); Assert.Same(Comparer.Default, stringSet.KeyComparer); stringSet = ImmutableSortedTreeSet.CreateBuilder(StringComparer.OrdinalIgnoreCase); @@ -123,7 +121,7 @@ public void TestICollectionInterface() public void TestCopyToValidation() { var set = ImmutableSortedTreeSet.CreateRange(Enumerable.Range(0, 10)).ToBuilder(); - Assert.Throws("array", () => ((ICollection)set).CopyTo(array: null, 0)); + Assert.Throws("array", () => ((ICollection)set).CopyTo(array: null!, 0)); Assert.Throws("arrayIndex", () => ((ICollection)set).CopyTo(new int[set.Count], -1)); Assert.Throws(string.Empty, () => ((ICollection)set).CopyTo(new int[set.Count - 1], 0)); Assert.Throws(string.Empty, () => ((ICollection)set).CopyTo(new int[set.Count], 1)); @@ -280,11 +278,11 @@ public void TestTrimExcess() [Fact] public void TestTryGetValue() { - ImmutableSortedTreeSet.Builder set = ImmutableSortedTreeSet.CreateBuilder(StringComparer.OrdinalIgnoreCase); + ImmutableSortedTreeSet.Builder set = ImmutableSortedTreeSet.CreateBuilder(StringComparer.OrdinalIgnoreCase); Assert.True(set.Add("a")); Assert.False(set.Add("A")); - Assert.True(set.TryGetValue("a", out string value)); + Assert.True(set.TryGetValue("a", out string? value)); Assert.Equal("a", value); Assert.True(set.TryGetValue("A", out value)); diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeSetTest.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeSetTest.cs index c3fefeb..ba11fbc 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeSetTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableSortedTreeSetTest.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; @@ -88,8 +86,8 @@ public void TestMultipleElementSet() [Fact] public void TestImmutableSortedTreeSetCreateValidation() { - Assert.Throws("other", () => ImmutableSortedTreeSet.Create(default(int[]))); - Assert.Throws("other", () => ImmutableSortedTreeSet.Create(Comparer.Default, default(int[]))); + Assert.Throws("other", () => ImmutableSortedTreeSet.Create(default(int[])!)); + Assert.Throws("other", () => ImmutableSortedTreeSet.Create(Comparer.Default, default(int[])!)); } [Fact] @@ -103,10 +101,10 @@ public void TestImmutableSortedTreeSetCreateRange() [Fact] public void TestImmutableSortedTreeSetCreateRangeValidation() { - Assert.Throws("other", () => ImmutableSortedTreeSet.CreateRange(null)); - Assert.Throws("other", () => ImmutableSortedTreeSet.CreateRange(Comparer.Default, null)); - Assert.Throws("source", () => default(IEnumerable).ToImmutableSortedTreeSet()); - Assert.Throws("source", () => default(IEnumerable).ToImmutableSortedTreeSet(Comparer.Default)); + Assert.Throws("other", () => ImmutableSortedTreeSet.CreateRange(null!)); + Assert.Throws("other", () => ImmutableSortedTreeSet.CreateRange(Comparer.Default, null!)); + Assert.Throws("source", () => default(IEnumerable)!.ToImmutableSortedTreeSet()); + Assert.Throws("source", () => default(IEnumerable)!.ToImmutableSortedTreeSet(Comparer.Default)); } [Fact] @@ -261,29 +259,29 @@ private static void TestIListTInterfaceImpl(IList list, bool supportsNullV { Assert.True(list.IsReadOnly); - Assert.Equal(600, list[0]); - Assert.Equal(601, list[1]); + Assert.Equal(600, list[0]); + Assert.Equal(601, list[1]); Assert.True(list.Contains((T)(object)600)); - Assert.False(list.Contains(default)); + Assert.False(list.Contains(default!)); Assert.Equal(0, list.IndexOf((T)(object)600)); Assert.Equal(1, list.IndexOf((T)(object)601)); - Assert.Equal(-1, list.IndexOf(default)); + Assert.Equal(-1, list.IndexOf(default!)); Assert.Throws(() => list[-1]); - Assert.Throws(() => list[-1] = default); + Assert.Throws(() => list[-1] = default!); Assert.Throws(() => list[list.Count]); - Assert.Throws(() => list[list.Count] = default); - Assert.Throws(() => list.Insert(-1, default)); - Assert.Throws(() => list.Insert(list.Count + 1, default)); + Assert.Throws(() => list[list.Count] = default!); + Assert.Throws(() => list.Insert(-1, default!)); + Assert.Throws(() => list.Insert(list.Count + 1, default!)); Assert.NotEqual(list[1], list[0]); Assert.Throws(() => list.Insert(0, list[0])); Assert.NotEqual(list[1], list[0]); int originalCount = list.Count; - Assert.Throws(() => list.Remove(default)); + Assert.Throws(() => list.Remove(default!)); Assert.Equal(originalCount, list.Count); Assert.Throws(() => list.RemoveAt(0)); Assert.Equal(originalCount, list.Count); @@ -295,27 +293,27 @@ private static void TestIListTInterfaceImpl(IList list, bool supportsNullV if (supportsNullValues) { - Assert.Throws(() => list.Add(default)); - Assert.NotEqual(default, list[list.Count - 1]); - Assert.False(list.Contains(default)); + Assert.Throws(() => list.Add(default!)); + Assert.NotEqual(default!, list[list.Count - 1]); + Assert.False(list.Contains(default!)); Assert.Equal(list.Count - 1, list.IndexOf((T)(object)601)); - Assert.Throws(() => list[list.Count - 1] = default); + Assert.Throws(() => list[list.Count - 1] = default!); Assert.Equal((T)(object)601, list[list.Count - 1]); - Assert.False(list.Contains(default)); - Assert.Equal(-1, list.IndexOf(default)); + Assert.False(list.Contains(default!)); + Assert.Equal(-1, list.IndexOf(default!)); - Assert.Throws(() => list[list.Count - 1] = default); - Assert.NotEqual(default, list[list.Count - 1]); + Assert.Throws(() => list[list.Count - 1] = default!); + Assert.NotEqual(default!, list[list.Count - 1]); } else { // In the face of two errors, verify consistent behavior - Assert.Throws(() => list[list.Count] = default); - Assert.Throws(() => list.Insert(-1, default)); + Assert.Throws(() => list[list.Count] = default!); + Assert.Throws(() => list.Insert(-1, default!)); - Assert.Throws(() => list.Add(default)); - Assert.Throws(() => list[list.Count - 1] = default); + Assert.Throws(() => list.Add(default!)); + Assert.Throws(() => list[list.Count - 1] = default!); Assert.Throws(() => list.Add(Activator.CreateInstance())); Assert.Throws(() => list[list.Count - 1] = Activator.CreateInstance()); Assert.Throws(() => list.Insert(0, Activator.CreateInstance())); @@ -371,50 +369,50 @@ private static void TestICollectionTInterfaceImpl(ICollection collection, var copy = new T[collection.Count]; Assert.Throws(() => collection.CopyTo(copy, -1)); - Assert.All(copy, item => Assert.Equal(default, item)); - Assert.All(copy, item => Assert.Equal(default, item)); + Assert.All(copy, item => Assert.Equal(default!, item)); + Assert.All(copy, item => Assert.Equal(default!, item)); collection.CopyTo(copy, 0); - Assert.Equal(600, copy[0]); - Assert.Equal(601, copy[1]); + Assert.Equal(600, copy[0]); + Assert.Equal(601, copy[1]); copy = new T[collection.Count + 2]; collection.CopyTo(copy, 1); - Assert.Equal(default, copy[0]); - Assert.Equal(600, copy[1]); - Assert.Equal(601, copy[2]); - Assert.Equal(default, copy[3]); + Assert.Equal(default!, copy[0]); + Assert.Equal(600, copy[1]); + Assert.Equal(601, copy[2]); + Assert.Equal(default!, copy[3]); } else { var copy = new T[collection.Count]; Assert.Throws(() => collection.CopyTo(copy, -1)); - Assert.All(copy, item => Assert.Equal(default, item)); - Assert.All(copy, item => Assert.Equal(default, item)); + Assert.All(copy, item => Assert.Equal(default!, item)); + Assert.All(copy, item => Assert.Equal(default!, item)); collection.CopyTo(copy, 0); - Assert.Equal(600, copy[0]); - Assert.Equal(601, copy[1]); + Assert.Equal(600, copy[0]); + Assert.Equal(601, copy[1]); copy = new T[collection.Count + 2]; collection.CopyTo(copy, 1); - Assert.Equal(default, copy[0]); - Assert.Equal(600, copy[1]); - Assert.Equal(601, copy[2]); - Assert.Equal(default, copy[3]); + Assert.Equal(default!, copy[0]); + Assert.Equal(600, copy[1]); + Assert.Equal(601, copy[2]); + Assert.Equal(default!, copy[3]); } Assert.Throws(() => collection.Clear()); - Assert.Throws(() => collection.Add(default)); - Assert.Throws(() => collection.Remove(default)); + Assert.Throws(() => collection.Add(default!)); + Assert.Throws(() => collection.Remove(default!)); } [Fact] public void TestCopyToValidation() { var set = ImmutableSortedTreeSet.CreateRange(Enumerable.Range(0, 10)); - Assert.Throws("array", () => ((ICollection)set).CopyTo(array: null, 0)); + Assert.Throws("array", () => ((ICollection)set).CopyTo(array: null!, 0)); Assert.Throws("arrayIndex", () => ((ICollection)set).CopyTo(new int[set.Count], -1)); Assert.Throws(string.Empty, () => ((ICollection)set).CopyTo(new int[set.Count - 1], 0)); Assert.Throws(() => ((ICollection)set).CopyTo(new int[set.Count], 1)); @@ -488,7 +486,7 @@ public void TestUnion2() var set = ImmutableSortedTreeSet.Create(); CollectionAssert.EnumeratorNotInvalidated(set, () => set = set.Union(expected)); - Assert.Throws("other", () => set.Union(null)); + Assert.Throws("other", () => set.Union(null!)); CollectionAssert.EnumeratorNotInvalidated(set, () => set.Union(Enumerable.Empty())); Assert.Equal(expected.Length, set.Count); @@ -564,7 +562,7 @@ public void TestExcept2() Assert.IsType>(prunedViaInterface); Assert.Equal(referencePruned, prunedViaInterface); - Assert.Throws("other", () => set.Except(other: null)); + Assert.Throws("other", () => set.Except(other: null!)); } [Fact] diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeSet.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeSet.cs index 8045a17..b28b316 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeSet.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeSet.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; @@ -19,31 +17,31 @@ public static ImmutableSortedTreeSet Create(T item) public static ImmutableSortedTreeSet Create(params T[] items) => ImmutableSortedTreeSet.Empty.Union(items); - public static ImmutableSortedTreeSet Create(IComparer comparer) + public static ImmutableSortedTreeSet Create(IComparer? comparer) => ImmutableSortedTreeSet.Empty.WithComparer(comparer); - public static ImmutableSortedTreeSet Create(IComparer comparer, T item) + public static ImmutableSortedTreeSet Create(IComparer? comparer, T item) => ImmutableSortedTreeSet.Empty.WithComparer(comparer).Add(item); - public static ImmutableSortedTreeSet Create(IComparer comparer, params T[] items) + public static ImmutableSortedTreeSet Create(IComparer? comparer, params T[] items) => ImmutableSortedTreeSet.Empty.WithComparer(comparer).Union(items); public static ImmutableSortedTreeSet.Builder CreateBuilder() => Create().ToBuilder(); - public static ImmutableSortedTreeSet.Builder CreateBuilder(IComparer comparer) + public static ImmutableSortedTreeSet.Builder CreateBuilder(IComparer? comparer) => Create(comparer).ToBuilder(); public static ImmutableSortedTreeSet CreateRange(IEnumerable items) => ImmutableSortedTreeSet.Empty.Union(items); - public static ImmutableSortedTreeSet CreateRange(IComparer comparer, IEnumerable items) + public static ImmutableSortedTreeSet CreateRange(IComparer? comparer, IEnumerable items) => ImmutableSortedTreeSet.Empty.WithComparer(comparer).Union(items); public static ImmutableSortedTreeSet ToImmutableSortedTreeSet(this IEnumerable source) => ToImmutableSortedTreeSet(source, comparer: null); - public static ImmutableSortedTreeSet ToImmutableSortedTreeSet(this IEnumerable source, IComparer comparer) + public static ImmutableSortedTreeSet ToImmutableSortedTreeSet(this IEnumerable source, IComparer? comparer) { if (source is null) throw new ArgumentNullException(nameof(source)); diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeSet`1+Builder.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeSet`1+Builder.cs index 411c00f..3365917 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeSet`1+Builder.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeSet`1+Builder.cs @@ -1,14 +1,13 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; + using System.Diagnostics.CodeAnalysis; using System.Linq; public partial class ImmutableSortedTreeSet @@ -28,8 +27,10 @@ internal Builder(ImmutableSortedTreeSet immutableSet) public int Count => _sortedList.Count; + [MaybeNull] public T Max => Count > 0 ? this[Count - 1] : default; + [MaybeNull] public T Min => Count > 0 ? this[0] : default; bool ICollection.IsReadOnly => false; @@ -394,7 +395,7 @@ public void UnionWith(IEnumerable other) internal void TrimExcess() => _sortedList.TrimExcess(); - internal bool TryGetValue(T equalValue, out T actualValue) + internal bool TryGetValue(T equalValue, [MaybeNullWhen(false)] out T actualValue) { int index = _sortedList.BinarySearch(equalValue); if (index < 0) diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeSet`1+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeSet`1+Enumerator.cs index a23d661..4afebdf 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeSet`1+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeSet`1+Enumerator.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System.Collections; @@ -21,7 +19,7 @@ internal Enumerator(ImmutableSortedTreeList.Enumerator enumerator) public T Current => _enumerator.Current; - object IEnumerator.Current => Current; + object? IEnumerator.Current => Current; public void Dispose() => _enumerator.Dispose(); diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeSet`1.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeSet`1.cs index 8174db0..b8e6740 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeSet`1.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableSortedTreeSet`1.cs @@ -1,14 +1,13 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; using System.Collections; using System.Collections.Generic; using System.Collections.Immutable; + using System.Diagnostics.CodeAnalysis; public sealed partial class ImmutableSortedTreeSet : IImmutableSet, ISet, IList, IReadOnlyList, IList { @@ -27,8 +26,10 @@ private ImmutableSortedTreeSet(ImmutableSortedTreeList sortedList) public bool IsEmpty => _sortedList.IsEmpty; + [MaybeNull] public T Max => !IsEmpty ? this[Count - 1] : default; + [MaybeNull] public T Min => !IsEmpty ? this[0] : default; bool ICollection.IsReadOnly => true; @@ -49,7 +50,7 @@ T IList.this[int index] set => throw new NotSupportedException(); } - object IList.this[int index] + object? IList.this[int index] { get => _sortedList[index]; set => throw new NotSupportedException(); @@ -128,7 +129,9 @@ public ImmutableSortedTreeSet SymmetricExcept(IEnumerable other) return builder.ToImmutable(); } - public bool TryGetValue(T equalValue, out T actualValue) +#pragma warning disable CS8767 // Nullability of reference types in type of parameter doesn't match implicitly implemented member (possibly because of nullability attributes). + public bool TryGetValue(T equalValue, [MaybeNullWhen(false)] out T actualValue) +#pragma warning restore CS8767 // Nullability of reference types in type of parameter doesn't match implicitly implemented member (possibly because of nullability attributes). => ToBuilder().TryGetValue(equalValue, out actualValue); public ImmutableSortedTreeSet Union(IEnumerable other) @@ -141,7 +144,7 @@ public ImmutableSortedTreeSet Union(IEnumerable other) public Builder ToBuilder() => new Builder(this); - public ImmutableSortedTreeSet WithComparer(IComparer comparer) + public ImmutableSortedTreeSet WithComparer(IComparer? comparer) { comparer = comparer ?? Comparer.Default; if (comparer == _sortedList.Comparer) @@ -191,13 +194,13 @@ void ICollection.CopyTo(Array array, int index) collection.CopyTo(array, index); } - bool IList.Contains(object value) + bool IList.Contains(object? value) { IList sortedList = _sortedList; return sortedList.Contains(value); } - int IList.IndexOf(object value) + int IList.IndexOf(object? value) { IList sortedList = _sortedList; return sortedList.IndexOf(value); @@ -229,13 +232,13 @@ IEnumerator IEnumerable.GetEnumerator() void IList.RemoveAt(int index) => throw new NotSupportedException(); - int IList.Add(object value) => throw new NotSupportedException(); + int IList.Add(object? value) => throw new NotSupportedException(); void IList.Clear() => throw new NotSupportedException(); - void IList.Insert(int index, object value) => throw new NotSupportedException(); + void IList.Insert(int index, object? value) => throw new NotSupportedException(); - void IList.Remove(object value) => throw new NotSupportedException(); + void IList.Remove(object? value) => throw new NotSupportedException(); void IList.RemoveAt(int index) => throw new NotSupportedException(); diff --git a/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt b/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt index 654495c..41c910e 100644 --- a/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt +++ b/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt @@ -86,31 +86,31 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.this[TKey key].get -> TValue TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Add(T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Add(T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.Add(T item) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.Clear() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.Contains(T item) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.Count.get -> int -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.ExceptWith(System.Collections.Generic.IEnumerable other) -> void +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.ExceptWith(System.Collections.Generic.IEnumerable! other) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Enumerator -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.IntersectWith(System.Collections.Generic.IEnumerable other) -> void -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.IsProperSubsetOf(System.Collections.Generic.IEnumerable other) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.IsProperSupersetOf(System.Collections.Generic.IEnumerable other) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.IsSubsetOf(System.Collections.Generic.IEnumerable other) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.IsSupersetOf(System.Collections.Generic.IEnumerable other) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.KeyComparer.get -> System.Collections.Generic.IComparer +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.IntersectWith(System.Collections.Generic.IEnumerable! other) -> void +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.IsProperSubsetOf(System.Collections.Generic.IEnumerable! other) -> bool +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.IsProperSupersetOf(System.Collections.Generic.IEnumerable! other) -> bool +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.IsSubsetOf(System.Collections.Generic.IEnumerable! other) -> bool +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.IsSupersetOf(System.Collections.Generic.IEnumerable! other) -> bool +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.KeyComparer.get -> System.Collections.Generic.IComparer! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.Max.get -> T TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.Min.get -> T -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.Overlaps(System.Collections.Generic.IEnumerable other) -> bool +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.Overlaps(System.Collections.Generic.IEnumerable! other) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.Remove(T item) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.Reverse() -> System.Collections.Generic.IEnumerable -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.SetEquals(System.Collections.Generic.IEnumerable other) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.SymmetricExceptWith(System.Collections.Generic.IEnumerable other) -> void -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.ToImmutable() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.UnionWith(System.Collections.Generic.IEnumerable other) -> void +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.Reverse() -> System.Collections.Generic.IEnumerable! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.SetEquals(System.Collections.Generic.IEnumerable! other) -> bool +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.SymmetricExceptWith(System.Collections.Generic.IEnumerable! other) -> void +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.ToImmutable() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.UnionWith(System.Collections.Generic.IEnumerable! other) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder.this[int index].get -> T -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Clear() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Clear() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Contains(T value) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Count.get -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Enumerator @@ -118,27 +118,27 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Enumerato TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Enumerator.Dispose() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Enumerator.Reset() -> void -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Except(System.Collections.Generic.IEnumerable other) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Except(System.Collections.Generic.IEnumerable! other) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Enumerator TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.IndexOf(T item) -> int -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Intersect(System.Collections.Generic.IEnumerable other) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Intersect(System.Collections.Generic.IEnumerable! other) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.IsEmpty.get -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.IsProperSubsetOf(System.Collections.Generic.IEnumerable other) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.IsProperSupersetOf(System.Collections.Generic.IEnumerable other) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.IsSubsetOf(System.Collections.Generic.IEnumerable other) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.IsSupersetOf(System.Collections.Generic.IEnumerable other) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.KeyComparer.get -> System.Collections.Generic.IComparer +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.IsProperSubsetOf(System.Collections.Generic.IEnumerable! other) -> bool +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.IsProperSupersetOf(System.Collections.Generic.IEnumerable! other) -> bool +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.IsSubsetOf(System.Collections.Generic.IEnumerable! other) -> bool +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.IsSupersetOf(System.Collections.Generic.IEnumerable! other) -> bool +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.KeyComparer.get -> System.Collections.Generic.IComparer! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Max.get -> T TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Min.get -> T -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Overlaps(System.Collections.Generic.IEnumerable other) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Remove(T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Reverse() -> System.Collections.Generic.IEnumerable -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.SetEquals(System.Collections.Generic.IEnumerable other) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.SymmetricExcept(System.Collections.Generic.IEnumerable other) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.ToBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Overlaps(System.Collections.Generic.IEnumerable! other) -> bool +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Remove(T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Reverse() -> System.Collections.Generic.IEnumerable! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.SetEquals(System.Collections.Generic.IEnumerable! other) -> bool +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.SymmetricExcept(System.Collections.Generic.IEnumerable! other) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.ToBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.TryGetValue(T equalValue, out T actualValue) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Union(System.Collections.Generic.IEnumerable other) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.WithComparer(System.Collections.Generic.IComparer comparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Union(System.Collections.Generic.IEnumerable! other) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.WithComparer(System.Collections.Generic.IComparer? comparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.this[int index].get -> T TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary @@ -730,18 +730,18 @@ static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionar static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ToImmutableSortedTreeDictionary(this System.Collections.Generic.IEnumerable! source, System.Func! keySelector, System.Func! elementSelector) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary! static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ToImmutableSortedTreeDictionary(this System.Collections.Generic.IEnumerable! source, System.Func! keySelector, System.Func! elementSelector, System.Collections.Generic.IComparer? keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary! static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.ToImmutableSortedTreeDictionary(this System.Collections.Generic.IEnumerable! source, System.Func! keySelector, System.Func! elementSelector, System.Collections.Generic.IComparer? keyComparer, System.Collections.Generic.IEqualityComparer? valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary! -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Create() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Create(System.Collections.Generic.IComparer comparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Create(System.Collections.Generic.IComparer comparer, T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Create(System.Collections.Generic.IComparer comparer, params T[] items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Create(T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Create(params T[] items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.CreateBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.CreateBuilder(System.Collections.Generic.IComparer comparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.CreateRange(System.Collections.Generic.IComparer comparer, System.Collections.Generic.IEnumerable items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.CreateRange(System.Collections.Generic.IEnumerable items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.ToImmutableSortedTreeSet(this System.Collections.Generic.IEnumerable source) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.ToImmutableSortedTreeSet(this System.Collections.Generic.IEnumerable source, System.Collections.Generic.IComparer comparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Create() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Create(System.Collections.Generic.IComparer? comparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Create(System.Collections.Generic.IComparer? comparer, T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Create(System.Collections.Generic.IComparer? comparer, params T[]! items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Create(T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Create(params T[]! items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.CreateBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.CreateBuilder(System.Collections.Generic.IComparer? comparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Builder! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.CreateRange(System.Collections.Generic.IComparer? comparer, System.Collections.Generic.IEnumerable! items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.CreateRange(System.Collections.Generic.IEnumerable! items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.ToImmutableSortedTreeSet(this System.Collections.Generic.IEnumerable! source) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.ToImmutableSortedTreeSet(this System.Collections.Generic.IEnumerable! source, System.Collections.Generic.IComparer? comparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet! ~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Create() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary ~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Create(System.Collections.Generic.IEqualityComparer keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary ~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Create(System.Collections.Generic.IEqualityComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary @@ -789,7 +789,7 @@ static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionar ~static TunnelVisionLabs.Collections.Trees.SortedTreeSet.CreateSetComparer(System.Collections.Generic.IEqualityComparer memberEqualityComparer) -> System.Collections.Generic.IEqualityComparer> ~static TunnelVisionLabs.Collections.Trees.TreeSet.CreateSetComparer() -> System.Collections.Generic.IEqualityComparer> static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary! -~static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet +static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet! ~static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary ~static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList ~static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue From 39aa07c8f1b0a5bf7d9de9cd6455a329b220e17a Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Sat, 18 Jul 2020 23:26:46 -0700 Subject: [PATCH 10/23] Enable nullable reference types for ImmutableTreeDictionary --- .../ImmutableTreeDictionaryBuilderTest.cs | 20 +++-- .../Immutable/ImmutableTreeDictionaryTest.cs | 52 +++++++------ .../Immutable/ImmutableTreeDictionary.cs | 41 ++++++---- ...eTreeDictionary`2+Builder+KeyCollection.cs | 2 - ...reeDictionary`2+Builder+ValueCollection.cs | 4 +- .../ImmutableTreeDictionary`2+Builder.cs | 31 ++++---- .../ImmutableTreeDictionary`2+Enumerator.cs | 4 +- ...eeDictionary`2+KeyCollection+Enumerator.cs | 2 - ...ImmutableTreeDictionary`2+KeyCollection.cs | 2 - ...Dictionary`2+ValueCollection+Enumerator.cs | 4 +- ...mutableTreeDictionary`2+ValueCollection.cs | 4 +- .../Immutable/ImmutableTreeDictionary`2.cs | 32 ++++---- .../PublicAPI.Unshipped.txt | 74 +++++++++---------- 13 files changed, 138 insertions(+), 134 deletions(-) diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeDictionaryBuilderTest.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeDictionaryBuilderTest.cs index bda2b32..ef652e2 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeDictionaryBuilderTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeDictionaryBuilderTest.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; @@ -80,7 +78,7 @@ public void TestRemoveRange() dictionary.RemoveRange(itemsToRemove); Assert.Equal(new[] { 1, 3, 5, 7, 9 }.Select(x => new KeyValuePair(x, x)), dictionary); - Assert.Throws("keys", () => dictionary.RemoveRange(null)); + Assert.Throws("keys", () => dictionary.RemoveRange(null!)); } [Fact] @@ -134,7 +132,7 @@ public void TestIDictionaryT() Assert.Equal(Enumerable.Range(0, 9), dictionary.Values); Assert.Throws(() => dictionary.Keys.Add(0)); - Assert.Throws("array", () => dictionary.Keys.CopyTo(null, 0)); + Assert.Throws("array", () => dictionary.Keys.CopyTo(null!, 0)); Assert.Throws("arrayIndex", () => dictionary.Keys.CopyTo(new int[dictionary.Count], -1)); Assert.Throws("arrayIndex", () => dictionary.Keys.CopyTo(new int[dictionary.Count], dictionary.Count + 1)); Assert.Throws(() => dictionary.Keys.CopyTo(new int[dictionary.Count], 1)); @@ -164,7 +162,7 @@ public void TestIDictionaryT() Assert.Equal(0, keyEnumerator.Current); Assert.Throws(() => dictionary.Values.Add(0)); - Assert.Throws("array", () => dictionary.Values.CopyTo(null, 0)); + Assert.Throws("array", () => dictionary.Values.CopyTo(null!, 0)); Assert.Throws("arrayIndex", () => dictionary.Values.CopyTo(new int[dictionary.Count], -1)); Assert.Throws("arrayIndex", () => dictionary.Values.CopyTo(new int[dictionary.Count], dictionary.Count + 1)); Assert.Throws(() => dictionary.Values.CopyTo(new int[dictionary.Count], 1)); @@ -217,7 +215,7 @@ public void TestIDictionary() Assert.False(dictionary.IsReadOnly); Assert.False(dictionary.IsSynchronized); - Assert.Throws("key", () => dictionary.Add(key: null, value: 1)); + Assert.Throws("key", () => dictionary.Add(key: null!, value: 1)); Assert.Throws("value", () => dictionary.Add(key: 1, value: null)); Assert.Throws("key", () => dictionary.Add(key: "string value", value: 0)); Assert.Throws("value", () => dictionary.Add(key: 0, value: "string value")); @@ -230,11 +228,11 @@ public void TestIDictionary() dictionary.Add(10, 11); Assert.Equal(11, dictionary.Count); - Assert.Throws("key", () => dictionary[key: null]); + Assert.Throws("key", () => dictionary[key: null!]); Assert.Null(dictionary["string key"]); Assert.Equal(11, dictionary[10]); - Assert.Throws("key", () => dictionary[key: null] = 12); + Assert.Throws("key", () => dictionary[key: null!] = 12); Assert.Throws("key", () => dictionary["string key"] = 12); Assert.Throws("value", () => dictionary[10] = null); Assert.Throws("value", () => dictionary[10] = "string value"); @@ -249,11 +247,11 @@ public void TestIDictionary() Assert.Equal(entries.Select(i => i.Key), dictionary.Keys.Cast()); Assert.Equal(entries.Select(i => i.Value), dictionary.Values.Cast()); - Assert.Throws(() => dictionary.Contains(null)); + Assert.Throws(() => dictionary.Contains(null!)); Assert.False(dictionary.Contains("string value")); Assert.True(dictionary.Contains(10)); - Assert.Throws(() => dictionary.Remove(null)); + Assert.Throws(() => dictionary.Remove(null!)); Assert.Equal(11, dictionary.Count); dictionary.Remove("string value"); Assert.Equal(11, dictionary.Count); @@ -302,7 +300,7 @@ void TestCollection(ICollection collection, Func indexToExpectedValue Assert.False(collection.IsSynchronized); Assert.Same(dictionary, collection.SyncRoot); - Assert.Throws("array", () => collection.CopyTo(null, 0)); + Assert.Throws("array", () => collection.CopyTo(null!, 0)); Assert.Throws(() => collection.CopyTo(new int[collection.Count, 1], 0)); Assert.Throws(() => collection.CopyTo(Array.CreateInstance(typeof(int), lengths: new[] { collection.Count }, lowerBounds: new[] { 1 }), 0)); Assert.Throws("index", () => collection.CopyTo(new int[collection.Count], -1)); diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeDictionaryTest.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeDictionaryTest.cs index d0cb088..d42f5be 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeDictionaryTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeDictionaryTest.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; @@ -135,24 +133,24 @@ public void TestImmutableTreeDictionaryCreateRange() [Fact] public void TestImmutableTreeDictionaryCreateRangeValidation() { - Assert.Throws("items", () => ImmutableTreeDictionary.CreateRange(null)); - Assert.Throws("items", () => ImmutableTreeDictionary.CreateRange(EqualityComparer.Default, null)); - Assert.Throws("items", () => ImmutableTreeDictionary.CreateRange(EqualityComparer.Default, EqualityComparer.Default, null)); - - Assert.Throws("items", () => default(IEnumerable>).ToImmutableTreeDictionary()); - Assert.Throws("items", () => default(IEnumerable>).ToImmutableTreeDictionary(EqualityComparer.Default)); - Assert.Throws("items", () => default(IEnumerable>).ToImmutableTreeDictionary(EqualityComparer.Default, EqualityComparer.Default)); - Assert.Throws("source", () => default(IEnumerable>).ToImmutableTreeDictionary(x => x)); - Assert.Throws("source", () => default(IEnumerable>).ToImmutableTreeDictionary(x => x.Key, EqualityComparer.Default)); - Assert.Throws("source", () => default(IEnumerable>).ToImmutableTreeDictionary(x => x.Key, x => x.Value, EqualityComparer.Default)); - Assert.Throws("source", () => default(IEnumerable>).ToImmutableTreeDictionary(x => x.Key, x => x.Value, EqualityComparer.Default, EqualityComparer.Default)); - - Assert.Throws("keySelector", () => Enumerable.Empty>().ToImmutableTreeDictionary(keySelector: null, EqualityComparer.Default)); - Assert.Throws("keySelector", () => Enumerable.Empty>().ToImmutableTreeDictionary(keySelector: null, x => x.Value, EqualityComparer.Default)); - Assert.Throws("keySelector", () => Enumerable.Empty>().ToImmutableTreeDictionary(keySelector: null, x => x.Value, EqualityComparer.Default, EqualityComparer.Default)); - - Assert.Throws("elementSelector", () => Enumerable.Empty>().ToImmutableTreeDictionary, string, int>(x => x.Key, elementSelector: null, EqualityComparer.Default)); - Assert.Throws("elementSelector", () => Enumerable.Empty>().ToImmutableTreeDictionary(x => x.Key, elementSelector: null, EqualityComparer.Default, EqualityComparer.Default)); + Assert.Throws("items", () => ImmutableTreeDictionary.CreateRange(null!)); + Assert.Throws("items", () => ImmutableTreeDictionary.CreateRange(EqualityComparer.Default, null!)); + Assert.Throws("items", () => ImmutableTreeDictionary.CreateRange(EqualityComparer.Default, EqualityComparer.Default, null!)); + + Assert.Throws("items", () => default(IEnumerable>)!.ToImmutableTreeDictionary()); + Assert.Throws("items", () => default(IEnumerable>)!.ToImmutableTreeDictionary(EqualityComparer.Default)); + Assert.Throws("items", () => default(IEnumerable>)!.ToImmutableTreeDictionary(EqualityComparer.Default, EqualityComparer.Default)); + Assert.Throws("source", () => default(IEnumerable>)!.ToImmutableTreeDictionary(x => x)); + Assert.Throws("source", () => default(IEnumerable>)!.ToImmutableTreeDictionary(x => x.Key, EqualityComparer.Default)); + Assert.Throws("source", () => default(IEnumerable>)!.ToImmutableTreeDictionary(x => x.Key, x => x.Value, EqualityComparer.Default)); + Assert.Throws("source", () => default(IEnumerable>)!.ToImmutableTreeDictionary(x => x.Key, x => x.Value, EqualityComparer.Default, EqualityComparer.Default)); + + Assert.Throws("keySelector", () => Enumerable.Empty>().ToImmutableTreeDictionary(keySelector: null!, EqualityComparer.Default)); + Assert.Throws("keySelector", () => Enumerable.Empty>().ToImmutableTreeDictionary(keySelector: null!, x => x.Value, EqualityComparer.Default)); + Assert.Throws("keySelector", () => Enumerable.Empty>().ToImmutableTreeDictionary(keySelector: null!, x => x.Value, EqualityComparer.Default, EqualityComparer.Default)); + + Assert.Throws("elementSelector", () => Enumerable.Empty>().ToImmutableTreeDictionary, string, int>(x => x.Key, elementSelector: null!, EqualityComparer.Default)); + Assert.Throws("elementSelector", () => Enumerable.Empty>().ToImmutableTreeDictionary(x => x.Key, elementSelector: null!, EqualityComparer.Default, EqualityComparer.Default)); } [Fact] @@ -250,8 +248,8 @@ public void TestExplicitComparer() Assert.Same(EqualityComparer.Default, ImmutableTreeDictionary.Create(keyComparer: null, valueComparer: objComparer).KeyComparer); Assert.Same(objComparer, ImmutableTreeDictionary.Create(keyComparer: null, valueComparer: objComparer).ValueComparer); - Assert.Same(EqualityComparer.Default, ImmutableTreeDictionary.Create().Add(new object(), null).WithComparers(keyComparer: null, valueComparer: objComparer).KeyComparer); - Assert.Same(objComparer, ImmutableTreeDictionary.Create().Add(new object(), null).WithComparers(keyComparer: null, valueComparer: objComparer).ValueComparer); + Assert.Same(EqualityComparer.Default, ImmutableTreeDictionary.Create().Add(new object(), null!).WithComparers(keyComparer: null, valueComparer: objComparer).KeyComparer); + Assert.Same(objComparer, ImmutableTreeDictionary.Create().Add(new object(), null!).WithComparers(keyComparer: null, valueComparer: objComparer).ValueComparer); } [Fact] @@ -284,7 +282,7 @@ public void TestIDictionaryT() Assert.Equal(Enumerable.Range(0, 9), dictionary.Values); Assert.Throws(() => dictionary.Keys.Add(0)); - Assert.Throws("array", () => dictionary.Keys.CopyTo(null, 0)); + Assert.Throws("array", () => dictionary.Keys.CopyTo(null!, 0)); Assert.Throws("arrayIndex", () => dictionary.Keys.CopyTo(new int[dictionary.Count], -1)); Assert.Throws("arrayIndex", () => dictionary.Keys.CopyTo(new int[dictionary.Count], dictionary.Count + 1)); Assert.Throws(() => dictionary.Keys.CopyTo(new int[dictionary.Count], 1)); @@ -302,7 +300,7 @@ public void TestIDictionaryT() Assert.Equal(0, keyEnumerator.Current); Assert.Throws(() => dictionary.Values.Add(0)); - Assert.Throws("array", () => dictionary.Values.CopyTo(null, 0)); + Assert.Throws("array", () => dictionary.Values.CopyTo(null!, 0)); Assert.Throws("arrayIndex", () => dictionary.Values.CopyTo(new int[dictionary.Count], -1)); Assert.Throws("arrayIndex", () => dictionary.Values.CopyTo(new int[dictionary.Count], dictionary.Count + 1)); Assert.Throws(() => dictionary.Values.CopyTo(new int[dictionary.Count], 1)); @@ -356,7 +354,7 @@ public void TestIDictionary() dictionary = Enumerable.Range(0, 11).ToImmutableTreeDictionary(x => x, x => x + 1); - Assert.Throws("key", () => dictionary[key: null]); + Assert.Throws("key", () => dictionary[key: null!]); Assert.Null(dictionary["string key"]); Assert.Equal(11, dictionary[10]); @@ -371,7 +369,7 @@ public void TestIDictionary() Assert.Equal(entries.Select(i => i.Key), dictionary.Keys.Cast()); Assert.Equal(entries.Select(i => i.Value), dictionary.Values.Cast()); - Assert.Throws(() => dictionary.Contains(null)); + Assert.Throws(() => dictionary.Contains(null!)); Assert.False(dictionary.Contains("string value")); Assert.True(dictionary.Contains(10)); @@ -423,7 +421,7 @@ void TestCollection(ICollection collection, Func indexToExpectedValue Assert.True(collection.IsSynchronized); Assert.Same(dictionary, collection.SyncRoot); - Assert.Throws("array", () => collection.CopyTo(null, 0)); + Assert.Throws("array", () => collection.CopyTo(null!, 0)); Assert.Throws(() => collection.CopyTo(new int[collection.Count, 1], 0)); Assert.Throws(() => collection.CopyTo(Array.CreateInstance(typeof(int), lengths: new[] { collection.Count }, lowerBounds: new[] { 1 }), 0)); Assert.Throws("index", () => collection.CopyTo(new int[collection.Count], -1)); diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary.cs index dd05a78..8ad40d3 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; @@ -12,39 +10,51 @@ namespace TunnelVisionLabs.Collections.Trees.Immutable public static class ImmutableTreeDictionary { public static ImmutableTreeDictionary Create() + where TKey : notnull => ImmutableTreeDictionary.Empty; - public static ImmutableTreeDictionary Create(IEqualityComparer keyComparer) + public static ImmutableTreeDictionary Create(IEqualityComparer? keyComparer) + where TKey : notnull => ImmutableTreeDictionary.Empty.WithComparers(keyComparer); - public static ImmutableTreeDictionary Create(IEqualityComparer keyComparer, IEqualityComparer valueComparer) + public static ImmutableTreeDictionary Create(IEqualityComparer? keyComparer, IEqualityComparer? valueComparer) + where TKey : notnull => ImmutableTreeDictionary.Empty.WithComparers(keyComparer, valueComparer); public static ImmutableTreeDictionary.Builder CreateBuilder() + where TKey : notnull => Create().ToBuilder(); - public static ImmutableTreeDictionary.Builder CreateBuilder(IEqualityComparer keyComparer) + public static ImmutableTreeDictionary.Builder CreateBuilder(IEqualityComparer? keyComparer) + where TKey : notnull => Create(keyComparer).ToBuilder(); - public static ImmutableTreeDictionary.Builder CreateBuilder(IEqualityComparer keyComparer, IEqualityComparer valueComparer) + public static ImmutableTreeDictionary.Builder CreateBuilder(IEqualityComparer? keyComparer, IEqualityComparer? valueComparer) + where TKey : notnull => Create(keyComparer, valueComparer).ToBuilder(); public static ImmutableTreeDictionary CreateRange(IEnumerable> items) + where TKey : notnull => ImmutableTreeDictionary.Empty.AddRange(items); - public static ImmutableTreeDictionary CreateRange(IEqualityComparer keyComparer, IEnumerable> items) + public static ImmutableTreeDictionary CreateRange(IEqualityComparer? keyComparer, IEnumerable> items) + where TKey : notnull => ImmutableTreeDictionary.Empty.WithComparers(keyComparer).AddRange(items); - public static ImmutableTreeDictionary CreateRange(IEqualityComparer keyComparer, IEqualityComparer valueComparer, IEnumerable> items) + public static ImmutableTreeDictionary CreateRange(IEqualityComparer? keyComparer, IEqualityComparer? valueComparer, IEnumerable> items) + where TKey : notnull => ImmutableTreeDictionary.Empty.WithComparers(keyComparer, valueComparer).AddRange(items); public static ImmutableTreeDictionary ToImmutableTreeDictionary(this IEnumerable> items) + where TKey : notnull => ToImmutableTreeDictionary(items, keyComparer: null, valueComparer: null); - public static ImmutableTreeDictionary ToImmutableTreeDictionary(this IEnumerable> items, IEqualityComparer keyComparer) + public static ImmutableTreeDictionary ToImmutableTreeDictionary(this IEnumerable> items, IEqualityComparer? keyComparer) + where TKey : notnull => ToImmutableTreeDictionary(items, keyComparer, valueComparer: null); - public static ImmutableTreeDictionary ToImmutableTreeDictionary(this IEnumerable> items, IEqualityComparer keyComparer, IEqualityComparer valueComparer) + public static ImmutableTreeDictionary ToImmutableTreeDictionary(this IEnumerable> items, IEqualityComparer? keyComparer, IEqualityComparer? valueComparer) + where TKey : notnull { if (items is null) throw new ArgumentNullException(nameof(items)); @@ -56,12 +66,15 @@ public static ImmutableTreeDictionary ToImmutableTreeDictionary ToImmutableTreeDictionary(this IEnumerable source, Func keySelector, Func elementSelector) + where TKey : notnull => ToImmutableTreeDictionary(source, keySelector, elementSelector, keyComparer: null, valueComparer: null); - public static ImmutableTreeDictionary ToImmutableTreeDictionary(this IEnumerable source, Func keySelector, Func elementSelector, IEqualityComparer keyComparer) + public static ImmutableTreeDictionary ToImmutableTreeDictionary(this IEnumerable source, Func keySelector, Func elementSelector, IEqualityComparer? keyComparer) + where TKey : notnull => ToImmutableTreeDictionary(source, keySelector, elementSelector, keyComparer, valueComparer: null); - public static ImmutableTreeDictionary ToImmutableTreeDictionary(this IEnumerable source, Func keySelector, Func elementSelector, IEqualityComparer keyComparer, IEqualityComparer valueComparer) + public static ImmutableTreeDictionary ToImmutableTreeDictionary(this IEnumerable source, Func keySelector, Func elementSelector, IEqualityComparer? keyComparer, IEqualityComparer? valueComparer) + where TKey : notnull { if (source is null) throw new ArgumentNullException(nameof(source)); @@ -75,9 +88,11 @@ public static ImmutableTreeDictionary ToImmutableTreeDictionary ToImmutableTreeDictionary(this IEnumerable source, Func keySelector) + where TKey : notnull => ToImmutableTreeDictionary(source, keySelector, elementSelector: x => x, keyComparer: null, valueComparer: null); - public static ImmutableTreeDictionary ToImmutableTreeDictionary(this IEnumerable source, Func keySelector, IEqualityComparer keyComparer) + public static ImmutableTreeDictionary ToImmutableTreeDictionary(this IEnumerable source, Func keySelector, IEqualityComparer? keyComparer) + where TKey : notnull => ToImmutableTreeDictionary(source, keySelector, elementSelector: x => x, keyComparer, valueComparer: null); } } diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+Builder+KeyCollection.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+Builder+KeyCollection.cs index 7d8d82f..a31e355 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+Builder+KeyCollection.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+Builder+KeyCollection.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+Builder+ValueCollection.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+Builder+ValueCollection.cs index 5074973..b09dc94 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+Builder+ValueCollection.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+Builder+ValueCollection.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; @@ -77,7 +75,7 @@ void ICollection.CopyTo(Array array, int index) { CopyTo(values, index); } - else if (array is object[] objects) + else if (array is object?[] objects) { try { diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+Builder.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+Builder.cs index 5bd1b99..4d65ab4 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+Builder.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+Builder.cs @@ -1,13 +1,12 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; using System.Collections; using System.Collections.Generic; + using System.Diagnostics.CodeAnalysis; using System.Linq; public partial class ImmutableTreeDictionary @@ -67,12 +66,12 @@ public TValue this[TKey key] set { - _treeSetBuilder.Remove(new KeyValuePair(key, default)); + _treeSetBuilder.Remove(new KeyValuePair(key, default!)); _treeSetBuilder.Add(new KeyValuePair(key, value)); } } - object IDictionary.this[object key] + object? IDictionary.this[object key] { get { @@ -99,7 +98,7 @@ object IDictionary.this[object key] var typedKey = (TKey)key; try { - this[typedKey] = (TValue)value; + this[typedKey] = (TValue)value!; } catch (InvalidCastException) { @@ -146,7 +145,7 @@ public bool Contains(KeyValuePair item) } public bool ContainsKey(TKey key) - => _treeSetBuilder.Contains(new KeyValuePair(key, default)); + => _treeSetBuilder.Contains(new KeyValuePair(key, default!)); public bool ContainsValue(TValue value) => _treeSetBuilder.Any(pair => ValueComparer.Equals(pair.Value, value)); @@ -154,8 +153,14 @@ public bool ContainsValue(TValue value) public Enumerator GetEnumerator() => new Enumerator(_treeSetBuilder.GetEnumerator(), Enumerator.ReturnType.KeyValuePair); + [return: MaybeNull] public TValue GetValueOrDefault(TKey key) - => GetValueOrDefault(key, default); + { + if (TryGetValue(key, out TValue value)) + return value; + + return default; + } public TValue GetValueOrDefault(TKey key, TValue defaultValue) { @@ -166,7 +171,7 @@ public TValue GetValueOrDefault(TKey key, TValue defaultValue) } public bool Remove(TKey key) - => _treeSetBuilder.Remove(new KeyValuePair(key, default)); + => _treeSetBuilder.Remove(new KeyValuePair(key, default!)); public bool Remove(KeyValuePair item) { @@ -184,13 +189,13 @@ public void RemoveRange(IEnumerable keys) if (keys is null) throw new ArgumentNullException(nameof(keys)); - _treeSetBuilder.ExceptWith(keys.Select(key => new KeyValuePair(key, default))); + _treeSetBuilder.ExceptWith(keys.Select(key => new KeyValuePair(key, default!))); } - public bool TryGetKey(TKey equalKey, out TKey actualKey) + public bool TryGetKey(TKey equalKey, [MaybeNullWhen(false)] out TKey actualKey) => ToImmutable().TryGetKey(equalKey, out actualKey); - public bool TryGetValue(TKey key, out TValue value) + public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value) => ToImmutable().TryGetValue(key, out value); public ImmutableTreeDictionary ToImmutable() @@ -224,7 +229,7 @@ bool IDictionary.Contains(object key) return key is TKey typedKey && ContainsKey(typedKey); } - void IDictionary.Add(object key, object value) + void IDictionary.Add(object key, object? value) { if (key == null) throw new ArgumentNullException(nameof(key)); @@ -236,7 +241,7 @@ void IDictionary.Add(object key, object value) var typedKey = (TKey)key; try { - Add(typedKey, (TValue)value); + Add(typedKey, (TValue)value!); } catch (InvalidCastException) { diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+Enumerator.cs index 1586571..024d10a 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+Enumerator.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System.Collections; @@ -47,7 +45,7 @@ internal enum ReturnType object IDictionaryEnumerator.Key => Current.Key; - object IDictionaryEnumerator.Value => Current.Value; + object? IDictionaryEnumerator.Value => Current.Value; public void Dispose() => _enumerator.Dispose(); diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+KeyCollection+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+KeyCollection+Enumerator.cs index 5f3623e..db0057c 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+KeyCollection+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+KeyCollection+Enumerator.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System.Collections; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+KeyCollection.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+KeyCollection.cs index 2cd3c40..23682a9 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+KeyCollection.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+KeyCollection.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+ValueCollection+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+ValueCollection+Enumerator.cs index 75d8b59..60135c6 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+ValueCollection+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+ValueCollection+Enumerator.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System.Collections; @@ -23,7 +21,7 @@ internal Enumerator(ImmutableTreeDictionary.Enumerator enumerator) public TValue Current => _enumerator.Current.Value; - object IEnumerator.Current => Current; + object? IEnumerator.Current => Current; public void Dispose() => _enumerator.Dispose(); diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+ValueCollection.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+ValueCollection.cs index 11f6e5e..20743c6 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+ValueCollection.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2+ValueCollection.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; @@ -72,7 +70,7 @@ void ICollection.CopyTo(Array array, int index) { ((ICollection)this).CopyTo(values, index); } - else if (array is object[] objects) + else if (array is object?[] objects) { try { diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2.cs index 5ba8563..c3f2747 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeDictionary`2.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; @@ -10,9 +8,11 @@ namespace TunnelVisionLabs.Collections.Trees.Immutable using System.Collections.Generic; using System.Collections.Immutable; using System.Diagnostics; + using System.Diagnostics.CodeAnalysis; using System.Linq; public sealed partial class ImmutableTreeDictionary : IImmutableDictionary, IDictionary, IReadOnlyDictionary, IDictionary + where TKey : notnull { public static readonly ImmutableTreeDictionary Empty = new ImmutableTreeDictionary(); @@ -26,7 +26,7 @@ private ImmutableTreeDictionary() { } - private ImmutableTreeDictionary(ImmutableTreeSet> treeSet, IEqualityComparer keyComparer, IEqualityComparer valueComparer) + private ImmutableTreeDictionary(ImmutableTreeSet> treeSet, IEqualityComparer? keyComparer, IEqualityComparer? valueComparer) { keyComparer = keyComparer ?? EqualityComparer.Default; valueComparer = valueComparer ?? EqualityComparer.Default; @@ -78,7 +78,7 @@ public TValue this[TKey key] { get { - if (!_treeSet.TryGetValue(new KeyValuePair(key, default), out KeyValuePair value)) + if (!_treeSet.TryGetValue(new KeyValuePair(key, default!), out KeyValuePair value)) throw new KeyNotFoundException(); return value.Value; @@ -91,7 +91,7 @@ TValue IDictionary.this[TKey key] set => throw new NotSupportedException(); } - object IDictionary.this[object key] + object? IDictionary.this[object key] { get { @@ -150,7 +150,7 @@ public bool Contains(KeyValuePair pair) } public bool ContainsKey(TKey key) - => _treeSet.Contains(new KeyValuePair(key, default)); + => _treeSet.Contains(new KeyValuePair(key, default!)); public bool ContainsValue(TValue value) => _treeSet.Any(pair => ValueComparer.Equals(pair.Value, value)); @@ -160,7 +160,7 @@ public Enumerator GetEnumerator() public ImmutableTreeDictionary Remove(TKey key) { - ImmutableTreeSet> result = _treeSet.Remove(new KeyValuePair(key, default)); + ImmutableTreeSet> result = _treeSet.Remove(new KeyValuePair(key, default!)); if (result == _treeSet) { return this; @@ -174,7 +174,7 @@ public ImmutableTreeDictionary RemoveRange(IEnumerable keys) if (keys is null) throw new ArgumentNullException(nameof(keys)); - ImmutableTreeSet> result = _treeSet.Except(keys.Select(key => new KeyValuePair(key, default))); + ImmutableTreeSet> result = _treeSet.Except(keys.Select(key => new KeyValuePair(key, default!))); if (result == _treeSet) { return this; @@ -200,9 +200,11 @@ public ImmutableTreeDictionary SetItems(IEnumerable(equalKey, default), out KeyValuePair value)) + if (!_treeSet.TryGetValue(new KeyValuePair(equalKey, default!), out KeyValuePair value)) { actualKey = default; return false; @@ -212,9 +214,9 @@ public bool TryGetKey(TKey equalKey, out TKey actualKey) return true; } - public bool TryGetValue(TKey key, out TValue value) + public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value) { - if (!_treeSet.TryGetValue(new KeyValuePair(key, default), out KeyValuePair actualValue)) + if (!_treeSet.TryGetValue(new KeyValuePair(key, default!), out KeyValuePair actualValue)) { value = default; return false; @@ -224,10 +226,10 @@ public bool TryGetValue(TKey key, out TValue value) return true; } - public ImmutableTreeDictionary WithComparers(IEqualityComparer keyComparer) + public ImmutableTreeDictionary WithComparers(IEqualityComparer? keyComparer) => WithComparers(keyComparer, valueComparer: null); - public ImmutableTreeDictionary WithComparers(IEqualityComparer keyComparer, IEqualityComparer valueComparer) + public ImmutableTreeDictionary WithComparers(IEqualityComparer? keyComparer, IEqualityComparer? valueComparer) { keyComparer = keyComparer ?? EqualityComparer.Default; valueComparer = valueComparer ?? EqualityComparer.Default; @@ -361,7 +363,7 @@ void ICollection.CopyTo(Array array, int index) bool ICollection>.Remove(KeyValuePair item) => throw new NotSupportedException(); - void IDictionary.Add(object key, object value) => throw new NotSupportedException(); + void IDictionary.Add(object key, object? value) => throw new NotSupportedException(); void IDictionary.Clear() => throw new NotSupportedException(); diff --git a/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt b/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt index 41c910e..4460f8c 100644 --- a/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt +++ b/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt @@ -142,12 +142,12 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.WithCompa TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.this[int index].get -> T TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Add(TKey key, TValue value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.AddRange(System.Collections.Generic.IEnumerable> pairs) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Add(TKey key, TValue value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.AddRange(System.Collections.Generic.IEnumerable>! pairs) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.Add(System.Collections.Generic.KeyValuePair item) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.Add(TKey key, TValue value) -> void -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.AddRange(System.Collections.Generic.IEnumerable> items) -> void +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.AddRange(System.Collections.Generic.IEnumerable>! items) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.Clear() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.Contains(System.Collections.Generic.KeyValuePair item) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.ContainsKey(TKey key) -> bool @@ -159,29 +159,29 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.KeyCollection TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.KeyCollection.Clear() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.KeyCollection.Contains(TKey item) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.KeyCollection.CopyTo(TKey[] array, int arrayIndex) -> void +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.KeyCollection.CopyTo(TKey[]! array, int arrayIndex) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.KeyCollection.Count.get -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.KeyCollection.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.KeyCollection.Enumerator TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.KeyCollection.Remove(TKey item) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.KeyComparer.get -> System.Collections.Generic.IEqualityComparer +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.KeyComparer.get -> System.Collections.Generic.IEqualityComparer! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.Keys.get -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.KeyCollection TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.Remove(System.Collections.Generic.KeyValuePair item) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.Remove(TKey key) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.RemoveRange(System.Collections.Generic.IEnumerable keys) -> void -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.ToImmutable() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.RemoveRange(System.Collections.Generic.IEnumerable! keys) -> void +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.ToImmutable() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.TryGetKey(TKey equalKey, out TKey actualKey) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.TryGetValue(TKey key, out TValue value) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.ValueCollection TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.ValueCollection.Clear() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.ValueCollection.Contains(TValue item) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.ValueCollection.CopyTo(TValue[] array, int arrayIndex) -> void +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.ValueCollection.CopyTo(TValue[]! array, int arrayIndex) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.ValueCollection.Count.get -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.ValueCollection.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ValueCollection.Enumerator -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.ValueComparer.get -> System.Collections.Generic.IEqualityComparer +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.ValueComparer.get -> System.Collections.Generic.IEqualityComparer! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.Values.get -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.ValueCollection TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.this[TKey key].get -> TValue TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder.this[TKey key].set -> void -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Clear() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Clear() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Contains(System.Collections.Generic.KeyValuePair pair) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ContainsKey(TKey key) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ContainsValue(TValue value) -> bool @@ -202,13 +202,13 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.KeyCollection.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.KeyCollection.Enumerator.Reset() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.KeyCollection.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.KeyCollection.Enumerator -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.KeyComparer.get -> System.Collections.Generic.IEqualityComparer +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.KeyComparer.get -> System.Collections.Generic.IEqualityComparer! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Keys.get -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.KeyCollection -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Remove(TKey key) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.RemoveRange(System.Collections.Generic.IEnumerable keys) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.SetItem(TKey key, TValue value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.SetItems(System.Collections.Generic.IEnumerable> items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Remove(TKey key) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.RemoveRange(System.Collections.Generic.IEnumerable! keys) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.SetItem(TKey key, TValue value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.SetItems(System.Collections.Generic.IEnumerable>! items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.TryGetKey(TKey equalKey, out TKey actualKey) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.TryGetValue(TKey key, out TValue value) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ValueCollection @@ -220,10 +220,10 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ValueCollection.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ValueCollection.Enumerator.Reset() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ValueCollection.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ValueCollection.Enumerator -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ValueComparer.get -> System.Collections.Generic.IEqualityComparer +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ValueComparer.get -> System.Collections.Generic.IEqualityComparer! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Values.get -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ValueCollection -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.WithComparers(System.Collections.Generic.IEqualityComparer keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.WithComparers(System.Collections.Generic.IEqualityComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.WithComparers(System.Collections.Generic.IEqualityComparer? keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.WithComparers(System.Collections.Generic.IEqualityComparer? keyComparer, System.Collections.Generic.IEqualityComparer? valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.this[TKey key].get -> TValue TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList @@ -742,23 +742,23 @@ static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Creat static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.CreateRange(System.Collections.Generic.IEnumerable! items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet! static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.ToImmutableSortedTreeSet(this System.Collections.Generic.IEnumerable! source) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet! static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.ToImmutableSortedTreeSet(this System.Collections.Generic.IEnumerable! source, System.Collections.Generic.IComparer? comparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet! -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Create() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Create(System.Collections.Generic.IEqualityComparer keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Create(System.Collections.Generic.IEqualityComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.CreateBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.CreateBuilder(System.Collections.Generic.IEqualityComparer keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.CreateBuilder(System.Collections.Generic.IEqualityComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.CreateRange(System.Collections.Generic.IEnumerable> items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.CreateRange(System.Collections.Generic.IEqualityComparer keyComparer, System.Collections.Generic.IEnumerable> items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.CreateRange(System.Collections.Generic.IEqualityComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer, System.Collections.Generic.IEnumerable> items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToImmutableTreeDictionary(this System.Collections.Generic.IEnumerable> items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToImmutableTreeDictionary(this System.Collections.Generic.IEnumerable> items, System.Collections.Generic.IEqualityComparer keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToImmutableTreeDictionary(this System.Collections.Generic.IEnumerable> items, System.Collections.Generic.IEqualityComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToImmutableTreeDictionary(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Func elementSelector) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToImmutableTreeDictionary(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Func elementSelector, System.Collections.Generic.IEqualityComparer keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToImmutableTreeDictionary(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Func elementSelector, System.Collections.Generic.IEqualityComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToImmutableTreeDictionary(this System.Collections.Generic.IEnumerable source, System.Func keySelector) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToImmutableTreeDictionary(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Collections.Generic.IEqualityComparer keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Create() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Create(System.Collections.Generic.IEqualityComparer? keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Create(System.Collections.Generic.IEqualityComparer? keyComparer, System.Collections.Generic.IEqualityComparer? valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.CreateBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.CreateBuilder(System.Collections.Generic.IEqualityComparer? keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.CreateBuilder(System.Collections.Generic.IEqualityComparer? keyComparer, System.Collections.Generic.IEqualityComparer? valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Builder! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.CreateRange(System.Collections.Generic.IEnumerable>! items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.CreateRange(System.Collections.Generic.IEqualityComparer? keyComparer, System.Collections.Generic.IEnumerable>! items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.CreateRange(System.Collections.Generic.IEqualityComparer? keyComparer, System.Collections.Generic.IEqualityComparer? valueComparer, System.Collections.Generic.IEnumerable>! items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToImmutableTreeDictionary(this System.Collections.Generic.IEnumerable>! items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToImmutableTreeDictionary(this System.Collections.Generic.IEnumerable>! items, System.Collections.Generic.IEqualityComparer? keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToImmutableTreeDictionary(this System.Collections.Generic.IEnumerable>! items, System.Collections.Generic.IEqualityComparer? keyComparer, System.Collections.Generic.IEqualityComparer? valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToImmutableTreeDictionary(this System.Collections.Generic.IEnumerable! source, System.Func! keySelector, System.Func! elementSelector) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToImmutableTreeDictionary(this System.Collections.Generic.IEnumerable! source, System.Func! keySelector, System.Func! elementSelector, System.Collections.Generic.IEqualityComparer? keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToImmutableTreeDictionary(this System.Collections.Generic.IEnumerable! source, System.Func! keySelector, System.Func! elementSelector, System.Collections.Generic.IEqualityComparer? keyComparer, System.Collections.Generic.IEqualityComparer? valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToImmutableTreeDictionary(this System.Collections.Generic.IEnumerable! source, System.Func! keySelector) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToImmutableTreeDictionary(this System.Collections.Generic.IEnumerable! source, System.Func! keySelector, System.Collections.Generic.IEqualityComparer? keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary! ~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Create() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList ~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Create(T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList ~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Create(params T[] items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList @@ -790,7 +790,7 @@ static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.ToImm ~static TunnelVisionLabs.Collections.Trees.TreeSet.CreateSetComparer() -> System.Collections.Generic.IEqualityComparer> static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary! static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet! -~static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary +static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary! ~static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList ~static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue ~static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet From 75b0a3486c8c822b57d5a81f06549ddad267c021 Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Sat, 18 Jul 2020 23:29:29 -0700 Subject: [PATCH 11/23] Enable nullable reference types for ImmutableTreeQueue --- .../Immutable/ImmutableTreeQueueTest.cs | 6 ++---- .../Immutable/ImmutableTreeQueue.cs | 2 -- .../ImmutableTreeQueue`1+Enumerator.cs | 4 +--- .../Immutable/ImmutableTreeQueue`1.cs | 2 -- .../PublicAPI.Unshipped.txt | 18 +++++++++--------- 5 files changed, 12 insertions(+), 20 deletions(-) diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeQueueTest.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeQueueTest.cs index c095a35..e675c88 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeQueueTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeQueueTest.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; @@ -41,7 +39,7 @@ public void TestMultipleElementQueue() [Fact] public void TestImmutableTreeQueueCreateValidation() { - Assert.Throws("items", () => ImmutableTreeQueue.Create(null)); + Assert.Throws("items", () => ImmutableTreeQueue.Create(null!)); } [Fact] @@ -55,7 +53,7 @@ public void TestImmutableTreeQueueCreateRange() [Fact] public void TestImmutableTreeQueueCreateRangeValidation() { - Assert.Throws("items", () => ImmutableTreeQueue.CreateRange(null)); + Assert.Throws("items", () => ImmutableTreeQueue.CreateRange(null!)); } [Fact] diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeQueue.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeQueue.cs index df59df7..8011bf3 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeQueue.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeQueue.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeQueue`1+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeQueue`1+Enumerator.cs index 1affb28..73ee62c 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeQueue`1+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeQueue`1+Enumerator.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; @@ -22,7 +20,7 @@ internal Enumerator(ImmutableTreeList.Enumerator enumerator) public T Current => _enumerator.Current; - object IEnumerator.Current => _enumerator.Current; + object? IEnumerator.Current => _enumerator.Current; public bool MoveNext() => _enumerator.MoveNext(); diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeQueue`1.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeQueue`1.cs index a327d4c..e3e3531 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeQueue`1.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeQueue`1.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt b/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt index 4460f8c..c5685cc 100644 --- a/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt +++ b/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt @@ -333,10 +333,10 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.IsEmpty.get -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.this[int index].get -> T TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Clear() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Dequeue() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Dequeue(out T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Enqueue(T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Clear() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Dequeue() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Dequeue(out T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Enqueue(T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Enumerator TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Enumerator.Current.get -> T TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Enumerator.MoveNext() -> bool @@ -765,10 +765,10 @@ static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToIm ~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.CreateBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder ~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.CreateRange(System.Collections.Generic.IEnumerable items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList ~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.ToImmutableTreeList(this System.Collections.Generic.IEnumerable source) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Create() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Create(T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Create(params T[] items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.CreateRange(System.Collections.Generic.IEnumerable items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Create() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Create(T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Create(params T[]! items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.CreateRange(System.Collections.Generic.IEnumerable! items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue! ~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Create() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet ~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Create(System.Collections.Generic.IEqualityComparer equalityComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet ~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Create(System.Collections.Generic.IEqualityComparer equalityComparer, T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet @@ -792,6 +792,6 @@ static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTree static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet! static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary! ~static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -~static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue +static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue! ~static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet ~static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack From 864b017290ef542b19a1e66f7f915b4e72a6432b Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Sat, 18 Jul 2020 23:37:50 -0700 Subject: [PATCH 12/23] Enable nullable reference types for ImmutableTreeSet --- ...leTreeSetBuilderTest+CollidingHashCodes.cs | 8 +- ...leTreeSetBuilderTest+ImmutableArguments.cs | 2 - .../Immutable/ImmutableTreeSetBuilderTest.cs | 10 +-- .../Immutable/ImmutableTreeSetTest.cs | 56 ++++++------- .../Immutable/ImmutableTreeSet.cs | 14 ++-- .../Immutable/ImmutableTreeSet`1+Builder.cs | 5 +- .../ImmutableTreeSet`1+Enumerator.cs | 4 +- .../Immutable/ImmutableTreeSet`1.cs | 9 +- .../PublicAPI.Unshipped.txt | 82 +++++++++---------- 9 files changed, 89 insertions(+), 101 deletions(-) diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeSetBuilderTest+CollidingHashCodes.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeSetBuilderTest+CollidingHashCodes.cs index 0f81c58..78d72be 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeSetBuilderTest+CollidingHashCodes.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeSetBuilderTest+CollidingHashCodes.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; @@ -22,11 +20,11 @@ public class CollidingHashCodes : AbstractSetTest [Fact] public void TestTryGetValueWithCollidingHashCodes() { - ImmutableTreeSet.Builder set = ImmutableTreeSet.CreateBuilder(new ZeroHashCodeEqualityComparer(StringComparer.OrdinalIgnoreCase)); + ImmutableTreeSet.Builder set = ImmutableTreeSet.CreateBuilder(new ZeroHashCodeEqualityComparer(StringComparer.OrdinalIgnoreCase)); Assert.True(set.Add("a")); Assert.False(set.Add("A")); - Assert.True(set.TryGetValue("a", out string value)); + Assert.True(set.TryGetValue("a", out string? value)); Assert.Equal("a", value); Assert.True(set.TryGetValue("A", out value)); @@ -37,7 +35,7 @@ public void TestTryGetValueWithCollidingHashCodes() // The test below forces coverage of an edge case. We don't know if the hash code for 'aa' or 'bb' comes // first, so write the test in a way that either will cover the early-exit branch in TryGetValue. - set = ImmutableTreeSet.CreateBuilder(new SubsetHashCodeEqualityComparer(StringComparer.Ordinal, StringComparer.OrdinalIgnoreCase)); + set = ImmutableTreeSet.CreateBuilder(new SubsetHashCodeEqualityComparer(StringComparer.Ordinal, StringComparer.OrdinalIgnoreCase)); Assert.True(set.Add("aa")); Assert.True(set.Add("Aa")); Assert.True(set.Add("bb")); diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeSetBuilderTest+ImmutableArguments.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeSetBuilderTest+ImmutableArguments.cs index 63a4856..e243788 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeSetBuilderTest+ImmutableArguments.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeSetBuilderTest+ImmutableArguments.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System.Collections.Generic; diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeSetBuilderTest.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeSetBuilderTest.cs index 7f48595..775c25e 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeSetBuilderTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeSetBuilderTest.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; @@ -30,7 +28,7 @@ public void TestCollectionConstructorUsesCorrectComparer() Assert.Equal(2, objectSet.Count); Assert.Equal(new[] { instance1, instance2 }, objectSet); - ImmutableTreeSet.Builder stringSet = ImmutableTreeSet.CreateBuilder(); + ImmutableTreeSet.Builder stringSet = ImmutableTreeSet.CreateBuilder(); Assert.Same(EqualityComparer.Default, stringSet.KeyComparer); stringSet = ImmutableTreeSet.CreateBuilder(StringComparer.OrdinalIgnoreCase); @@ -108,7 +106,7 @@ public void TestICollectionInterface() public void TestCopyToValidation() { var set = ImmutableTreeSet.CreateRange(Enumerable.Range(0, 10)).ToBuilder(); - Assert.Throws("array", () => ((ICollection)set).CopyTo(array: null, 0)); + Assert.Throws("array", () => ((ICollection)set).CopyTo(array: null!, 0)); Assert.Throws("arrayIndex", () => ((ICollection)set).CopyTo(new int[set.Count], -1)); Assert.Throws(string.Empty, () => ((ICollection)set).CopyTo(new int[set.Count - 1], 0)); Assert.Throws(() => ((ICollection)set).CopyTo(new int[set.Count], 1)); @@ -265,11 +263,11 @@ public void TestTrimExcess() [Fact] public void TestTryGetValue() { - ImmutableTreeSet.Builder set = ImmutableTreeSet.CreateBuilder(StringComparer.OrdinalIgnoreCase); + ImmutableTreeSet.Builder set = ImmutableTreeSet.CreateBuilder(StringComparer.OrdinalIgnoreCase); Assert.True(set.Add("a")); Assert.False(set.Add("A")); - Assert.True(set.TryGetValue("a", out string value)); + Assert.True(set.TryGetValue("a", out string? value)); Assert.Equal("a", value); Assert.True(set.TryGetValue("A", out value)); diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeSetTest.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeSetTest.cs index 84d923b..7bac16e 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeSetTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeSetTest.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; @@ -73,8 +71,8 @@ public void TestMultipleElementSet() [Fact] public void TestImmutableTreeSetCreateValidation() { - Assert.Throws("other", () => ImmutableTreeSet.Create(default(int[]))); - Assert.Throws("other", () => ImmutableTreeSet.Create(EqualityComparer.Default, default(int[]))); + Assert.Throws("other", () => ImmutableTreeSet.Create(default(int[])!)); + Assert.Throws("other", () => ImmutableTreeSet.Create(EqualityComparer.Default, default(int[])!)); } [Fact] @@ -88,10 +86,10 @@ public void TestImmutableTreeSetCreateRange() [Fact] public void TestImmutableTreeSetCreateRangeValidation() { - Assert.Throws("other", () => ImmutableTreeSet.CreateRange(null)); - Assert.Throws("other", () => ImmutableTreeSet.CreateRange(EqualityComparer.Default, null)); - Assert.Throws("source", () => default(IEnumerable).ToImmutableTreeSet()); - Assert.Throws("source", () => default(IEnumerable).ToImmutableTreeSet(EqualityComparer.Default)); + Assert.Throws("other", () => ImmutableTreeSet.CreateRange(null!)); + Assert.Throws("other", () => ImmutableTreeSet.CreateRange(EqualityComparer.Default, null!)); + Assert.Throws("source", () => default(IEnumerable)!.ToImmutableTreeSet()); + Assert.Throws("source", () => default(IEnumerable)!.ToImmutableTreeSet(EqualityComparer.Default)); } [Fact] @@ -206,50 +204,50 @@ private static void TestICollectionTInterfaceImpl(ICollection collection, var copy = new T[collection.Count]; Assert.Throws(() => collection.CopyTo(copy, -1)); - Assert.All(copy, item => Assert.Equal(default, item)); - Assert.All(copy, item => Assert.Equal(default, item)); + Assert.All(copy, item => Assert.Equal(default!, item)); + Assert.All(copy, item => Assert.Equal(default!, item)); collection.CopyTo(copy, 0); - Assert.Equal(600, copy[0]); - Assert.Equal(601, copy[1]); + Assert.Equal(600, copy[0]); + Assert.Equal(601, copy[1]); copy = new T[collection.Count + 2]; collection.CopyTo(copy, 1); - Assert.Equal(default, copy[0]); - Assert.Equal(600, copy[1]); - Assert.Equal(601, copy[2]); - Assert.Equal(default, copy[3]); + Assert.Equal(default!, copy[0]); + Assert.Equal(600, copy[1]); + Assert.Equal(601, copy[2]); + Assert.Equal(default!, copy[3]); } else { var copy = new T[collection.Count]; Assert.Throws(() => collection.CopyTo(copy, -1)); - Assert.All(copy, item => Assert.Equal(default, item)); - Assert.All(copy, item => Assert.Equal(default, item)); + Assert.All(copy, item => Assert.Equal(default!, item)); + Assert.All(copy, item => Assert.Equal(default!, item)); collection.CopyTo(copy, 0); - Assert.Equal(600, copy[0]); - Assert.Equal(601, copy[1]); + Assert.Equal(600, copy[0]); + Assert.Equal(601, copy[1]); copy = new T[collection.Count + 2]; collection.CopyTo(copy, 1); - Assert.Equal(default, copy[0]); - Assert.Equal(600, copy[1]); - Assert.Equal(601, copy[2]); - Assert.Equal(default, copy[3]); + Assert.Equal(default!, copy[0]); + Assert.Equal(600, copy[1]); + Assert.Equal(601, copy[2]); + Assert.Equal(default!, copy[3]); } Assert.Throws(() => collection.Clear()); - Assert.Throws(() => collection.Add(default)); - Assert.Throws(() => collection.Remove(default)); + Assert.Throws(() => collection.Add(default!)); + Assert.Throws(() => collection.Remove(default!)); } [Fact] public void TestCopyToValidation() { var set = ImmutableTreeSet.CreateRange(Enumerable.Range(0, 10)); - Assert.Throws("array", () => ((ICollection)set).CopyTo(array: null, 0)); + Assert.Throws("array", () => ((ICollection)set).CopyTo(array: null!, 0)); Assert.Throws("arrayIndex", () => ((ICollection)set).CopyTo(new int[set.Count], -1)); Assert.Throws(string.Empty, () => ((ICollection)set).CopyTo(new int[set.Count - 1], 0)); Assert.Throws(() => ((ICollection)set).CopyTo(new int[set.Count], 1)); @@ -323,7 +321,7 @@ public void TestUnion2() var set = ImmutableTreeSet.Create(); CollectionAssert.EnumeratorNotInvalidated(set, () => set = set.Union(expected)); - Assert.Throws("other", () => set.Union(null)); + Assert.Throws("other", () => set.Union(null!)); CollectionAssert.EnumeratorNotInvalidated(set, () => set.Union(Enumerable.Empty())); Assert.Equal(expected.Length, set.Count); @@ -399,7 +397,7 @@ public void TestExcept2() Assert.IsType>(prunedViaInterface); Assert.Equal(referencePruned, prunedViaInterface); - Assert.Throws("other", () => set.Except(other: null)); + Assert.Throws("other", () => set.Except(other: null!)); } [Fact] diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeSet.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeSet.cs index 85442cc..8944ffe 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeSet.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeSet.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; @@ -19,31 +17,31 @@ public static ImmutableTreeSet Create(T item) public static ImmutableTreeSet Create(params T[] items) => ImmutableTreeSet.Empty.Union(items); - public static ImmutableTreeSet Create(IEqualityComparer equalityComparer) + public static ImmutableTreeSet Create(IEqualityComparer? equalityComparer) => ImmutableTreeSet.Empty.WithComparer(equalityComparer); - public static ImmutableTreeSet Create(IEqualityComparer equalityComparer, T item) + public static ImmutableTreeSet Create(IEqualityComparer? equalityComparer, T item) => ImmutableTreeSet.Empty.WithComparer(equalityComparer).Add(item); - public static ImmutableTreeSet Create(IEqualityComparer equalityComparer, params T[] items) + public static ImmutableTreeSet Create(IEqualityComparer? equalityComparer, params T[] items) => ImmutableTreeSet.Empty.WithComparer(equalityComparer).Union(items); public static ImmutableTreeSet.Builder CreateBuilder() => Create().ToBuilder(); - public static ImmutableTreeSet.Builder CreateBuilder(IEqualityComparer equalityComparer) + public static ImmutableTreeSet.Builder CreateBuilder(IEqualityComparer? equalityComparer) => Create(equalityComparer).ToBuilder(); public static ImmutableTreeSet CreateRange(IEnumerable items) => ImmutableTreeSet.Empty.Union(items); - public static ImmutableTreeSet CreateRange(IEqualityComparer equalityComparer, IEnumerable items) + public static ImmutableTreeSet CreateRange(IEqualityComparer? equalityComparer, IEnumerable items) => ImmutableTreeSet.Empty.WithComparer(equalityComparer).Union(items); public static ImmutableTreeSet ToImmutableTreeSet(this IEnumerable source) => ToImmutableTreeSet(source, equalityComparer: null); - public static ImmutableTreeSet ToImmutableTreeSet(this IEnumerable source, IEqualityComparer equalityComparer) + public static ImmutableTreeSet ToImmutableTreeSet(this IEnumerable source, IEqualityComparer? equalityComparer) { if (source is null) throw new ArgumentNullException(nameof(source)); diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeSet`1+Builder.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeSet`1+Builder.cs index 4b4e8c4..131c761 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeSet`1+Builder.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeSet`1+Builder.cs @@ -1,14 +1,13 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; + using System.Diagnostics.CodeAnalysis; using System.Linq; public partial class ImmutableTreeSet @@ -445,7 +444,7 @@ public void UnionWith(IEnumerable other) internal void TrimExcess() => _sortedList.TrimExcess(); - internal bool TryGetValue(T equalValue, out T actualValue) + internal bool TryGetValue(T equalValue, [MaybeNullWhen(false)] out T actualValue) { int hashCode = KeyComparer.GetHashCode(equalValue); diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeSet`1+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeSet`1+Enumerator.cs index c11ca8d..bc6cd91 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeSet`1+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeSet`1+Enumerator.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System.Collections; @@ -21,7 +19,7 @@ internal Enumerator(ImmutableSortedTreeList<(int hashCode, T value)>.Enumerator public T Current => _enumerator.Current.value; - object IEnumerator.Current => Current; + object? IEnumerator.Current => Current; public void Dispose() => _enumerator.Dispose(); diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeSet`1.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeSet`1.cs index e621d6a..239f24e 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeSet`1.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeSet`1.cs @@ -1,14 +1,13 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; using System.Collections; using System.Collections.Generic; using System.Collections.Immutable; + using System.Diagnostics.CodeAnalysis; public sealed partial class ImmutableTreeSet : IImmutableSet, ISet, ICollection { @@ -102,7 +101,9 @@ public ImmutableTreeSet SymmetricExcept(IEnumerable other) return builder.ToImmutable(); } - public bool TryGetValue(T equalValue, out T actualValue) +#pragma warning disable CS8767 // Nullability of reference types in type of parameter doesn't match implicitly implemented member (possibly because of nullability attributes). + public bool TryGetValue(T equalValue, [MaybeNullWhen(false)] out T actualValue) +#pragma warning restore CS8767 // Nullability of reference types in type of parameter doesn't match implicitly implemented member (possibly because of nullability attributes). => ToBuilder().TryGetValue(equalValue, out actualValue); public ImmutableTreeSet Union(IEnumerable other) @@ -115,7 +116,7 @@ public ImmutableTreeSet Union(IEnumerable other) public Builder ToBuilder() => new Builder(this); - public ImmutableTreeSet WithComparer(IEqualityComparer equalityComparer) + public ImmutableTreeSet WithComparer(IEqualityComparer? equalityComparer) { equalityComparer = equalityComparer ?? EqualityComparer.Default; if (equalityComparer == _comparer) diff --git a/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt b/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt index c5685cc..9ded3ab 100644 --- a/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt +++ b/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt @@ -345,27 +345,27 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.IsEmpty.get - TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Peek() -> T TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Add(T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Add(T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.Add(T item) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.Clear() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.Contains(T item) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.Count.get -> int -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.ExceptWith(System.Collections.Generic.IEnumerable other) -> void +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.ExceptWith(System.Collections.Generic.IEnumerable! other) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Enumerator -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.IntersectWith(System.Collections.Generic.IEnumerable other) -> void -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.IsProperSubsetOf(System.Collections.Generic.IEnumerable other) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.IsProperSupersetOf(System.Collections.Generic.IEnumerable other) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.IsSubsetOf(System.Collections.Generic.IEnumerable other) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.IsSupersetOf(System.Collections.Generic.IEnumerable other) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.KeyComparer.get -> System.Collections.Generic.IEqualityComparer -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.Overlaps(System.Collections.Generic.IEnumerable other) -> bool +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.IntersectWith(System.Collections.Generic.IEnumerable! other) -> void +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.IsProperSubsetOf(System.Collections.Generic.IEnumerable! other) -> bool +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.IsProperSupersetOf(System.Collections.Generic.IEnumerable! other) -> bool +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.IsSubsetOf(System.Collections.Generic.IEnumerable! other) -> bool +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.IsSupersetOf(System.Collections.Generic.IEnumerable! other) -> bool +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.KeyComparer.get -> System.Collections.Generic.IEqualityComparer! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.Overlaps(System.Collections.Generic.IEnumerable! other) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.Remove(T item) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.SetEquals(System.Collections.Generic.IEnumerable other) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.SymmetricExceptWith(System.Collections.Generic.IEnumerable other) -> void -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.ToImmutable() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.UnionWith(System.Collections.Generic.IEnumerable other) -> void -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Clear() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.SetEquals(System.Collections.Generic.IEnumerable! other) -> bool +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.SymmetricExceptWith(System.Collections.Generic.IEnumerable! other) -> void +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.ToImmutable() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder.UnionWith(System.Collections.Generic.IEnumerable! other) -> void +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Clear() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Contains(T value) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Count.get -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Enumerator @@ -373,23 +373,23 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Enumerator.Curr TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Enumerator.Dispose() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Enumerator.Reset() -> void -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Except(System.Collections.Generic.IEnumerable other) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Except(System.Collections.Generic.IEnumerable! other) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Enumerator -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Intersect(System.Collections.Generic.IEnumerable other) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Intersect(System.Collections.Generic.IEnumerable! other) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.IsEmpty.get -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.IsProperSubsetOf(System.Collections.Generic.IEnumerable other) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.IsProperSupersetOf(System.Collections.Generic.IEnumerable other) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.IsSubsetOf(System.Collections.Generic.IEnumerable other) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.IsSupersetOf(System.Collections.Generic.IEnumerable other) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.KeyComparer.get -> System.Collections.Generic.IEqualityComparer -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Overlaps(System.Collections.Generic.IEnumerable other) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Remove(T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.SetEquals(System.Collections.Generic.IEnumerable other) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.SymmetricExcept(System.Collections.Generic.IEnumerable other) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.ToBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.IsProperSubsetOf(System.Collections.Generic.IEnumerable! other) -> bool +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.IsProperSupersetOf(System.Collections.Generic.IEnumerable! other) -> bool +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.IsSubsetOf(System.Collections.Generic.IEnumerable! other) -> bool +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.IsSupersetOf(System.Collections.Generic.IEnumerable! other) -> bool +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.KeyComparer.get -> System.Collections.Generic.IEqualityComparer! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Overlaps(System.Collections.Generic.IEnumerable! other) -> bool +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Remove(T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.SetEquals(System.Collections.Generic.IEnumerable! other) -> bool +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.SymmetricExcept(System.Collections.Generic.IEnumerable! other) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.ToBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.TryGetValue(T equalValue, out T actualValue) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Union(System.Collections.Generic.IEnumerable other) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.WithComparer(System.Collections.Generic.IEqualityComparer equalityComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Union(System.Collections.Generic.IEnumerable! other) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.WithComparer(System.Collections.Generic.IEqualityComparer? equalityComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack ~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Clear() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack @@ -769,18 +769,18 @@ static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Create static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Create(T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue! static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Create(params T[]! items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue! static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.CreateRange(System.Collections.Generic.IEnumerable! items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue! -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Create() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Create(System.Collections.Generic.IEqualityComparer equalityComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Create(System.Collections.Generic.IEqualityComparer equalityComparer, T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Create(System.Collections.Generic.IEqualityComparer equalityComparer, params T[] items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Create(T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Create(params T[] items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.CreateBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.CreateBuilder(System.Collections.Generic.IEqualityComparer equalityComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.CreateRange(System.Collections.Generic.IEnumerable items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.CreateRange(System.Collections.Generic.IEqualityComparer equalityComparer, System.Collections.Generic.IEnumerable items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.ToImmutableTreeSet(this System.Collections.Generic.IEnumerable source) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.ToImmutableTreeSet(this System.Collections.Generic.IEnumerable source, System.Collections.Generic.IEqualityComparer equalityComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Create() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Create(System.Collections.Generic.IEqualityComparer? equalityComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Create(System.Collections.Generic.IEqualityComparer? equalityComparer, T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Create(System.Collections.Generic.IEqualityComparer? equalityComparer, params T[]! items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Create(T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Create(params T[]! items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.CreateBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.CreateBuilder(System.Collections.Generic.IEqualityComparer? equalityComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Builder! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.CreateRange(System.Collections.Generic.IEnumerable! items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.CreateRange(System.Collections.Generic.IEqualityComparer? equalityComparer, System.Collections.Generic.IEnumerable! items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.ToImmutableTreeSet(this System.Collections.Generic.IEnumerable! source) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.ToImmutableTreeSet(this System.Collections.Generic.IEnumerable! source, System.Collections.Generic.IEqualityComparer? equalityComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet! ~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Create() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack ~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Create(T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack ~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Create(params T[] items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack @@ -793,5 +793,5 @@ static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTree static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary! ~static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue! -~static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet +static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet! ~static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack From 45c1be8694de7812cecf6fa50d6bcf5a1a9df7a8 Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Sat, 18 Jul 2020 23:39:55 -0700 Subject: [PATCH 13/23] Enable nullable reference types for ImmutableTreeStack --- .../Immutable/ImmutableTreeStackTest.cs | 6 ++---- .../Immutable/ImmutableTreeStack.cs | 2 -- .../ImmutableTreeStack`1+Enumerator.cs | 4 +--- .../Immutable/ImmutableTreeStack`1.cs | 2 -- .../PublicAPI.Unshipped.txt | 18 +++++++++--------- 5 files changed, 12 insertions(+), 20 deletions(-) diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeStackTest.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeStackTest.cs index 6d29ef9..f13a6e6 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeStackTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeStackTest.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; @@ -41,7 +39,7 @@ public void TestMultipleElementStack() [Fact] public void TestImmutableTreeStackCreateValidation() { - Assert.Throws("items", () => ImmutableTreeStack.Create(null)); + Assert.Throws("items", () => ImmutableTreeStack.Create(null!)); } [Fact] @@ -55,7 +53,7 @@ public void TestImmutableTreeStackCreateRange() [Fact] public void TestImmutableTreeStackCreateRangeValidation() { - Assert.Throws("items", () => ImmutableTreeStack.CreateRange(null)); + Assert.Throws("items", () => ImmutableTreeStack.CreateRange(null!)); } [Fact] diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeStack.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeStack.cs index 753480e..f82e23e 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeStack.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeStack.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeStack`1+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeStack`1+Enumerator.cs index 7981674..7da9a35 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeStack`1+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeStack`1+Enumerator.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; @@ -22,7 +20,7 @@ internal Enumerator(ImmutableTreeList.Enumerator enumerator) public T Current => _enumerator.Current; - object IEnumerator.Current => _enumerator.Current; + object? IEnumerator.Current => _enumerator.Current; public bool MoveNext() => _enumerator.MoveNext(); diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeStack`1.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeStack`1.cs index b84faf8..eec8f5d 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeStack`1.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeStack`1.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt b/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt index 9ded3ab..db69626 100644 --- a/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt +++ b/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt @@ -392,16 +392,16 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Union(System.Co TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.WithComparer(System.Collections.Generic.IEqualityComparer? equalityComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Clear() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Clear() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Enumerator TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Enumerator.Current.get -> T TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Enumerator TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.IsEmpty.get -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Peek() -> T -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Pop() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Pop(out T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Push(T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Pop() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Pop(out T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Push(T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack! TunnelVisionLabs.Collections.Trees.SortedTreeDictionary TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.Add(TKey key, TValue value) -> void TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.Clear() -> void @@ -781,10 +781,10 @@ static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.CreateRange static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.CreateRange(System.Collections.Generic.IEqualityComparer? equalityComparer, System.Collections.Generic.IEnumerable! items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet! static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.ToImmutableTreeSet(this System.Collections.Generic.IEnumerable! source) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet! static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.ToImmutableTreeSet(this System.Collections.Generic.IEnumerable! source, System.Collections.Generic.IEqualityComparer? equalityComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet! -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Create() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Create(T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Create(params T[] items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.CreateRange(System.Collections.Generic.IEnumerable items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Create() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Create(T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Create(params T[]! items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.CreateRange(System.Collections.Generic.IEnumerable! items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack! ~static TunnelVisionLabs.Collections.Trees.SortedTreeSet.CreateSetComparer() -> System.Collections.Generic.IEqualityComparer> ~static TunnelVisionLabs.Collections.Trees.SortedTreeSet.CreateSetComparer(System.Collections.Generic.IEqualityComparer memberEqualityComparer) -> System.Collections.Generic.IEqualityComparer> ~static TunnelVisionLabs.Collections.Trees.TreeSet.CreateSetComparer() -> System.Collections.Generic.IEqualityComparer> @@ -794,4 +794,4 @@ static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictio ~static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue! static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet! -~static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack +static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack! From 462f6f349a2b78735d718615f38a278601fd8db2 Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Sat, 18 Jul 2020 23:44:34 -0700 Subject: [PATCH 14/23] Enable nullable reference types for TreeQueue --- TunnelVisionLabs.Collections.Trees.Test/TreeQueueTest.cs | 6 ++---- TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt | 4 ++-- .../TreeQueue`1+Enumerator.cs | 4 +--- TunnelVisionLabs.Collections.Trees/TreeQueue`1.cs | 7 +++---- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/TunnelVisionLabs.Collections.Trees.Test/TreeQueueTest.cs b/TunnelVisionLabs.Collections.Trees.Test/TreeQueueTest.cs index 33de0a0..1ad8b27 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/TreeQueueTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/TreeQueueTest.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test { using System; @@ -110,12 +108,12 @@ private static void TestICollectionInterfaceImpl(ICollection collection, bool is public void TestCopyToValidation() { TreeQueue queue = CreateTreeQueue(Enumerable.Range(0, 10)); - Assert.Throws("dest", () => queue.CopyTo(null, 0)); + Assert.Throws("dest", () => queue.CopyTo(null!, 0)); Assert.Throws("dstIndex", () => queue.CopyTo(new int[queue.Count], -1)); Assert.Throws(string.Empty, () => queue.CopyTo(new int[queue.Count], 1)); ICollection collection = queue; - Assert.Throws("dest", () => collection.CopyTo(null, 0)); + Assert.Throws("dest", () => collection.CopyTo(null!, 0)); Assert.Throws("dstIndex", () => collection.CopyTo(new int[collection.Count], -1)); Assert.Throws("dstIndex", () => collection.CopyTo(Array.CreateInstance(typeof(int), new[] { queue.Count }, new[] { 1 }), 0)); Assert.Throws(string.Empty, () => collection.CopyTo(new int[collection.Count], collection.Count + 1)); diff --git a/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt b/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt index db69626..ce3d8f1 100644 --- a/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt +++ b/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt @@ -645,7 +645,7 @@ TunnelVisionLabs.Collections.Trees.TreeList.this[int index].set -> void TunnelVisionLabs.Collections.Trees.TreeQueue TunnelVisionLabs.Collections.Trees.TreeQueue.Clear() -> void TunnelVisionLabs.Collections.Trees.TreeQueue.Contains(T item) -> bool -~TunnelVisionLabs.Collections.Trees.TreeQueue.CopyTo(T[] array, int arrayIndex) -> void +TunnelVisionLabs.Collections.Trees.TreeQueue.CopyTo(T[]! array, int arrayIndex) -> void TunnelVisionLabs.Collections.Trees.TreeQueue.Count.get -> int TunnelVisionLabs.Collections.Trees.TreeQueue.Dequeue() -> T TunnelVisionLabs.Collections.Trees.TreeQueue.Enqueue(T item) -> void @@ -655,7 +655,7 @@ TunnelVisionLabs.Collections.Trees.TreeQueue.Enumerator.Dispose() -> void TunnelVisionLabs.Collections.Trees.TreeQueue.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.TreeQueue.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.TreeQueue.Enumerator TunnelVisionLabs.Collections.Trees.TreeQueue.Peek() -> T -~TunnelVisionLabs.Collections.Trees.TreeQueue.ToArray() -> T[] +TunnelVisionLabs.Collections.Trees.TreeQueue.ToArray() -> T[]! TunnelVisionLabs.Collections.Trees.TreeQueue.TreeQueue() -> void TunnelVisionLabs.Collections.Trees.TreeQueue.TreeQueue(int branchingFactor) -> void TunnelVisionLabs.Collections.Trees.TreeQueue.TrimExcess() -> void diff --git a/TunnelVisionLabs.Collections.Trees/TreeQueue`1+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/TreeQueue`1+Enumerator.cs index c90a002..71e2402 100644 --- a/TunnelVisionLabs.Collections.Trees/TreeQueue`1+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/TreeQueue`1+Enumerator.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees { using System.Collections; @@ -21,7 +19,7 @@ internal Enumerator(TreeList.Enumerator enumerator) public T Current => _enumerator.Current; - object IEnumerator.Current => _enumerator.Current; + object? IEnumerator.Current => _enumerator.Current; public void Dispose() => _enumerator.Dispose(); diff --git a/TunnelVisionLabs.Collections.Trees/TreeQueue`1.cs b/TunnelVisionLabs.Collections.Trees/TreeQueue`1.cs index 1554d1f..e14f038 100644 --- a/TunnelVisionLabs.Collections.Trees/TreeQueue`1.cs +++ b/TunnelVisionLabs.Collections.Trees/TreeQueue`1.cs @@ -1,13 +1,12 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees { using System; using System.Collections; using System.Collections.Generic; + using System.Diagnostics.CodeAnalysis; using ICollection = System.Collections.ICollection; public partial class TreeQueue : IReadOnlyCollection, ICollection @@ -60,7 +59,7 @@ public T Dequeue() public void TrimExcess() => _treeList.TrimExcess(); - public bool TryPeek(out T result) + public bool TryPeek([MaybeNullWhen(false)] out T result) { if (_treeList.Count == 0) { @@ -72,7 +71,7 @@ public bool TryPeek(out T result) return true; } - public bool TryDequeue(out T result) + public bool TryDequeue([MaybeNullWhen(false)] out T result) { if (_treeList.Count == 0) { From efcad820e47210a12a8b7f5c83873adf49f3243e Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Sat, 18 Jul 2020 23:45:55 -0700 Subject: [PATCH 15/23] Enable nullable reference types for TreeStack --- TunnelVisionLabs.Collections.Trees.Test/TreeStackTest.cs | 6 ++---- TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt | 4 ++-- .../TreeStack`1+Enumerator.cs | 4 +--- TunnelVisionLabs.Collections.Trees/TreeStack`1.cs | 7 +++---- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/TunnelVisionLabs.Collections.Trees.Test/TreeStackTest.cs b/TunnelVisionLabs.Collections.Trees.Test/TreeStackTest.cs index e4aba84..f99d7cb 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/TreeStackTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/TreeStackTest.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test { using System; @@ -110,12 +108,12 @@ private static void TestICollectionInterfaceImpl(ICollection collection, bool is public void TestCopyToValidation() { TreeStack stack = CreateTreeStack(Enumerable.Range(0, 10)); - Assert.Throws("dest", () => stack.CopyTo(null, 0)); + Assert.Throws("dest", () => stack.CopyTo(null!, 0)); Assert.Throws("dstIndex", () => stack.CopyTo(new int[stack.Count], -1)); Assert.Throws(string.Empty, () => stack.CopyTo(new int[stack.Count], 1)); ICollection collection = stack; - Assert.Throws("dest", () => collection.CopyTo(null, 0)); + Assert.Throws("dest", () => collection.CopyTo(null!, 0)); Assert.Throws("dstIndex", () => collection.CopyTo(new int[collection.Count], -1)); Assert.Throws("dstIndex", () => collection.CopyTo(Array.CreateInstance(typeof(int), new[] { stack.Count }, new[] { 1 }), 0)); Assert.Throws(string.Empty, () => collection.CopyTo(new int[collection.Count], collection.Count + 1)); diff --git a/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt b/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt index ce3d8f1..c522d89 100644 --- a/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt +++ b/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt @@ -699,7 +699,7 @@ TunnelVisionLabs.Collections.Trees.TreeSet.TryGetValue(T equalValue, out T ac TunnelVisionLabs.Collections.Trees.TreeStack TunnelVisionLabs.Collections.Trees.TreeStack.Clear() -> void TunnelVisionLabs.Collections.Trees.TreeStack.Contains(T item) -> bool -~TunnelVisionLabs.Collections.Trees.TreeStack.CopyTo(T[] array, int arrayIndex) -> void +TunnelVisionLabs.Collections.Trees.TreeStack.CopyTo(T[]! array, int arrayIndex) -> void TunnelVisionLabs.Collections.Trees.TreeStack.Count.get -> int TunnelVisionLabs.Collections.Trees.TreeStack.Enumerator TunnelVisionLabs.Collections.Trees.TreeStack.Enumerator.Current.get -> T @@ -709,7 +709,7 @@ TunnelVisionLabs.Collections.Trees.TreeStack.GetEnumerator() -> TunnelVisionL TunnelVisionLabs.Collections.Trees.TreeStack.Peek() -> T TunnelVisionLabs.Collections.Trees.TreeStack.Pop() -> T TunnelVisionLabs.Collections.Trees.TreeStack.Push(T item) -> void -~TunnelVisionLabs.Collections.Trees.TreeStack.ToArray() -> T[] +TunnelVisionLabs.Collections.Trees.TreeStack.ToArray() -> T[]! TunnelVisionLabs.Collections.Trees.TreeStack.TreeStack() -> void TunnelVisionLabs.Collections.Trees.TreeStack.TreeStack(int branchingFactor) -> void TunnelVisionLabs.Collections.Trees.TreeStack.TrimExcess() -> void diff --git a/TunnelVisionLabs.Collections.Trees/TreeStack`1+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/TreeStack`1+Enumerator.cs index 010ec88..b4a6d83 100644 --- a/TunnelVisionLabs.Collections.Trees/TreeStack`1+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/TreeStack`1+Enumerator.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees { using System.Collections; @@ -21,7 +19,7 @@ internal Enumerator(TreeList.Enumerator enumerator) public T Current => _enumerator.Current; - object IEnumerator.Current => _enumerator.Current; + object? IEnumerator.Current => _enumerator.Current; public void Dispose() => _enumerator.Dispose(); diff --git a/TunnelVisionLabs.Collections.Trees/TreeStack`1.cs b/TunnelVisionLabs.Collections.Trees/TreeStack`1.cs index 9ab9806..d7b5525 100644 --- a/TunnelVisionLabs.Collections.Trees/TreeStack`1.cs +++ b/TunnelVisionLabs.Collections.Trees/TreeStack`1.cs @@ -1,13 +1,12 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees { using System; using System.Collections; using System.Collections.Generic; + using System.Diagnostics.CodeAnalysis; using ICollection = System.Collections.ICollection; public partial class TreeStack : IReadOnlyCollection, ICollection @@ -60,7 +59,7 @@ public T Pop() public void TrimExcess() => _treeList.TrimExcess(); - public bool TryPeek(out T result) + public bool TryPeek([MaybeNullWhen(false)] out T result) { if (_treeList.Count == 0) { @@ -72,7 +71,7 @@ public bool TryPeek(out T result) return true; } - public bool TryPop(out T result) + public bool TryPop([MaybeNullWhen(false)] out T result) { if (_treeList.Count == 0) { From e7d0535cd1b6db3b895aa6583dbea4dda11837ed Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Sat, 18 Jul 2020 23:52:42 -0700 Subject: [PATCH 16/23] Enable nullable reference types for TreeSet --- .../TreeSetTest.cs | 20 ++++----- .../TreeSetWithCollidingHashCodesTest.cs | 8 ++-- .../PublicAPI.Unshipped.txt | 42 +++++++++---------- .../TreeSet`1+Enumerator.cs | 4 +- .../TreeSet`1.cs | 27 ++++++------ 5 files changed, 47 insertions(+), 54 deletions(-) diff --git a/TunnelVisionLabs.Collections.Trees.Test/TreeSetTest.cs b/TunnelVisionLabs.Collections.Trees.Test/TreeSetTest.cs index 5f16c18..258288e 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/TreeSetTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/TreeSetTest.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test { using System; @@ -22,8 +20,8 @@ public void TestTreeSetConstructor() [Fact] public void TestCollectionConstructors() { - Assert.Throws("collection", () => new TreeSet(collection: null)); - Assert.Throws("collection", () => new TreeSet(branchingFactor: 4, collection: null, comparer: null)); + Assert.Throws("collection", () => new TreeSet(collection: null!)); + Assert.Throws("collection", () => new TreeSet(branchingFactor: 4, collection: null!, comparer: null)); var set = new TreeSet(new[] { 1, 1 }); Assert.Single(set); @@ -152,7 +150,7 @@ public void TestICollectionInterface() public void TestCopyToValidation() { TreeSet set = new TreeSet(Enumerable.Range(0, 10)); - Assert.Throws("array", () => set.CopyTo(null, 0, set.Count)); + Assert.Throws("array", () => set.CopyTo(null!, 0, set.Count)); Assert.Throws("arrayIndex", () => set.CopyTo(new int[set.Count], -1, set.Count)); Assert.Throws("count", () => set.CopyTo(new int[set.Count], 0, -1)); Assert.Throws(string.Empty, () => set.CopyTo(new int[set.Count], 1, set.Count)); @@ -310,11 +308,11 @@ public void TestTrimExcess() [Fact] public void TestTryGetValue() { - var set = new TreeSet(StringComparer.OrdinalIgnoreCase); + var set = new TreeSet(StringComparer.OrdinalIgnoreCase); Assert.True(set.Add("a")); Assert.False(set.Add("A")); - Assert.True(set.TryGetValue("a", out string value)); + Assert.True(set.TryGetValue("a", out string? value)); Assert.Equal("a", value); Assert.True(set.TryGetValue("A", out value)); @@ -400,7 +398,7 @@ public void TestRemoveValue() public void TestRemoveWhere() { var set = new TreeSet(4, Enumerable.Range(0, 10), comparer: null); - Assert.Throws(() => set.RemoveWhere(null)); + Assert.Throws(() => set.RemoveWhere(null!)); Assert.Equal(5, set.RemoveWhere(i => (i % 2) == 0)); Assert.Equal(new[] { 1, 3, 5, 7, 9 }, set); @@ -411,10 +409,10 @@ public void TestRemoveWhere() [Fact] public void TestSetComparer() { - IEqualityComparer> setComparer = TreeSet.CreateSetComparer(); + IEqualityComparer?> setComparer = TreeSet.CreateSetComparer(); Assert.True(setComparer.Equals(TreeSet.CreateSetComparer())); Assert.False(setComparer.Equals(null)); - Assert.Equal(setComparer.GetHashCode(), TreeSet.CreateSetComparer().GetHashCode()); + Assert.Equal(setComparer!.GetHashCode(), TreeSet.CreateSetComparer().GetHashCode()); var set = new TreeSet(); var other = new TreeSet(); @@ -431,7 +429,7 @@ public void TestSetComparer() Assert.Equal(setComparer.GetHashCode(set), setComparer.GetHashCode(other)); // Test behavior with non-empty sets - set.UnionWith(Enumerable.Range(0, 10)); + set!.UnionWith(Enumerable.Range(0, 10)); Assert.False(setComparer.Equals(set, other)); other.UnionWith(Enumerable.Range(0, 5)); Assert.False(setComparer.Equals(set, other)); diff --git a/TunnelVisionLabs.Collections.Trees.Test/TreeSetWithCollidingHashCodesTest.cs b/TunnelVisionLabs.Collections.Trees.Test/TreeSetWithCollidingHashCodesTest.cs index b626732..793c430 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/TreeSetWithCollidingHashCodesTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/TreeSetWithCollidingHashCodesTest.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test { using System; @@ -19,11 +17,11 @@ public partial class TreeSetWithCollidingHashCodesTest : AbstractSetTest [Fact] public void TestTryGetValueWithCollidingHashCodes() { - var set = new TreeSet(new ZeroHashCodeEqualityComparer(StringComparer.OrdinalIgnoreCase)); + var set = new TreeSet(new ZeroHashCodeEqualityComparer(StringComparer.OrdinalIgnoreCase)); Assert.True(set.Add("a")); Assert.False(set.Add("A")); - Assert.True(set.TryGetValue("a", out string value)); + Assert.True(set.TryGetValue("a", out string? value)); Assert.Equal("a", value); Assert.True(set.TryGetValue("A", out value)); @@ -34,7 +32,7 @@ public void TestTryGetValueWithCollidingHashCodes() // The test below forces coverage of an edge case. We don't know if the hash code for 'aa' or 'bb' comes // first, so write the test in a way that either will cover the early-exit branch in TryGetValue. - set = new TreeSet(new SubsetHashCodeEqualityComparer(StringComparer.Ordinal, StringComparer.OrdinalIgnoreCase)); + set = new TreeSet(new SubsetHashCodeEqualityComparer(StringComparer.Ordinal, StringComparer.OrdinalIgnoreCase)); Assert.True(set.Add("aa")); Assert.True(set.Add("Aa")); Assert.True(set.Add("bb")); diff --git a/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt b/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt index c522d89..9ce6d66 100644 --- a/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt +++ b/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt @@ -664,38 +664,38 @@ TunnelVisionLabs.Collections.Trees.TreeQueue.TryPeek(out T result) -> bool TunnelVisionLabs.Collections.Trees.TreeSet TunnelVisionLabs.Collections.Trees.TreeSet.Add(T item) -> bool TunnelVisionLabs.Collections.Trees.TreeSet.Clear() -> void -~TunnelVisionLabs.Collections.Trees.TreeSet.Comparer.get -> System.Collections.Generic.IEqualityComparer +TunnelVisionLabs.Collections.Trees.TreeSet.Comparer.get -> System.Collections.Generic.IEqualityComparer! TunnelVisionLabs.Collections.Trees.TreeSet.Contains(T item) -> bool -~TunnelVisionLabs.Collections.Trees.TreeSet.CopyTo(T[] array) -> void -~TunnelVisionLabs.Collections.Trees.TreeSet.CopyTo(T[] array, int arrayIndex) -> void -~TunnelVisionLabs.Collections.Trees.TreeSet.CopyTo(T[] array, int arrayIndex, int count) -> void +TunnelVisionLabs.Collections.Trees.TreeSet.CopyTo(T[]! array) -> void +TunnelVisionLabs.Collections.Trees.TreeSet.CopyTo(T[]! array, int arrayIndex) -> void +TunnelVisionLabs.Collections.Trees.TreeSet.CopyTo(T[]! array, int arrayIndex, int count) -> void TunnelVisionLabs.Collections.Trees.TreeSet.Count.get -> int TunnelVisionLabs.Collections.Trees.TreeSet.Enumerator TunnelVisionLabs.Collections.Trees.TreeSet.Enumerator.Current.get -> T TunnelVisionLabs.Collections.Trees.TreeSet.Enumerator.Dispose() -> void TunnelVisionLabs.Collections.Trees.TreeSet.Enumerator.MoveNext() -> bool -~TunnelVisionLabs.Collections.Trees.TreeSet.ExceptWith(System.Collections.Generic.IEnumerable other) -> void +TunnelVisionLabs.Collections.Trees.TreeSet.ExceptWith(System.Collections.Generic.IEnumerable! other) -> void TunnelVisionLabs.Collections.Trees.TreeSet.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.TreeSet.Enumerator -~TunnelVisionLabs.Collections.Trees.TreeSet.IntersectWith(System.Collections.Generic.IEnumerable other) -> void -~TunnelVisionLabs.Collections.Trees.TreeSet.IsProperSubsetOf(System.Collections.Generic.IEnumerable other) -> bool -~TunnelVisionLabs.Collections.Trees.TreeSet.IsProperSupersetOf(System.Collections.Generic.IEnumerable other) -> bool -~TunnelVisionLabs.Collections.Trees.TreeSet.IsSubsetOf(System.Collections.Generic.IEnumerable other) -> bool -~TunnelVisionLabs.Collections.Trees.TreeSet.IsSupersetOf(System.Collections.Generic.IEnumerable other) -> bool -~TunnelVisionLabs.Collections.Trees.TreeSet.Overlaps(System.Collections.Generic.IEnumerable other) -> bool +TunnelVisionLabs.Collections.Trees.TreeSet.IntersectWith(System.Collections.Generic.IEnumerable! other) -> void +TunnelVisionLabs.Collections.Trees.TreeSet.IsProperSubsetOf(System.Collections.Generic.IEnumerable! other) -> bool +TunnelVisionLabs.Collections.Trees.TreeSet.IsProperSupersetOf(System.Collections.Generic.IEnumerable! other) -> bool +TunnelVisionLabs.Collections.Trees.TreeSet.IsSubsetOf(System.Collections.Generic.IEnumerable! other) -> bool +TunnelVisionLabs.Collections.Trees.TreeSet.IsSupersetOf(System.Collections.Generic.IEnumerable! other) -> bool +TunnelVisionLabs.Collections.Trees.TreeSet.Overlaps(System.Collections.Generic.IEnumerable! other) -> bool TunnelVisionLabs.Collections.Trees.TreeSet.Remove(T item) -> bool -~TunnelVisionLabs.Collections.Trees.TreeSet.RemoveWhere(System.Predicate match) -> int -~TunnelVisionLabs.Collections.Trees.TreeSet.SetEquals(System.Collections.Generic.IEnumerable other) -> bool -~TunnelVisionLabs.Collections.Trees.TreeSet.SymmetricExceptWith(System.Collections.Generic.IEnumerable other) -> void +TunnelVisionLabs.Collections.Trees.TreeSet.RemoveWhere(System.Predicate! match) -> int +TunnelVisionLabs.Collections.Trees.TreeSet.SetEquals(System.Collections.Generic.IEnumerable! other) -> bool +TunnelVisionLabs.Collections.Trees.TreeSet.SymmetricExceptWith(System.Collections.Generic.IEnumerable! other) -> void TunnelVisionLabs.Collections.Trees.TreeSet.TreeSet() -> void -~TunnelVisionLabs.Collections.Trees.TreeSet.TreeSet(System.Collections.Generic.IEnumerable collection) -> void -~TunnelVisionLabs.Collections.Trees.TreeSet.TreeSet(System.Collections.Generic.IEnumerable collection, System.Collections.Generic.IEqualityComparer comparer) -> void -~TunnelVisionLabs.Collections.Trees.TreeSet.TreeSet(System.Collections.Generic.IEqualityComparer comparer) -> void +TunnelVisionLabs.Collections.Trees.TreeSet.TreeSet(System.Collections.Generic.IEnumerable! collection) -> void +TunnelVisionLabs.Collections.Trees.TreeSet.TreeSet(System.Collections.Generic.IEnumerable! collection, System.Collections.Generic.IEqualityComparer? comparer) -> void +TunnelVisionLabs.Collections.Trees.TreeSet.TreeSet(System.Collections.Generic.IEqualityComparer? comparer) -> void TunnelVisionLabs.Collections.Trees.TreeSet.TreeSet(int branchingFactor) -> void -~TunnelVisionLabs.Collections.Trees.TreeSet.TreeSet(int branchingFactor, System.Collections.Generic.IEnumerable collection, System.Collections.Generic.IEqualityComparer comparer) -> void -~TunnelVisionLabs.Collections.Trees.TreeSet.TreeSet(int branchingFactor, System.Collections.Generic.IEqualityComparer comparer) -> void +TunnelVisionLabs.Collections.Trees.TreeSet.TreeSet(int branchingFactor, System.Collections.Generic.IEnumerable! collection, System.Collections.Generic.IEqualityComparer? comparer) -> void +TunnelVisionLabs.Collections.Trees.TreeSet.TreeSet(int branchingFactor, System.Collections.Generic.IEqualityComparer? comparer) -> void TunnelVisionLabs.Collections.Trees.TreeSet.TrimExcess() -> void TunnelVisionLabs.Collections.Trees.TreeSet.TryGetValue(T equalValue, out T actualValue) -> bool -~TunnelVisionLabs.Collections.Trees.TreeSet.UnionWith(System.Collections.Generic.IEnumerable other) -> void +TunnelVisionLabs.Collections.Trees.TreeSet.UnionWith(System.Collections.Generic.IEnumerable! other) -> void TunnelVisionLabs.Collections.Trees.TreeStack TunnelVisionLabs.Collections.Trees.TreeStack.Clear() -> void TunnelVisionLabs.Collections.Trees.TreeStack.Contains(T item) -> bool @@ -787,7 +787,7 @@ static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Create static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.CreateRange(System.Collections.Generic.IEnumerable! items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack! ~static TunnelVisionLabs.Collections.Trees.SortedTreeSet.CreateSetComparer() -> System.Collections.Generic.IEqualityComparer> ~static TunnelVisionLabs.Collections.Trees.SortedTreeSet.CreateSetComparer(System.Collections.Generic.IEqualityComparer memberEqualityComparer) -> System.Collections.Generic.IEqualityComparer> -~static TunnelVisionLabs.Collections.Trees.TreeSet.CreateSetComparer() -> System.Collections.Generic.IEqualityComparer> +static TunnelVisionLabs.Collections.Trees.TreeSet.CreateSetComparer() -> System.Collections.Generic.IEqualityComparer?>! static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary! static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet! static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary! diff --git a/TunnelVisionLabs.Collections.Trees/TreeSet`1+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/TreeSet`1+Enumerator.cs index d69c1ef..920dd1d 100644 --- a/TunnelVisionLabs.Collections.Trees/TreeSet`1+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/TreeSet`1+Enumerator.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees { using System.Collections; @@ -21,7 +19,7 @@ internal Enumerator(SortedTreeList<(int hashCode, T value)>.Enumerator enumerato public T Current => _enumerator.Current.value; - object IEnumerator.Current => Current; + object? IEnumerator.Current => Current; public void Dispose() => _enumerator.Dispose(); diff --git a/TunnelVisionLabs.Collections.Trees/TreeSet`1.cs b/TunnelVisionLabs.Collections.Trees/TreeSet`1.cs index c59da00..bb8fbc1 100644 --- a/TunnelVisionLabs.Collections.Trees/TreeSet`1.cs +++ b/TunnelVisionLabs.Collections.Trees/TreeSet`1.cs @@ -1,14 +1,13 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees { using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; + using System.Diagnostics.CodeAnalysis; using System.Linq; public partial class TreeSet : ISet, IReadOnlyCollection, ICollection @@ -17,7 +16,7 @@ public partial class TreeSet : ISet, IReadOnlyCollection, ICollection private readonly SortedTreeList<(int hashCode, T value)> _sortedList; public TreeSet() - : this(default(IEqualityComparer)) + : this(default(IEqualityComparer?)) { } @@ -26,13 +25,13 @@ public TreeSet(IEnumerable collection) { } - public TreeSet(IEqualityComparer comparer) + public TreeSet(IEqualityComparer? comparer) { _comparer = comparer ?? EqualityComparer.Default; _sortedList = new SortedTreeList<(int hashCode, T value)>(SetHelper.WrapperComparer.Instance); } - public TreeSet(IEnumerable collection, IEqualityComparer comparer) + public TreeSet(IEnumerable collection, IEqualityComparer? comparer) : this(comparer) { if (collection == null) @@ -46,13 +45,13 @@ public TreeSet(int branchingFactor) { } - public TreeSet(int branchingFactor, IEqualityComparer comparer) + public TreeSet(int branchingFactor, IEqualityComparer? comparer) { _comparer = comparer ?? EqualityComparer.Default; _sortedList = new SortedTreeList<(int hashCode, T value)>(branchingFactor, SetHelper.WrapperComparer.Instance); } - public TreeSet(int branchingFactor, IEnumerable collection, IEqualityComparer comparer) + public TreeSet(int branchingFactor, IEnumerable collection, IEqualityComparer? comparer) : this(branchingFactor, comparer) { if (collection == null) @@ -71,7 +70,7 @@ public TreeSet(int branchingFactor, IEnumerable collection, IEqualityComparer object ICollection.SyncRoot => this; - public static IEqualityComparer> CreateSetComparer() + public static IEqualityComparer?> CreateSetComparer() { return TreeSetEqualityComparer.Default; } @@ -451,7 +450,7 @@ public void UnionWith(IEnumerable other) public void TrimExcess() => _sortedList.TrimExcess(); - public bool TryGetValue(T equalValue, out T actualValue) + public bool TryGetValue(T equalValue, [MaybeNullWhen(false)] out T actualValue) { int hashCode = _comparer.GetHashCode(equalValue); @@ -521,9 +520,9 @@ internal void Validate(ValidationRules validationRules) } } - private class TreeSetEqualityComparer : IEqualityComparer> + private class TreeSetEqualityComparer : IEqualityComparer?> { - public static readonly IEqualityComparer> Default = new TreeSetEqualityComparer(); + public static readonly IEqualityComparer?> Default = new TreeSetEqualityComparer(); private readonly IEqualityComparer _comparer = EqualityComparer.Default; @@ -531,7 +530,7 @@ private TreeSetEqualityComparer() { } - public override bool Equals(object obj) + public override bool Equals(object? obj) { if (!(obj is TreeSetEqualityComparer comparer)) return false; @@ -544,7 +543,7 @@ public override int GetHashCode() return _comparer.GetHashCode(); } - public bool Equals(TreeSet x, TreeSet y) + public bool Equals(TreeSet? x, TreeSet? y) { if (x is null) { @@ -582,7 +581,7 @@ public bool Equals(TreeSet x, TreeSet y) return true; } - public int GetHashCode(TreeSet obj) + public int GetHashCode(TreeSet? obj) { if (obj == null) return 0; From 6d3445e5de00bca6ca7be2f015156cda11352963 Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Sat, 18 Jul 2020 23:57:07 -0700 Subject: [PATCH 17/23] Enable nullable reference types for SortedTreeDictionary --- .../SortedTreeDictionaryTest.cs | 22 ++++++------ .../PublicAPI.Unshipped.txt | 16 ++++----- .../SortedTreeDictionary`2+Enumerator.cs | 4 +-- ...eeDictionary`2+KeyCollection+Enumerator.cs | 2 -- .../SortedTreeDictionary`2+KeyCollection.cs | 2 -- ...Dictionary`2+ValueCollection+Enumerator.cs | 4 +-- .../SortedTreeDictionary`2+ValueCollection.cs | 4 +-- .../SortedTreeDictionary`2.cs | 35 +++++++++---------- 8 files changed, 38 insertions(+), 51 deletions(-) diff --git a/TunnelVisionLabs.Collections.Trees.Test/SortedTreeDictionaryTest.cs b/TunnelVisionLabs.Collections.Trees.Test/SortedTreeDictionaryTest.cs index 4e92299..d93bb0b 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/SortedTreeDictionaryTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/SortedTreeDictionaryTest.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test { using System; @@ -23,8 +21,8 @@ public void TestSortedTreeDictionaryConstructor() [Fact] public void TestCollectionConstructors() { - Assert.Throws("collection", () => new SortedTreeDictionary(collection: null)); - Assert.Throws("collection", () => new SortedTreeDictionary(branchingFactor: 4, collection: null, comparer: null)); + Assert.Throws("collection", () => new SortedTreeDictionary(collection: null!)); + Assert.Throws("collection", () => new SortedTreeDictionary(branchingFactor: 4, collection: null!, comparer: null)); Assert.Throws(() => new SortedTreeDictionary(new[] { new KeyValuePair(1, 1), new KeyValuePair(1, 2) })); Assert.Throws(() => new SortedTreeDictionary(branchingFactor: 4, new[] { new KeyValuePair(1, 1), new KeyValuePair(1, 2) }, comparer: null)); @@ -97,7 +95,7 @@ public void TestIDictionaryT() Assert.Equal(Enumerable.Range(0, 9), dictionary.Values); Assert.Throws(() => dictionary.Keys.Add(0)); - Assert.Throws("array", () => dictionary.Keys.CopyTo(null, 0)); + Assert.Throws("array", () => dictionary.Keys.CopyTo(null!, 0)); Assert.Throws("arrayIndex", () => dictionary.Keys.CopyTo(new int[dictionary.Count], -1)); Assert.Throws("arrayIndex", () => dictionary.Keys.CopyTo(new int[dictionary.Count], dictionary.Count + 1)); Assert.Throws(() => dictionary.Keys.CopyTo(new int[dictionary.Count], 1)); @@ -115,7 +113,7 @@ public void TestIDictionaryT() Assert.Equal(0, keyEnumerator.Current); Assert.Throws(() => dictionary.Values.Add(0)); - Assert.Throws("array", () => dictionary.Values.CopyTo(null, 0)); + Assert.Throws("array", () => dictionary.Values.CopyTo(null!, 0)); Assert.Throws("arrayIndex", () => dictionary.Values.CopyTo(new int[dictionary.Count], -1)); Assert.Throws("arrayIndex", () => dictionary.Values.CopyTo(new int[dictionary.Count], dictionary.Count + 1)); Assert.Throws(() => dictionary.Values.CopyTo(new int[dictionary.Count], 1)); @@ -168,7 +166,7 @@ public void TestIDictionary() Assert.False(dictionary.IsReadOnly); Assert.False(dictionary.IsSynchronized); - Assert.Throws("key", () => dictionary.Add(key: null, value: 1)); + Assert.Throws("key", () => dictionary.Add(key: null!, value: 1)); Assert.Throws("value", () => dictionary.Add(key: 1, value: null)); Assert.Throws("key", () => dictionary.Add(key: "string value", value: 0)); Assert.Throws("value", () => dictionary.Add(key: 0, value: "string value")); @@ -176,11 +174,11 @@ public void TestIDictionary() for (int i = 0; i < 11; i++) dictionary.Add(i, i + 1); - Assert.Throws("key", () => dictionary[key: null]); + Assert.Throws("key", () => dictionary[key: null!]); Assert.Null(dictionary["string key"]); Assert.Equal(11, dictionary[10]); - Assert.Throws("key", () => dictionary[key: null] = 12); + Assert.Throws("key", () => dictionary[key: null!] = 12); Assert.Throws("key", () => dictionary["string key"] = 12); Assert.Throws("value", () => dictionary[10] = null); Assert.Throws("value", () => dictionary[10] = "string value"); @@ -195,11 +193,11 @@ public void TestIDictionary() Assert.Equal(entries.Select(i => i.Key), dictionary.Keys.Cast()); Assert.Equal(entries.Select(i => i.Value), dictionary.Values.Cast()); - Assert.Throws(() => dictionary.Contains(null)); + Assert.Throws(() => dictionary.Contains(null!)); Assert.False(dictionary.Contains("string value")); Assert.True(dictionary.Contains(10)); - Assert.Throws(() => dictionary.Remove(null)); + Assert.Throws(() => dictionary.Remove(null!)); Assert.Equal(11, dictionary.Count); dictionary.Remove("string value"); Assert.Equal(11, dictionary.Count); @@ -248,7 +246,7 @@ void TestCollection(ICollection collection, Func indexToExpectedValue Assert.False(collection.IsSynchronized); Assert.Same(dictionary, collection.SyncRoot); - Assert.Throws("array", () => collection.CopyTo(null, 0)); + Assert.Throws("array", () => collection.CopyTo(null!, 0)); Assert.Throws(() => collection.CopyTo(new int[collection.Count, 1], 0)); Assert.Throws(() => collection.CopyTo(Array.CreateInstance(typeof(int), lengths: new[] { collection.Count }, lowerBounds: new[] { 1 }), 0)); Assert.Throws("index", () => collection.CopyTo(new int[collection.Count], -1)); diff --git a/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt b/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt index 9ce6d66..218bc06 100644 --- a/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt +++ b/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt @@ -405,7 +405,7 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Push(T value) TunnelVisionLabs.Collections.Trees.SortedTreeDictionary TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.Add(TKey key, TValue value) -> void TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.Clear() -> void -~TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.Comparer.get -> System.Collections.Generic.IComparer +TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.Comparer.get -> System.Collections.Generic.IComparer! TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.ContainsKey(TKey key) -> bool TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.ContainsValue(TValue value) -> bool TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.Count.get -> int @@ -419,7 +419,7 @@ TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.IndexOfVal TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.KeyCollection TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.KeyCollection.Clear() -> void TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.KeyCollection.Contains(TKey item) -> bool -~TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.KeyCollection.CopyTo(TKey[] array, int arrayIndex) -> void +TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.KeyCollection.CopyTo(TKey[]! array, int arrayIndex) -> void TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.KeyCollection.Count.get -> int TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.KeyCollection.Enumerator TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.KeyCollection.Enumerator.Current.get -> TKey @@ -430,18 +430,18 @@ TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.KeyCollect TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.Keys.get -> TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.KeyCollection TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.Remove(TKey key) -> bool TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.SortedTreeDictionary() -> void -~TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.SortedTreeDictionary(System.Collections.Generic.IComparer comparer) -> void -~TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.SortedTreeDictionary(System.Collections.Generic.IEnumerable> collection) -> void -~TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.SortedTreeDictionary(System.Collections.Generic.IEnumerable> collection, System.Collections.Generic.IComparer comparer) -> void +TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.SortedTreeDictionary(System.Collections.Generic.IComparer? comparer) -> void +TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.SortedTreeDictionary(System.Collections.Generic.IEnumerable>! collection) -> void +TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.SortedTreeDictionary(System.Collections.Generic.IEnumerable>! collection, System.Collections.Generic.IComparer? comparer) -> void TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.SortedTreeDictionary(int branchingFactor) -> void -~TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.SortedTreeDictionary(int branchingFactor, System.Collections.Generic.IComparer comparer) -> void -~TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.SortedTreeDictionary(int branchingFactor, System.Collections.Generic.IEnumerable> collection, System.Collections.Generic.IComparer comparer) -> void +TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.SortedTreeDictionary(int branchingFactor, System.Collections.Generic.IComparer? comparer) -> void +TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.SortedTreeDictionary(int branchingFactor, System.Collections.Generic.IEnumerable>! collection, System.Collections.Generic.IComparer? comparer) -> void TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.TryAdd(TKey key, TValue value) -> bool TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.TryGetValue(TKey key, out TValue value) -> bool TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.ValueCollection TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.ValueCollection.Clear() -> void TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.ValueCollection.Contains(TValue item) -> bool -~TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.ValueCollection.CopyTo(TValue[] array, int arrayIndex) -> void +TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.ValueCollection.CopyTo(TValue[]! array, int arrayIndex) -> void TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.ValueCollection.Count.get -> int TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.ValueCollection.Enumerator TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.ValueCollection.Enumerator.Current.get -> TValue diff --git a/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+Enumerator.cs index 26c110c..6b6cd08 100644 --- a/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+Enumerator.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees { using System.Collections; @@ -48,7 +46,7 @@ internal enum ReturnType object IDictionaryEnumerator.Key => Current.Key; - object IDictionaryEnumerator.Value => Current.Value; + object? IDictionaryEnumerator.Value => Current.Value; public void Dispose() => _enumerator.Dispose(); diff --git a/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+KeyCollection+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+KeyCollection+Enumerator.cs index 1729186..cabcd6a 100644 --- a/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+KeyCollection+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+KeyCollection+Enumerator.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees { using System.Collections; diff --git a/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+KeyCollection.cs b/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+KeyCollection.cs index bb8ef38..b1e3700 100644 --- a/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+KeyCollection.cs +++ b/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+KeyCollection.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees { using System; diff --git a/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+ValueCollection+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+ValueCollection+Enumerator.cs index d1230d0..e2f3aef 100644 --- a/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+ValueCollection+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+ValueCollection+Enumerator.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees { using System.Collections; @@ -23,7 +21,7 @@ internal Enumerator(SortedTreeDictionary.Enumerator enumerator) public TValue Current => _enumerator.Current.Value; - object IEnumerator.Current => Current; + object? IEnumerator.Current => Current; public void Dispose() => _enumerator.Dispose(); diff --git a/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+ValueCollection.cs b/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+ValueCollection.cs index 984d390..da89bf5 100644 --- a/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+ValueCollection.cs +++ b/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2+ValueCollection.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees { using System; @@ -74,7 +72,7 @@ void ICollection.CopyTo(Array array, int index) { CopyTo(values, index); } - else if (array is object[] objects) + else if (array is object?[] objects) { try { diff --git a/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2.cs b/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2.cs index 3910656..d410fba 100644 --- a/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2.cs +++ b/TunnelVisionLabs.Collections.Trees/SortedTreeDictionary`2.cs @@ -1,18 +1,17 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees { using System; using System.Collections; using System.Collections.Generic; - using System.Diagnostics; + using System.Diagnostics.CodeAnalysis; using System.Linq; using IDictionary = System.Collections.IDictionary; public partial class SortedTreeDictionary : IDictionary, IReadOnlyDictionary, IDictionary + where TKey : notnull { private readonly IComparer _comparer; private readonly SortedTreeSet> _treeSet; @@ -27,13 +26,13 @@ public SortedTreeDictionary(IEnumerable> collection) { } - public SortedTreeDictionary(IComparer comparer) + public SortedTreeDictionary(IComparer? comparer) { _comparer = comparer ?? Comparer.Default; _treeSet = new SortedTreeSet>(new KeyOfPairComparer(_comparer)); } - public SortedTreeDictionary(IEnumerable> collection, IComparer comparer) + public SortedTreeDictionary(IEnumerable> collection, IComparer? comparer) : this(comparer) { if (collection == null) @@ -50,13 +49,13 @@ public SortedTreeDictionary(int branchingFactor) { } - public SortedTreeDictionary(int branchingFactor, IComparer comparer) + public SortedTreeDictionary(int branchingFactor, IComparer? comparer) { _comparer = comparer ?? Comparer.Default; _treeSet = new SortedTreeSet>(branchingFactor, new KeyOfPairComparer(_comparer)); } - public SortedTreeDictionary(int branchingFactor, IEnumerable> collection, IComparer comparer) + public SortedTreeDictionary(int branchingFactor, IEnumerable> collection, IComparer? comparer) : this(branchingFactor, comparer) { if (collection == null) @@ -102,7 +101,7 @@ public TValue this[TKey key] { get { - if (!_treeSet.TryGetValue(new KeyValuePair(key, default), out KeyValuePair value)) + if (!_treeSet.TryGetValue(new KeyValuePair(key, default!), out KeyValuePair value)) throw new KeyNotFoundException(); return value.Value; @@ -110,12 +109,12 @@ public TValue this[TKey key] set { - _treeSet.Remove(new KeyValuePair(key, default)); + _treeSet.Remove(new KeyValuePair(key, default!)); _treeSet.Add(new KeyValuePair(key, value)); } } - object IDictionary.this[object key] + object? IDictionary.this[object key] { get { @@ -142,7 +141,7 @@ object IDictionary.this[object key] var typedKey = (TKey)key; try { - this[typedKey] = (TValue)value; + this[typedKey] = (TValue)value!; } catch (InvalidCastException) { @@ -156,17 +155,17 @@ object IDictionary.this[object key] } } - public bool ContainsKey(TKey key) => _treeSet.Contains(new KeyValuePair(key, default)); + public bool ContainsKey(TKey key) => _treeSet.Contains(new KeyValuePair(key, default!)); - public int IndexOfKey(TKey key) => _treeSet.IndexOf(new KeyValuePair(key, default)); + public int IndexOfKey(TKey key) => _treeSet.IndexOf(new KeyValuePair(key, default!)); public bool ContainsValue(TValue value) => _treeSet.Any(pair => EqualityComparer.Default.Equals(pair.Value, value)); public int IndexOfValue(TValue value) => _treeSet.FindIndex(pair => EqualityComparer.Default.Equals(pair.Value, value)); - public bool TryGetValue(TKey key, out TValue value) + public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value) { - if (!_treeSet.TryGetValue(new KeyValuePair(key, default), out KeyValuePair pair)) + if (!_treeSet.TryGetValue(new KeyValuePair(key, default!), out KeyValuePair pair)) { value = default; return false; @@ -188,7 +187,7 @@ public void Add(TKey key, TValue value) public void Clear() => _treeSet.Clear(); - public bool Remove(TKey key) => _treeSet.Remove(new KeyValuePair(key, default)); + public bool Remove(TKey key) => _treeSet.Remove(new KeyValuePair(key, default!)); void ICollection>.Add(KeyValuePair item) => Add(item.Key, item.Value); @@ -215,7 +214,7 @@ bool ICollection>.Remove(KeyValuePair i return true; } - void IDictionary.Add(object key, object value) + void IDictionary.Add(object key, object? value) { if (key == null) throw new ArgumentNullException(nameof(key)); @@ -227,7 +226,7 @@ void IDictionary.Add(object key, object value) var typedKey = (TKey)key; try { - Add(typedKey, (TValue)value); + Add(typedKey, (TValue)value!); } catch (InvalidCastException) { From 7f267f76263bbbfb92f46d0f414c9a70d8ae1c51 Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Sun, 19 Jul 2020 00:00:15 -0700 Subject: [PATCH 18/23] Enable nullable reference types for SortedTreeList --- .../SortedTreeListTest.cs | 38 +++++++------- .../PublicAPI.Unshipped.txt | 50 +++++++++---------- .../SortedTreeList`1+Enumerator.cs | 4 +- .../SortedTreeList`1.cs | 34 +++++++------ 4 files changed, 62 insertions(+), 64 deletions(-) diff --git a/TunnelVisionLabs.Collections.Trees.Test/SortedTreeListTest.cs b/TunnelVisionLabs.Collections.Trees.Test/SortedTreeListTest.cs index c51c5e2..82531c8 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/SortedTreeListTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/SortedTreeListTest.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test { using System; @@ -22,7 +20,7 @@ public void TestTreeListConstructor() SortedTreeList list = new SortedTreeList(); Assert.Empty(list); - Assert.Throws(() => new SortedTreeList(collection: null)); + Assert.Throws(() => new SortedTreeList(collection: null!)); } [Fact] @@ -136,7 +134,7 @@ private static void TestIListInterfaceImpl(IList list, bool supportsNullValues) list.Remove("Text"); Assert.Equal(originalCount, list.Count); - object removedItem = list[0]; + object? removedItem = list[0]; list.Remove(list[0]); Assert.Equal(originalCount - 1, list.Count); Assert.True(list.Contains(removedItem)); @@ -294,7 +292,7 @@ public void TestIndexer() public void TestCopyToValidation() { SortedTreeList list = new SortedTreeList(Enumerable.Range(0, 10)); - Assert.Throws("dest", () => list.CopyTo(0, null, 0, list.Count)); + Assert.Throws("dest", () => list.CopyTo(0, null!, 0, list.Count)); Assert.Throws("srcIndex", () => list.CopyTo(-1, new int[list.Count], 0, list.Count)); Assert.Throws("dstIndex", () => list.CopyTo(0, new int[list.Count], -1, list.Count)); Assert.Throws("length", () => list.CopyTo(0, new int[list.Count], 0, -1)); @@ -358,7 +356,7 @@ public void TestAddRange() int[] actual = list.ToArray(); Assert.Equal(expected, actual); - Assert.Throws(() => list.AddRange(null)); + Assert.Throws(() => list.AddRange(null!)); } [Fact] @@ -433,8 +431,8 @@ public void TestForEach() var list = new SortedTreeList(branchingFactor: 4, collection: Enumerable.Range(0, 100), comparer: null); var reference = new List(Enumerable.Range(0, 100)); - Assert.Throws("action", () => list.ForEach(null)); - Assert.Throws(() => reference.ForEach(null)); + Assert.Throws("action", () => list.ForEach(null!)); + Assert.Throws(() => reference.ForEach(null!)); var listOutput = new List(); var referenceOutput = new List(); @@ -588,9 +586,9 @@ public void TestFindIndex() reference.Sort(); - Assert.Throws(() => list.FindIndex(null)); - Assert.Throws(() => list.FindIndex(0, null)); - Assert.Throws(() => list.FindIndex(0, 0, null)); + Assert.Throws(() => list.FindIndex(null!)); + Assert.Throws(() => list.FindIndex(0, null!)); + Assert.Throws(() => list.FindIndex(0, 0, null!)); Assert.Throws(() => list.FindIndex(-1, i => true)); Assert.Throws(() => list.FindIndex(0, -1, i => true)); @@ -631,9 +629,9 @@ public void TestFindLastIndex() reference.Sort(); - Assert.Throws(() => list.FindLastIndex(null)); - Assert.Throws(() => list.FindLastIndex(-1, null)); - Assert.Throws(() => list.FindLastIndex(-1, 0, null)); + Assert.Throws(() => list.FindLastIndex(null!)); + Assert.Throws(() => list.FindLastIndex(-1, null!)); + Assert.Throws(() => list.FindLastIndex(-1, 0, null!)); Assert.Throws(() => list.FindLastIndex(list.Count, i => true)); Assert.Throws(() => list.FindLastIndex(list.Count - 1, -1, i => true)); @@ -815,7 +813,7 @@ public void TestRemoveValue() public void TestRemoveAll() { var list = new SortedTreeList(4, Enumerable.Range(0, 10), comparer: null); - Assert.Throws(() => list.RemoveAll(null)); + Assert.Throws(() => list.RemoveAll(null!)); Assert.Equal(5, list.RemoveAll(i => (i % 2) == 0)); Assert.Equal(new[] { 1, 3, 5, 7, 9 }, list); @@ -827,7 +825,7 @@ public void TestRemoveAll() public void TestExists() { var list = new SortedTreeList(4, Enumerable.Range(0, 10), comparer: null); - Assert.Throws(() => list.Exists(null)); + Assert.Throws(() => list.Exists(null!)); Assert.False(list.Exists(value => value < 0)); foreach (var i in list) @@ -842,7 +840,7 @@ public void TestExists() public void TestFind() { var list = new SortedTreeList(4, Enumerable.Range(1, 10), comparer: null); - Assert.Throws(() => list.Find(null)); + Assert.Throws(() => list.Find(null!)); Assert.Equal(0, list.Find(value => value < 0)); foreach (var i in list) @@ -857,7 +855,7 @@ public void TestFind() public void TestFindAll() { var list = new SortedTreeList(4, Enumerable.Range(0, 10), comparer: null); - Assert.Throws(() => list.FindAll(null)); + Assert.Throws(() => list.FindAll(null!)); SortedTreeList found = list.FindAll(i => (i % 2) == 0); @@ -873,7 +871,7 @@ public void TestFindLast() { var list = new SortedTreeList(4, Enumerable.Range(1, 10), comparer: null); var reference = new List(Enumerable.Range(1, 10)); - Assert.Throws(() => list.FindLast(null)); + Assert.Throws(() => list.FindLast(null!)); Assert.Equal(0, list.FindLast(i => i < 0)); Assert.Equal(0, reference.FindLast(i => i < 0)); @@ -890,7 +888,7 @@ public void TestTrueForAll() { var list = new SortedTreeList(); Assert.True(list.TrueForAll(i => false)); - Assert.Throws(() => list.TrueForAll(null)); + Assert.Throws(() => list.TrueForAll(null!)); list.Add(1); Assert.True(list.TrueForAll(i => i > 0)); diff --git a/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt b/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt index 218bc06..25f2ee1 100644 --- a/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt +++ b/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt @@ -453,33 +453,33 @@ TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.this[TKey TunnelVisionLabs.Collections.Trees.SortedTreeDictionary.this[TKey key].set -> void TunnelVisionLabs.Collections.Trees.SortedTreeList TunnelVisionLabs.Collections.Trees.SortedTreeList.Add(T item) -> void -~TunnelVisionLabs.Collections.Trees.SortedTreeList.AddRange(System.Collections.Generic.IEnumerable collection) -> void +TunnelVisionLabs.Collections.Trees.SortedTreeList.AddRange(System.Collections.Generic.IEnumerable! collection) -> void TunnelVisionLabs.Collections.Trees.SortedTreeList.BinarySearch(T item) -> int TunnelVisionLabs.Collections.Trees.SortedTreeList.BinarySearch(int index, int count, T item) -> int TunnelVisionLabs.Collections.Trees.SortedTreeList.Clear() -> void -~TunnelVisionLabs.Collections.Trees.SortedTreeList.Comparer.get -> System.Collections.Generic.IComparer +TunnelVisionLabs.Collections.Trees.SortedTreeList.Comparer.get -> System.Collections.Generic.IComparer! TunnelVisionLabs.Collections.Trees.SortedTreeList.Contains(T item) -> bool -~TunnelVisionLabs.Collections.Trees.SortedTreeList.CopyTo(T[] array) -> void -~TunnelVisionLabs.Collections.Trees.SortedTreeList.CopyTo(T[] array, int arrayIndex) -> void -~TunnelVisionLabs.Collections.Trees.SortedTreeList.CopyTo(int index, T[] array, int arrayIndex, int count) -> void +TunnelVisionLabs.Collections.Trees.SortedTreeList.CopyTo(T[]! array) -> void +TunnelVisionLabs.Collections.Trees.SortedTreeList.CopyTo(T[]! array, int arrayIndex) -> void +TunnelVisionLabs.Collections.Trees.SortedTreeList.CopyTo(int index, T[]! array, int arrayIndex, int count) -> void TunnelVisionLabs.Collections.Trees.SortedTreeList.Count.get -> int TunnelVisionLabs.Collections.Trees.SortedTreeList.Enumerator TunnelVisionLabs.Collections.Trees.SortedTreeList.Enumerator.Current.get -> T TunnelVisionLabs.Collections.Trees.SortedTreeList.Enumerator.Dispose() -> void TunnelVisionLabs.Collections.Trees.SortedTreeList.Enumerator.MoveNext() -> bool -~TunnelVisionLabs.Collections.Trees.SortedTreeList.Exists(System.Predicate match) -> bool -~TunnelVisionLabs.Collections.Trees.SortedTreeList.Find(System.Predicate match) -> T -~TunnelVisionLabs.Collections.Trees.SortedTreeList.FindAll(System.Predicate match) -> TunnelVisionLabs.Collections.Trees.SortedTreeList -~TunnelVisionLabs.Collections.Trees.SortedTreeList.FindIndex(System.Predicate match) -> int -~TunnelVisionLabs.Collections.Trees.SortedTreeList.FindIndex(int startIndex, System.Predicate match) -> int -~TunnelVisionLabs.Collections.Trees.SortedTreeList.FindIndex(int startIndex, int count, System.Predicate match) -> int -~TunnelVisionLabs.Collections.Trees.SortedTreeList.FindLast(System.Predicate match) -> T -~TunnelVisionLabs.Collections.Trees.SortedTreeList.FindLastIndex(System.Predicate match) -> int -~TunnelVisionLabs.Collections.Trees.SortedTreeList.FindLastIndex(int startIndex, System.Predicate match) -> int -~TunnelVisionLabs.Collections.Trees.SortedTreeList.FindLastIndex(int startIndex, int count, System.Predicate match) -> int -~TunnelVisionLabs.Collections.Trees.SortedTreeList.ForEach(System.Action action) -> void +TunnelVisionLabs.Collections.Trees.SortedTreeList.Exists(System.Predicate! match) -> bool +TunnelVisionLabs.Collections.Trees.SortedTreeList.Find(System.Predicate! match) -> T +TunnelVisionLabs.Collections.Trees.SortedTreeList.FindAll(System.Predicate! match) -> TunnelVisionLabs.Collections.Trees.SortedTreeList! +TunnelVisionLabs.Collections.Trees.SortedTreeList.FindIndex(System.Predicate! match) -> int +TunnelVisionLabs.Collections.Trees.SortedTreeList.FindIndex(int startIndex, System.Predicate! match) -> int +TunnelVisionLabs.Collections.Trees.SortedTreeList.FindIndex(int startIndex, int count, System.Predicate! match) -> int +TunnelVisionLabs.Collections.Trees.SortedTreeList.FindLast(System.Predicate! match) -> T +TunnelVisionLabs.Collections.Trees.SortedTreeList.FindLastIndex(System.Predicate! match) -> int +TunnelVisionLabs.Collections.Trees.SortedTreeList.FindLastIndex(int startIndex, System.Predicate! match) -> int +TunnelVisionLabs.Collections.Trees.SortedTreeList.FindLastIndex(int startIndex, int count, System.Predicate! match) -> int +TunnelVisionLabs.Collections.Trees.SortedTreeList.ForEach(System.Action! action) -> void TunnelVisionLabs.Collections.Trees.SortedTreeList.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.SortedTreeList.Enumerator -~TunnelVisionLabs.Collections.Trees.SortedTreeList.GetRange(int index, int count) -> TunnelVisionLabs.Collections.Trees.SortedTreeList +TunnelVisionLabs.Collections.Trees.SortedTreeList.GetRange(int index, int count) -> TunnelVisionLabs.Collections.Trees.SortedTreeList! TunnelVisionLabs.Collections.Trees.SortedTreeList.IndexOf(T item) -> int TunnelVisionLabs.Collections.Trees.SortedTreeList.IndexOf(T item, int index) -> int TunnelVisionLabs.Collections.Trees.SortedTreeList.IndexOf(T item, int index, int count) -> int @@ -487,19 +487,19 @@ TunnelVisionLabs.Collections.Trees.SortedTreeList.LastIndexOf(T item) -> int TunnelVisionLabs.Collections.Trees.SortedTreeList.LastIndexOf(T item, int index) -> int TunnelVisionLabs.Collections.Trees.SortedTreeList.LastIndexOf(T item, int index, int count) -> int TunnelVisionLabs.Collections.Trees.SortedTreeList.Remove(T item) -> bool -~TunnelVisionLabs.Collections.Trees.SortedTreeList.RemoveAll(System.Predicate match) -> int +TunnelVisionLabs.Collections.Trees.SortedTreeList.RemoveAll(System.Predicate! match) -> int TunnelVisionLabs.Collections.Trees.SortedTreeList.RemoveAt(int index) -> void TunnelVisionLabs.Collections.Trees.SortedTreeList.RemoveRange(int index, int count) -> void TunnelVisionLabs.Collections.Trees.SortedTreeList.SortedTreeList() -> void -~TunnelVisionLabs.Collections.Trees.SortedTreeList.SortedTreeList(System.Collections.Generic.IComparer comparer) -> void -~TunnelVisionLabs.Collections.Trees.SortedTreeList.SortedTreeList(System.Collections.Generic.IEnumerable collection) -> void -~TunnelVisionLabs.Collections.Trees.SortedTreeList.SortedTreeList(System.Collections.Generic.IEnumerable collection, System.Collections.Generic.IComparer comparer) -> void +TunnelVisionLabs.Collections.Trees.SortedTreeList.SortedTreeList(System.Collections.Generic.IComparer? comparer) -> void +TunnelVisionLabs.Collections.Trees.SortedTreeList.SortedTreeList(System.Collections.Generic.IEnumerable! collection) -> void +TunnelVisionLabs.Collections.Trees.SortedTreeList.SortedTreeList(System.Collections.Generic.IEnumerable! collection, System.Collections.Generic.IComparer? comparer) -> void TunnelVisionLabs.Collections.Trees.SortedTreeList.SortedTreeList(int branchingFactor) -> void -~TunnelVisionLabs.Collections.Trees.SortedTreeList.SortedTreeList(int branchingFactor, System.Collections.Generic.IComparer comparer) -> void -~TunnelVisionLabs.Collections.Trees.SortedTreeList.SortedTreeList(int branchingFactor, System.Collections.Generic.IEnumerable collection, System.Collections.Generic.IComparer comparer) -> void -~TunnelVisionLabs.Collections.Trees.SortedTreeList.ToArray() -> T[] +TunnelVisionLabs.Collections.Trees.SortedTreeList.SortedTreeList(int branchingFactor, System.Collections.Generic.IComparer? comparer) -> void +TunnelVisionLabs.Collections.Trees.SortedTreeList.SortedTreeList(int branchingFactor, System.Collections.Generic.IEnumerable! collection, System.Collections.Generic.IComparer? comparer) -> void +TunnelVisionLabs.Collections.Trees.SortedTreeList.ToArray() -> T[]! TunnelVisionLabs.Collections.Trees.SortedTreeList.TrimExcess() -> void -~TunnelVisionLabs.Collections.Trees.SortedTreeList.TrueForAll(System.Predicate match) -> bool +TunnelVisionLabs.Collections.Trees.SortedTreeList.TrueForAll(System.Predicate! match) -> bool TunnelVisionLabs.Collections.Trees.SortedTreeList.this[int index].get -> T TunnelVisionLabs.Collections.Trees.SortedTreeSet TunnelVisionLabs.Collections.Trees.SortedTreeSet.Add(T item) -> bool diff --git a/TunnelVisionLabs.Collections.Trees/SortedTreeList`1+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/SortedTreeList`1+Enumerator.cs index 8018cc7..91055e2 100644 --- a/TunnelVisionLabs.Collections.Trees/SortedTreeList`1+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/SortedTreeList`1+Enumerator.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees { using System; @@ -22,7 +20,7 @@ internal Enumerator(TreeList.Enumerator enumerator) public T Current => _enumerator.Current; - object IEnumerator.Current => Current; + object? IEnumerator.Current => Current; public void Dispose() => ((IDisposable)_enumerator).Dispose(); diff --git a/TunnelVisionLabs.Collections.Trees/SortedTreeList`1.cs b/TunnelVisionLabs.Collections.Trees/SortedTreeList`1.cs index 7ae03f4..0b69452 100644 --- a/TunnelVisionLabs.Collections.Trees/SortedTreeList`1.cs +++ b/TunnelVisionLabs.Collections.Trees/SortedTreeList`1.cs @@ -1,14 +1,13 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees { using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; + using System.Diagnostics.CodeAnalysis; public partial class SortedTreeList : IList, IReadOnlyList, IList { @@ -25,13 +24,13 @@ public SortedTreeList(IEnumerable collection) { } - public SortedTreeList(IComparer comparer) + public SortedTreeList(IComparer? comparer) { _comparer = comparer ?? Comparer.Default; _treeList = new TreeList(); } - public SortedTreeList(IEnumerable collection, IComparer comparer) + public SortedTreeList(IEnumerable collection, IComparer? comparer) : this(comparer) { AddRange(collection); @@ -42,13 +41,13 @@ public SortedTreeList(int branchingFactor) { } - public SortedTreeList(int branchingFactor, IComparer comparer) + public SortedTreeList(int branchingFactor, IComparer? comparer) { _comparer = comparer ?? Comparer.Default; _treeList = new TreeList(branchingFactor); } - public SortedTreeList(int branchingFactor, IEnumerable collection, IComparer comparer) + public SortedTreeList(int branchingFactor, IEnumerable collection, IComparer? comparer) : this(branchingFactor, comparer) { AddRange(collection); @@ -79,7 +78,7 @@ T IList.this[int index] set => throw new NotSupportedException(); } - object IList.this[int index] + object? IList.this[int index] { get => this[index]; set => throw new NotSupportedException(); @@ -155,6 +154,7 @@ public void AddRange(IEnumerable collection) public bool Exists(Predicate match) => _treeList.Exists(match); + [return: MaybeNull] public T Find(Predicate match) => _treeList.Find(match); public SortedTreeList FindAll(Predicate match) => new SortedTreeList(_treeList.FindAll(match), _comparer); @@ -165,6 +165,7 @@ public void AddRange(IEnumerable collection) public int FindIndex(int startIndex, int count, Predicate match) => _treeList.FindIndex(startIndex, count, match); + [return: MaybeNull] public T FindLast(Predicate match) => _treeList.FindLast(match); public int FindLastIndex(Predicate match) => _treeList.FindLastIndex(match); @@ -207,29 +208,30 @@ public int LastIndexOf(T item, int index, int count) IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); - int IList.Add(object value) + int IList.Add(object? value) { if (value == null && default(T) != null) throw new ArgumentNullException(nameof(value)); try { - Add((T)value); + Add((T)value!); } catch (InvalidCastException) { + Debug.Assert(value is object, $"Assertion failed: {nameof(value)} is object"); throw new ArgumentException(string.Format("The value \"{0}\" isn't of type \"{1}\" and can't be used in this generic collection.", value.GetType(), typeof(T)), nameof(value)); } return Count - 1; } - bool IList.Contains(object value) + bool IList.Contains(object? value) { if (value == null) { if (default(T) == null) - return Contains(default); + return Contains(default!); } else if (value is T) { @@ -239,12 +241,12 @@ bool IList.Contains(object value) return false; } - int IList.IndexOf(object value) + int IList.IndexOf(object? value) { if (value == null) { if (default(T) == null) - return IndexOf(default); + return IndexOf(default!); } else if (value is T) { @@ -259,12 +261,12 @@ void IList.Insert(int index, T item) throw new NotSupportedException(); } - void IList.Insert(int index, object value) + void IList.Insert(int index, object? value) { throw new NotSupportedException(); } - void IList.Remove(object value) + void IList.Remove(object? value) { int index = ((IList)this).IndexOf(value); if (index >= 0) @@ -301,7 +303,7 @@ public CoercingComparer(IComparer underlyingComparer, int coerceResult) public bool FoundMatch => _foundMatch; - public int Compare(T x, T y) + public int Compare([AllowNull] T x, [AllowNull] T y) { int result = _underlyingComparer.Compare(x, y); if (result != 0) From b035f82330c94e6a3a9b95695dc75bec67e1be5e Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Sun, 19 Jul 2020 00:06:36 -0700 Subject: [PATCH 19/23] Enable nullable reference types for SortedTreeSet --- .../SortedTreeSetTest.cs | 27 ++++++------ .../PublicAPI.Unshipped.txt | 44 +++++++++---------- .../SortedTreeSet`1+Enumerator.cs | 4 +- .../SortedTreeSet`1.cs | 31 ++++++------- 4 files changed, 52 insertions(+), 54 deletions(-) diff --git a/TunnelVisionLabs.Collections.Trees.Test/SortedTreeSetTest.cs b/TunnelVisionLabs.Collections.Trees.Test/SortedTreeSetTest.cs index 3fb1655..9293d8c 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/SortedTreeSetTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/SortedTreeSetTest.cs @@ -1,13 +1,12 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test { using System; using System.Collections; using System.Collections.Generic; + using System.Diagnostics.CodeAnalysis; using System.Linq; using Xunit; @@ -23,7 +22,7 @@ public void TestTreeSetConstructor() [Fact] public void TestCollectionConstructor() { - Assert.Throws(() => new SortedTreeSet(collection: null)); + Assert.Throws(() => new SortedTreeSet(collection: null!)); var set = new SortedTreeSet(new[] { 1, 1 }); Assert.Single(set); @@ -54,8 +53,8 @@ public void TestEmptySetMinMax() private void TestEmptySetMinMaxImpl() { var set = new SortedTreeSet(); - Assert.Equal(default, set.Min); - Assert.Equal(default, set.Max); + Assert.Equal(default!, set.Min!); + Assert.Equal(default!, set.Max!); } [Fact] @@ -149,7 +148,7 @@ public void TestICollectionInterface() public void TestCopyToValidation() { SortedTreeSet set = new SortedTreeSet(Enumerable.Range(0, 10)); - Assert.Throws("dest", () => set.CopyTo(null, 0, set.Count)); + Assert.Throws("dest", () => set.CopyTo(null!, 0, set.Count)); Assert.Throws("dstIndex", () => set.CopyTo(new int[set.Count], -1, set.Count)); Assert.Throws("length", () => set.CopyTo(new int[set.Count], 0, -1)); Assert.Throws(string.Empty, () => set.CopyTo(new int[set.Count], 1, set.Count)); @@ -307,11 +306,11 @@ public void TestTrimExcess() [Fact] public void TestTryGetValue() { - var set = new SortedTreeSet(StringComparer.OrdinalIgnoreCase); + var set = new SortedTreeSet(StringComparer.OrdinalIgnoreCase); Assert.True(set.Add("a")); Assert.False(set.Add("A")); - Assert.True(set.TryGetValue("a", out string value)); + Assert.True(set.TryGetValue("a", out string? value)); Assert.Equal("a", value); Assert.True(set.TryGetValue("A", out value)); @@ -397,7 +396,7 @@ public void TestRemoveValue() public void TestRemoveWhere() { var set = new SortedTreeSet(4, Enumerable.Range(0, 10), comparer: null); - Assert.Throws(() => set.RemoveWhere(null)); + Assert.Throws(() => set.RemoveWhere(null!)); Assert.Equal(5, set.RemoveWhere(i => (i % 2) == 0)); Assert.Equal(new[] { 1, 3, 5, 7, 9 }, set); @@ -408,10 +407,10 @@ public void TestRemoveWhere() [Fact] public void TestSetComparer() { - IEqualityComparer> setComparer = SortedTreeSet.CreateSetComparer(); + IEqualityComparer?> setComparer = SortedTreeSet.CreateSetComparer(); Assert.True(setComparer.Equals(SortedTreeSet.CreateSetComparer())); Assert.False(setComparer.Equals(null)); - Assert.Equal(setComparer.GetHashCode(), SortedTreeSet.CreateSetComparer().GetHashCode()); + Assert.Equal(setComparer!.GetHashCode(), SortedTreeSet.CreateSetComparer().GetHashCode()); var set = new SortedTreeSet(); var other = new SortedTreeSet(); @@ -428,7 +427,7 @@ public void TestSetComparer() Assert.Equal(setComparer.GetHashCode(set), setComparer.GetHashCode(other)); // Test behavior with non-empty sets - set.UnionWith(Enumerable.Range(0, 10)); + set!.UnionWith(Enumerable.Range(0, 10)); Assert.False(setComparer.Equals(set, other)); other.UnionWith(Enumerable.Range(0, 5)); Assert.False(setComparer.Equals(set, other)); @@ -480,12 +479,12 @@ private sealed class ReversingComparer : IComparer private readonly IComparer _comparer; - public ReversingComparer(IComparer comparer) + public ReversingComparer(IComparer? comparer) { _comparer = comparer ?? Comparer.Default; } - public int Compare(T x, T y) => -_comparer.Compare(x, y); + public int Compare([AllowNull] T x, [AllowNull] T y) => -_comparer.Compare(x, y); } } } diff --git a/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt b/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt index 25f2ee1..5938e5e 100644 --- a/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt +++ b/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt @@ -504,40 +504,40 @@ TunnelVisionLabs.Collections.Trees.SortedTreeList.this[int index].get -> T TunnelVisionLabs.Collections.Trees.SortedTreeSet TunnelVisionLabs.Collections.Trees.SortedTreeSet.Add(T item) -> bool TunnelVisionLabs.Collections.Trees.SortedTreeSet.Clear() -> void -~TunnelVisionLabs.Collections.Trees.SortedTreeSet.Comparer.get -> System.Collections.Generic.IComparer +TunnelVisionLabs.Collections.Trees.SortedTreeSet.Comparer.get -> System.Collections.Generic.IComparer! TunnelVisionLabs.Collections.Trees.SortedTreeSet.Contains(T item) -> bool -~TunnelVisionLabs.Collections.Trees.SortedTreeSet.CopyTo(T[] array) -> void -~TunnelVisionLabs.Collections.Trees.SortedTreeSet.CopyTo(T[] array, int arrayIndex) -> void -~TunnelVisionLabs.Collections.Trees.SortedTreeSet.CopyTo(T[] array, int arrayIndex, int count) -> void +TunnelVisionLabs.Collections.Trees.SortedTreeSet.CopyTo(T[]! array) -> void +TunnelVisionLabs.Collections.Trees.SortedTreeSet.CopyTo(T[]! array, int arrayIndex) -> void +TunnelVisionLabs.Collections.Trees.SortedTreeSet.CopyTo(T[]! array, int arrayIndex, int count) -> void TunnelVisionLabs.Collections.Trees.SortedTreeSet.Count.get -> int TunnelVisionLabs.Collections.Trees.SortedTreeSet.Enumerator TunnelVisionLabs.Collections.Trees.SortedTreeSet.Enumerator.Current.get -> T TunnelVisionLabs.Collections.Trees.SortedTreeSet.Enumerator.Dispose() -> void TunnelVisionLabs.Collections.Trees.SortedTreeSet.Enumerator.MoveNext() -> bool -~TunnelVisionLabs.Collections.Trees.SortedTreeSet.ExceptWith(System.Collections.Generic.IEnumerable other) -> void +TunnelVisionLabs.Collections.Trees.SortedTreeSet.ExceptWith(System.Collections.Generic.IEnumerable! other) -> void TunnelVisionLabs.Collections.Trees.SortedTreeSet.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.SortedTreeSet.Enumerator -~TunnelVisionLabs.Collections.Trees.SortedTreeSet.IntersectWith(System.Collections.Generic.IEnumerable other) -> void -~TunnelVisionLabs.Collections.Trees.SortedTreeSet.IsProperSubsetOf(System.Collections.Generic.IEnumerable other) -> bool -~TunnelVisionLabs.Collections.Trees.SortedTreeSet.IsProperSupersetOf(System.Collections.Generic.IEnumerable other) -> bool -~TunnelVisionLabs.Collections.Trees.SortedTreeSet.IsSubsetOf(System.Collections.Generic.IEnumerable other) -> bool -~TunnelVisionLabs.Collections.Trees.SortedTreeSet.IsSupersetOf(System.Collections.Generic.IEnumerable other) -> bool +TunnelVisionLabs.Collections.Trees.SortedTreeSet.IntersectWith(System.Collections.Generic.IEnumerable! other) -> void +TunnelVisionLabs.Collections.Trees.SortedTreeSet.IsProperSubsetOf(System.Collections.Generic.IEnumerable! other) -> bool +TunnelVisionLabs.Collections.Trees.SortedTreeSet.IsProperSupersetOf(System.Collections.Generic.IEnumerable! other) -> bool +TunnelVisionLabs.Collections.Trees.SortedTreeSet.IsSubsetOf(System.Collections.Generic.IEnumerable! other) -> bool +TunnelVisionLabs.Collections.Trees.SortedTreeSet.IsSupersetOf(System.Collections.Generic.IEnumerable! other) -> bool TunnelVisionLabs.Collections.Trees.SortedTreeSet.Max.get -> T TunnelVisionLabs.Collections.Trees.SortedTreeSet.Min.get -> T -~TunnelVisionLabs.Collections.Trees.SortedTreeSet.Overlaps(System.Collections.Generic.IEnumerable other) -> bool +TunnelVisionLabs.Collections.Trees.SortedTreeSet.Overlaps(System.Collections.Generic.IEnumerable! other) -> bool TunnelVisionLabs.Collections.Trees.SortedTreeSet.Remove(T item) -> bool -~TunnelVisionLabs.Collections.Trees.SortedTreeSet.RemoveWhere(System.Predicate match) -> int -~TunnelVisionLabs.Collections.Trees.SortedTreeSet.SetEquals(System.Collections.Generic.IEnumerable other) -> bool +TunnelVisionLabs.Collections.Trees.SortedTreeSet.RemoveWhere(System.Predicate! match) -> int +TunnelVisionLabs.Collections.Trees.SortedTreeSet.SetEquals(System.Collections.Generic.IEnumerable! other) -> bool TunnelVisionLabs.Collections.Trees.SortedTreeSet.SortedTreeSet() -> void -~TunnelVisionLabs.Collections.Trees.SortedTreeSet.SortedTreeSet(System.Collections.Generic.IComparer comparer) -> void -~TunnelVisionLabs.Collections.Trees.SortedTreeSet.SortedTreeSet(System.Collections.Generic.IEnumerable collection) -> void -~TunnelVisionLabs.Collections.Trees.SortedTreeSet.SortedTreeSet(System.Collections.Generic.IEnumerable collection, System.Collections.Generic.IComparer comparer) -> void +TunnelVisionLabs.Collections.Trees.SortedTreeSet.SortedTreeSet(System.Collections.Generic.IComparer? comparer) -> void +TunnelVisionLabs.Collections.Trees.SortedTreeSet.SortedTreeSet(System.Collections.Generic.IEnumerable! collection) -> void +TunnelVisionLabs.Collections.Trees.SortedTreeSet.SortedTreeSet(System.Collections.Generic.IEnumerable! collection, System.Collections.Generic.IComparer? comparer) -> void TunnelVisionLabs.Collections.Trees.SortedTreeSet.SortedTreeSet(int branchingFactor) -> void -~TunnelVisionLabs.Collections.Trees.SortedTreeSet.SortedTreeSet(int branchingFactor, System.Collections.Generic.IComparer comparer) -> void -~TunnelVisionLabs.Collections.Trees.SortedTreeSet.SortedTreeSet(int branchingFactor, System.Collections.Generic.IEnumerable collection, System.Collections.Generic.IComparer comparer) -> void -~TunnelVisionLabs.Collections.Trees.SortedTreeSet.SymmetricExceptWith(System.Collections.Generic.IEnumerable other) -> void +TunnelVisionLabs.Collections.Trees.SortedTreeSet.SortedTreeSet(int branchingFactor, System.Collections.Generic.IComparer? comparer) -> void +TunnelVisionLabs.Collections.Trees.SortedTreeSet.SortedTreeSet(int branchingFactor, System.Collections.Generic.IEnumerable! collection, System.Collections.Generic.IComparer? comparer) -> void +TunnelVisionLabs.Collections.Trees.SortedTreeSet.SymmetricExceptWith(System.Collections.Generic.IEnumerable! other) -> void TunnelVisionLabs.Collections.Trees.SortedTreeSet.TrimExcess() -> void TunnelVisionLabs.Collections.Trees.SortedTreeSet.TryGetValue(T equalValue, out T actualValue) -> bool -~TunnelVisionLabs.Collections.Trees.SortedTreeSet.UnionWith(System.Collections.Generic.IEnumerable other) -> void +TunnelVisionLabs.Collections.Trees.SortedTreeSet.UnionWith(System.Collections.Generic.IEnumerable! other) -> void TunnelVisionLabs.Collections.Trees.TreeDictionary TunnelVisionLabs.Collections.Trees.TreeDictionary.Add(TKey key, TValue value) -> void TunnelVisionLabs.Collections.Trees.TreeDictionary.Clear() -> void @@ -785,8 +785,8 @@ static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Create static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Create(T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack! static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Create(params T[]! items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack! static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.CreateRange(System.Collections.Generic.IEnumerable! items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack! -~static TunnelVisionLabs.Collections.Trees.SortedTreeSet.CreateSetComparer() -> System.Collections.Generic.IEqualityComparer> -~static TunnelVisionLabs.Collections.Trees.SortedTreeSet.CreateSetComparer(System.Collections.Generic.IEqualityComparer memberEqualityComparer) -> System.Collections.Generic.IEqualityComparer> +static TunnelVisionLabs.Collections.Trees.SortedTreeSet.CreateSetComparer() -> System.Collections.Generic.IEqualityComparer?>! +static TunnelVisionLabs.Collections.Trees.SortedTreeSet.CreateSetComparer(System.Collections.Generic.IEqualityComparer? memberEqualityComparer) -> System.Collections.Generic.IEqualityComparer?>! static TunnelVisionLabs.Collections.Trees.TreeSet.CreateSetComparer() -> System.Collections.Generic.IEqualityComparer?>! static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary! static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet! diff --git a/TunnelVisionLabs.Collections.Trees/SortedTreeSet`1+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/SortedTreeSet`1+Enumerator.cs index ae5e87c..c8783bd 100644 --- a/TunnelVisionLabs.Collections.Trees/SortedTreeSet`1+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/SortedTreeSet`1+Enumerator.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees { using System.Collections; @@ -21,7 +19,7 @@ internal Enumerator(SortedTreeList.Enumerator enumerator) public T Current => _enumerator.Current; - object IEnumerator.Current => Current; + object? IEnumerator.Current => Current; public void Dispose() => _enumerator.Dispose(); diff --git a/TunnelVisionLabs.Collections.Trees/SortedTreeSet`1.cs b/TunnelVisionLabs.Collections.Trees/SortedTreeSet`1.cs index 7eaeda1..1e72865 100644 --- a/TunnelVisionLabs.Collections.Trees/SortedTreeSet`1.cs +++ b/TunnelVisionLabs.Collections.Trees/SortedTreeSet`1.cs @@ -1,14 +1,13 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees { using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; + using System.Diagnostics.CodeAnalysis; using System.Linq; public partial class SortedTreeSet : ISet, IReadOnlyCollection, ICollection @@ -26,12 +25,12 @@ public SortedTreeSet(IEnumerable collection) UnionWith(collection); } - public SortedTreeSet(IComparer comparer) + public SortedTreeSet(IComparer? comparer) { _sortedList = new SortedTreeList(comparer); } - public SortedTreeSet(IEnumerable collection, IComparer comparer) + public SortedTreeSet(IEnumerable collection, IComparer? comparer) { _sortedList = new SortedTreeList(comparer); UnionWith(collection); @@ -42,12 +41,12 @@ public SortedTreeSet(int branchingFactor) _sortedList = new SortedTreeList(branchingFactor); } - public SortedTreeSet(int branchingFactor, IComparer comparer) + public SortedTreeSet(int branchingFactor, IComparer? comparer) { _sortedList = new SortedTreeList(branchingFactor, comparer); } - public SortedTreeSet(int branchingFactor, IEnumerable collection, IComparer comparer) + public SortedTreeSet(int branchingFactor, IEnumerable collection, IComparer? comparer) { _sortedList = new SortedTreeList(branchingFactor, comparer); UnionWith(collection); @@ -57,8 +56,10 @@ public SortedTreeSet(int branchingFactor, IEnumerable collection, IComparer _sortedList.Count; + [MaybeNull] public T Max => _sortedList.Count == 0 ? default : _sortedList[Count - 1]; + [MaybeNull] public T Min => _sortedList.Count == 0 ? default : _sortedList[0]; bool ICollection.IsReadOnly => false; @@ -67,12 +68,12 @@ public SortedTreeSet(int branchingFactor, IEnumerable collection, IComparer this; - public static IEqualityComparer> CreateSetComparer() + public static IEqualityComparer?> CreateSetComparer() { return SortedTreeSetEqualityComparer.Default; } - public static IEqualityComparer> CreateSetComparer(IEqualityComparer memberEqualityComparer) + public static IEqualityComparer?> CreateSetComparer(IEqualityComparer? memberEqualityComparer) { if (memberEqualityComparer == null || memberEqualityComparer == EqualityComparer.Default) return CreateSetComparer(); @@ -393,7 +394,7 @@ public void UnionWith(IEnumerable other) public void TrimExcess() => _sortedList.TrimExcess(); - public bool TryGetValue(T equalValue, out T actualValue) + public bool TryGetValue(T equalValue, [MaybeNullWhen(false)] out T actualValue) { int index = _sortedList.BinarySearch(equalValue); if (index < 0) @@ -425,9 +426,9 @@ internal void Validate(ValidationRules validationRules) } } - private class SortedTreeSetEqualityComparer : IEqualityComparer> + private class SortedTreeSetEqualityComparer : IEqualityComparer?> { - public static readonly IEqualityComparer> Default = new SortedTreeSetEqualityComparer(); + public static readonly IEqualityComparer?> Default = new SortedTreeSetEqualityComparer(); private readonly IComparer _comparer = Comparer.Default; private readonly IEqualityComparer _equalityComparer; @@ -437,12 +438,12 @@ private SortedTreeSetEqualityComparer() { } - public SortedTreeSetEqualityComparer(IEqualityComparer memberEqualityComparer) + public SortedTreeSetEqualityComparer(IEqualityComparer? memberEqualityComparer) { _equalityComparer = memberEqualityComparer ?? EqualityComparer.Default; } - public override bool Equals(object obj) + public override bool Equals(object? obj) { if (!(obj is SortedTreeSetEqualityComparer comparer)) return false; @@ -455,7 +456,7 @@ public override int GetHashCode() return _comparer.GetHashCode() ^ _equalityComparer.GetHashCode(); } - public bool Equals(SortedTreeSet x, SortedTreeSet y) + public bool Equals(SortedTreeSet? x, SortedTreeSet? y) { if (x is null) { @@ -493,7 +494,7 @@ public bool Equals(SortedTreeSet x, SortedTreeSet y) return true; } - public int GetHashCode(SortedTreeSet obj) + public int GetHashCode(SortedTreeSet? obj) { if (obj == null) return 0; From 5c8a12da8a8f918425e8b6080f9351b1ecc0eca8 Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Sun, 19 Jul 2020 00:09:45 -0700 Subject: [PATCH 20/23] Enable nullable reference types for TreeDictionary --- .../TreeDictionaryTest.cs | 22 ++++++------- .../PublicAPI.Unshipped.txt | 16 +++++----- .../TreeDictionary`2+Enumerator.cs | 4 +-- ...eeDictionary`2+KeyCollection+Enumerator.cs | 2 -- .../TreeDictionary`2+KeyCollection.cs | 2 -- ...Dictionary`2+ValueCollection+Enumerator.cs | 4 +-- .../TreeDictionary`2+ValueCollection.cs | 4 +-- .../TreeDictionary`2.cs | 32 +++++++++---------- 8 files changed, 37 insertions(+), 49 deletions(-) diff --git a/TunnelVisionLabs.Collections.Trees.Test/TreeDictionaryTest.cs b/TunnelVisionLabs.Collections.Trees.Test/TreeDictionaryTest.cs index 71b74a0..e4e3dc7 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/TreeDictionaryTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/TreeDictionaryTest.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test { using System; @@ -23,8 +21,8 @@ public void TestTreeDictionaryConstructor() [Fact] public void TestCollectionConstructors() { - Assert.Throws("collection", () => new TreeDictionary(collection: null)); - Assert.Throws("collection", () => new TreeDictionary(branchingFactor: 4, collection: null, comparer: null)); + Assert.Throws("collection", () => new TreeDictionary(collection: null!)); + Assert.Throws("collection", () => new TreeDictionary(branchingFactor: 4, collection: null!, comparer: null)); Assert.Throws(() => new TreeDictionary(new[] { new KeyValuePair(1, 1), new KeyValuePair(1, 2) })); Assert.Throws(() => new TreeDictionary(branchingFactor: 4, new[] { new KeyValuePair(1, 1), new KeyValuePair(1, 2) }, comparer: null)); @@ -97,7 +95,7 @@ public void TestIDictionaryT() Assert.Equal(Enumerable.Range(0, 9), dictionary.Values); Assert.Throws(() => dictionary.Keys.Add(0)); - Assert.Throws("array", () => dictionary.Keys.CopyTo(null, 0)); + Assert.Throws("array", () => dictionary.Keys.CopyTo(null!, 0)); Assert.Throws("arrayIndex", () => dictionary.Keys.CopyTo(new int[dictionary.Count], -1)); Assert.Throws("arrayIndex", () => dictionary.Keys.CopyTo(new int[dictionary.Count], dictionary.Count + 1)); Assert.Throws(() => dictionary.Keys.CopyTo(new int[dictionary.Count], 1)); @@ -115,7 +113,7 @@ public void TestIDictionaryT() Assert.Equal(0, keyEnumerator.Current); Assert.Throws(() => dictionary.Values.Add(0)); - Assert.Throws("array", () => dictionary.Values.CopyTo(null, 0)); + Assert.Throws("array", () => dictionary.Values.CopyTo(null!, 0)); Assert.Throws("arrayIndex", () => dictionary.Values.CopyTo(new int[dictionary.Count], -1)); Assert.Throws("arrayIndex", () => dictionary.Values.CopyTo(new int[dictionary.Count], dictionary.Count + 1)); Assert.Throws(() => dictionary.Values.CopyTo(new int[dictionary.Count], 1)); @@ -168,7 +166,7 @@ public void TestIDictionary() Assert.False(dictionary.IsReadOnly); Assert.False(dictionary.IsSynchronized); - Assert.Throws("key", () => dictionary.Add(key: null, value: 1)); + Assert.Throws("key", () => dictionary.Add(key: null!, value: 1)); Assert.Throws("value", () => dictionary.Add(key: 1, value: null)); Assert.Throws("key", () => dictionary.Add(key: "string value", value: 0)); Assert.Throws("value", () => dictionary.Add(key: 0, value: "string value")); @@ -176,11 +174,11 @@ public void TestIDictionary() for (int i = 0; i < 11; i++) dictionary.Add(i, i + 1); - Assert.Throws("key", () => dictionary[key: null]); + Assert.Throws("key", () => dictionary[key: null!]); Assert.Null(dictionary["string key"]); Assert.Equal(11, dictionary[10]); - Assert.Throws("key", () => dictionary[key: null] = 12); + Assert.Throws("key", () => dictionary[key: null!] = 12); Assert.Throws("key", () => dictionary["string key"] = 12); Assert.Throws("value", () => dictionary[10] = null); Assert.Throws("value", () => dictionary[10] = "string value"); @@ -195,11 +193,11 @@ public void TestIDictionary() Assert.Equal(entries.Select(i => i.Key), dictionary.Keys.Cast()); Assert.Equal(entries.Select(i => i.Value), dictionary.Values.Cast()); - Assert.Throws(() => dictionary.Contains(null)); + Assert.Throws(() => dictionary.Contains(null!)); Assert.False(dictionary.Contains("string value")); Assert.True(dictionary.Contains(10)); - Assert.Throws(() => dictionary.Remove(null)); + Assert.Throws(() => dictionary.Remove(null!)); Assert.Equal(11, dictionary.Count); dictionary.Remove("string value"); Assert.Equal(11, dictionary.Count); @@ -248,7 +246,7 @@ void TestCollection(ICollection collection, Func indexToExpectedValue Assert.False(collection.IsSynchronized); Assert.Same(dictionary, collection.SyncRoot); - Assert.Throws("array", () => collection.CopyTo(null, 0)); + Assert.Throws("array", () => collection.CopyTo(null!, 0)); Assert.Throws(() => collection.CopyTo(new int[collection.Count, 1], 0)); Assert.Throws(() => collection.CopyTo(Array.CreateInstance(typeof(int), lengths: new[] { collection.Count }, lowerBounds: new[] { 1 }), 0)); Assert.Throws("index", () => collection.CopyTo(new int[collection.Count], -1)); diff --git a/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt b/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt index 5938e5e..17f9e34 100644 --- a/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt +++ b/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt @@ -541,7 +541,7 @@ TunnelVisionLabs.Collections.Trees.SortedTreeSet.UnionWith(System.Collections TunnelVisionLabs.Collections.Trees.TreeDictionary TunnelVisionLabs.Collections.Trees.TreeDictionary.Add(TKey key, TValue value) -> void TunnelVisionLabs.Collections.Trees.TreeDictionary.Clear() -> void -~TunnelVisionLabs.Collections.Trees.TreeDictionary.Comparer.get -> System.Collections.Generic.IEqualityComparer +TunnelVisionLabs.Collections.Trees.TreeDictionary.Comparer.get -> System.Collections.Generic.IEqualityComparer! TunnelVisionLabs.Collections.Trees.TreeDictionary.ContainsKey(TKey key) -> bool TunnelVisionLabs.Collections.Trees.TreeDictionary.ContainsValue(TValue value) -> bool TunnelVisionLabs.Collections.Trees.TreeDictionary.Count.get -> int @@ -553,7 +553,7 @@ TunnelVisionLabs.Collections.Trees.TreeDictionary.GetEnumerator() TunnelVisionLabs.Collections.Trees.TreeDictionary.KeyCollection TunnelVisionLabs.Collections.Trees.TreeDictionary.KeyCollection.Clear() -> void TunnelVisionLabs.Collections.Trees.TreeDictionary.KeyCollection.Contains(TKey item) -> bool -~TunnelVisionLabs.Collections.Trees.TreeDictionary.KeyCollection.CopyTo(TKey[] array, int arrayIndex) -> void +TunnelVisionLabs.Collections.Trees.TreeDictionary.KeyCollection.CopyTo(TKey[]! array, int arrayIndex) -> void TunnelVisionLabs.Collections.Trees.TreeDictionary.KeyCollection.Count.get -> int TunnelVisionLabs.Collections.Trees.TreeDictionary.KeyCollection.Enumerator TunnelVisionLabs.Collections.Trees.TreeDictionary.KeyCollection.Enumerator.Current.get -> TKey @@ -564,18 +564,18 @@ TunnelVisionLabs.Collections.Trees.TreeDictionary.KeyCollection.Re TunnelVisionLabs.Collections.Trees.TreeDictionary.Keys.get -> TunnelVisionLabs.Collections.Trees.TreeDictionary.KeyCollection TunnelVisionLabs.Collections.Trees.TreeDictionary.Remove(TKey key) -> bool TunnelVisionLabs.Collections.Trees.TreeDictionary.TreeDictionary() -> void -~TunnelVisionLabs.Collections.Trees.TreeDictionary.TreeDictionary(System.Collections.Generic.IEnumerable> collection) -> void -~TunnelVisionLabs.Collections.Trees.TreeDictionary.TreeDictionary(System.Collections.Generic.IEnumerable> collection, System.Collections.Generic.IEqualityComparer comparer) -> void -~TunnelVisionLabs.Collections.Trees.TreeDictionary.TreeDictionary(System.Collections.Generic.IEqualityComparer comparer) -> void +TunnelVisionLabs.Collections.Trees.TreeDictionary.TreeDictionary(System.Collections.Generic.IEnumerable>! collection) -> void +TunnelVisionLabs.Collections.Trees.TreeDictionary.TreeDictionary(System.Collections.Generic.IEnumerable>! collection, System.Collections.Generic.IEqualityComparer? comparer) -> void +TunnelVisionLabs.Collections.Trees.TreeDictionary.TreeDictionary(System.Collections.Generic.IEqualityComparer? comparer) -> void TunnelVisionLabs.Collections.Trees.TreeDictionary.TreeDictionary(int branchingFactor) -> void -~TunnelVisionLabs.Collections.Trees.TreeDictionary.TreeDictionary(int branchingFactor, System.Collections.Generic.IEnumerable> collection, System.Collections.Generic.IEqualityComparer comparer) -> void -~TunnelVisionLabs.Collections.Trees.TreeDictionary.TreeDictionary(int branchingFactor, System.Collections.Generic.IEqualityComparer comparer) -> void +TunnelVisionLabs.Collections.Trees.TreeDictionary.TreeDictionary(int branchingFactor, System.Collections.Generic.IEnumerable>! collection, System.Collections.Generic.IEqualityComparer? comparer) -> void +TunnelVisionLabs.Collections.Trees.TreeDictionary.TreeDictionary(int branchingFactor, System.Collections.Generic.IEqualityComparer? comparer) -> void TunnelVisionLabs.Collections.Trees.TreeDictionary.TryAdd(TKey key, TValue value) -> bool TunnelVisionLabs.Collections.Trees.TreeDictionary.TryGetValue(TKey key, out TValue value) -> bool TunnelVisionLabs.Collections.Trees.TreeDictionary.ValueCollection TunnelVisionLabs.Collections.Trees.TreeDictionary.ValueCollection.Clear() -> void TunnelVisionLabs.Collections.Trees.TreeDictionary.ValueCollection.Contains(TValue item) -> bool -~TunnelVisionLabs.Collections.Trees.TreeDictionary.ValueCollection.CopyTo(TValue[] array, int arrayIndex) -> void +TunnelVisionLabs.Collections.Trees.TreeDictionary.ValueCollection.CopyTo(TValue[]! array, int arrayIndex) -> void TunnelVisionLabs.Collections.Trees.TreeDictionary.ValueCollection.Count.get -> int TunnelVisionLabs.Collections.Trees.TreeDictionary.ValueCollection.Enumerator TunnelVisionLabs.Collections.Trees.TreeDictionary.ValueCollection.Enumerator.Current.get -> TValue diff --git a/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+Enumerator.cs index a31a374..71148f4 100644 --- a/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+Enumerator.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees { using System.Collections; @@ -48,7 +46,7 @@ internal enum ReturnType object IDictionaryEnumerator.Key => Current.Key; - object IDictionaryEnumerator.Value => Current.Value; + object? IDictionaryEnumerator.Value => Current.Value; public void Dispose() => _enumerator.Dispose(); diff --git a/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+KeyCollection+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+KeyCollection+Enumerator.cs index 916bf29..6619b98 100644 --- a/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+KeyCollection+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+KeyCollection+Enumerator.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees { using System.Collections; diff --git a/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+KeyCollection.cs b/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+KeyCollection.cs index ff5aaa6..5d4e914 100644 --- a/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+KeyCollection.cs +++ b/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+KeyCollection.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees { using System; diff --git a/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+ValueCollection+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+ValueCollection+Enumerator.cs index a43638c..29ebcfb 100644 --- a/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+ValueCollection+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+ValueCollection+Enumerator.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees { using System.Collections; @@ -23,7 +21,7 @@ internal Enumerator(TreeDictionary.Enumerator enumerator) public TValue Current => _enumerator.Current.Value; - object IEnumerator.Current => Current; + object? IEnumerator.Current => Current; public void Dispose() => _enumerator.Dispose(); diff --git a/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+ValueCollection.cs b/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+ValueCollection.cs index 09cfbd9..37baee1 100644 --- a/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+ValueCollection.cs +++ b/TunnelVisionLabs.Collections.Trees/TreeDictionary`2+ValueCollection.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees { using System; @@ -74,7 +72,7 @@ void ICollection.CopyTo(Array array, int index) { CopyTo(values, index); } - else if (array is object[] objects) + else if (array is object?[] objects) { try { diff --git a/TunnelVisionLabs.Collections.Trees/TreeDictionary`2.cs b/TunnelVisionLabs.Collections.Trees/TreeDictionary`2.cs index 02464de..2d0bb94 100644 --- a/TunnelVisionLabs.Collections.Trees/TreeDictionary`2.cs +++ b/TunnelVisionLabs.Collections.Trees/TreeDictionary`2.cs @@ -1,17 +1,17 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees { using System; using System.Collections; using System.Collections.Generic; + using System.Diagnostics.CodeAnalysis; using System.Linq; using IDictionary = System.Collections.IDictionary; public partial class TreeDictionary : IDictionary, IReadOnlyDictionary, IDictionary + where TKey : notnull { private readonly IEqualityComparer _comparer; private readonly TreeSet> _treeSet; @@ -26,13 +26,13 @@ public TreeDictionary(IEnumerable> collection) { } - public TreeDictionary(IEqualityComparer comparer) + public TreeDictionary(IEqualityComparer? comparer) { _comparer = comparer ?? EqualityComparer.Default; _treeSet = new TreeSet>(new KeyOfPairEqualityComparer(_comparer)); } - public TreeDictionary(IEnumerable> collection, IEqualityComparer comparer) + public TreeDictionary(IEnumerable> collection, IEqualityComparer? comparer) : this(comparer) { if (collection == null) @@ -49,13 +49,13 @@ public TreeDictionary(int branchingFactor) { } - public TreeDictionary(int branchingFactor, IEqualityComparer comparer) + public TreeDictionary(int branchingFactor, IEqualityComparer? comparer) { _comparer = comparer ?? EqualityComparer.Default; _treeSet = new TreeSet>(branchingFactor, new KeyOfPairEqualityComparer(_comparer)); } - public TreeDictionary(int branchingFactor, IEnumerable> collection, IEqualityComparer comparer) + public TreeDictionary(int branchingFactor, IEnumerable> collection, IEqualityComparer? comparer) : this(branchingFactor, comparer) { if (collection == null) @@ -101,7 +101,7 @@ public TValue this[TKey key] { get { - if (!_treeSet.TryGetValue(new KeyValuePair(key, default), out KeyValuePair value)) + if (!_treeSet.TryGetValue(new KeyValuePair(key, default!), out KeyValuePair value)) throw new KeyNotFoundException(); return value.Value; @@ -109,12 +109,12 @@ public TValue this[TKey key] set { - _treeSet.Remove(new KeyValuePair(key, default)); + _treeSet.Remove(new KeyValuePair(key, default!)); _treeSet.Add(new KeyValuePair(key, value)); } } - object IDictionary.this[object key] + object? IDictionary.this[object key] { get { @@ -141,7 +141,7 @@ object IDictionary.this[object key] var typedKey = (TKey)key; try { - this[typedKey] = (TValue)value; + this[typedKey] = (TValue)value!; } catch (InvalidCastException) { @@ -155,13 +155,13 @@ object IDictionary.this[object key] } } - public bool ContainsKey(TKey key) => _treeSet.Contains(new KeyValuePair(key, default)); + public bool ContainsKey(TKey key) => _treeSet.Contains(new KeyValuePair(key, default!)); public bool ContainsValue(TValue value) => _treeSet.Any(pair => EqualityComparer.Default.Equals(pair.Value, value)); - public bool TryGetValue(TKey key, out TValue value) + public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value) { - if (!_treeSet.TryGetValue(new KeyValuePair(key, default), out KeyValuePair pair)) + if (!_treeSet.TryGetValue(new KeyValuePair(key, default!), out KeyValuePair pair)) { value = default; return false; @@ -183,7 +183,7 @@ public void Add(TKey key, TValue value) public void Clear() => _treeSet.Clear(); - public bool Remove(TKey key) => _treeSet.Remove(new KeyValuePair(key, default)); + public bool Remove(TKey key) => _treeSet.Remove(new KeyValuePair(key, default!)); void ICollection>.Add(KeyValuePair item) => Add(item.Key, item.Value); @@ -210,7 +210,7 @@ bool ICollection>.Remove(KeyValuePair i return true; } - void IDictionary.Add(object key, object value) + void IDictionary.Add(object key, object? value) { if (key == null) throw new ArgumentNullException(nameof(key)); @@ -222,7 +222,7 @@ void IDictionary.Add(object key, object value) var typedKey = (TKey)key; try { - Add(typedKey, (TValue)value); + Add(typedKey, (TValue)value!); } catch (InvalidCastException) { From 43c834d846f7a636e537f09ece9bb03b1f12669e Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Sun, 19 Jul 2020 00:25:35 -0700 Subject: [PATCH 21/23] Enable nullable reference types in helper classes --- .../DummyBenchmark.cs | 2 -- .../MemoryDiagnoserConfig.cs | 2 -- .../Program.cs | 2 -- .../Properties/AssemblyInfo.cs | 2 -- .../Properties/AssemblyInfo.cs | 2 -- .../AbstractSetTest.cs | 26 +++++++++---------- .../CollectionAssert.cs | 2 -- .../EverythingThrowsEnumerableTest.cs | 2 -- .../EverythingThrowsEnumerable`1.cs | 2 -- .../ExceptionUtilitiesTest.cs | 2 -- .../Generator.cs | 2 -- .../GeneratorTest.cs | 6 ++--- .../Properties/AssemblyInfo.cs | 2 -- .../ReverseComparerTests.cs | 2 -- .../ReverseComparer`1.cs | 7 +++-- .../SubsetHashCodeEqualityComparer`1.cs | 5 ++-- .../ThrowingTraceListener.cs | 2 -- .../TreeSpanTest.cs | 2 -- .../ZeroHashCodeEqualityComparer`1.cs | 7 +++-- .../ComparisonComparer`1.cs | 7 ++--- .../ExceptionUtilities.cs | 2 -- .../ExcludeFromCodeCoverageAttribute.cs | 2 -- .../KeyOfPairComparer`2.cs | 2 -- .../KeyOfPairEqualityComparer`2.cs | 2 -- .../Properties/AssemblyInfo.cs | 2 -- .../SetHelper.cs | 2 -- .../TreeSpan.cs | 4 +-- .../ValidationRules.cs | 2 -- 28 files changed, 28 insertions(+), 76 deletions(-) diff --git a/TunnelVisionLabs.Collections.Trees.Benchmarks/DummyBenchmark.cs b/TunnelVisionLabs.Collections.Trees.Benchmarks/DummyBenchmark.cs index d9e6e6d..b25a2d4 100644 --- a/TunnelVisionLabs.Collections.Trees.Benchmarks/DummyBenchmark.cs +++ b/TunnelVisionLabs.Collections.Trees.Benchmarks/DummyBenchmark.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Benchmarks { using BenchmarkDotNet.Attributes; diff --git a/TunnelVisionLabs.Collections.Trees.Benchmarks/MemoryDiagnoserConfig.cs b/TunnelVisionLabs.Collections.Trees.Benchmarks/MemoryDiagnoserConfig.cs index 1014dea..91a0d24 100644 --- a/TunnelVisionLabs.Collections.Trees.Benchmarks/MemoryDiagnoserConfig.cs +++ b/TunnelVisionLabs.Collections.Trees.Benchmarks/MemoryDiagnoserConfig.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Benchmarks { using BenchmarkDotNet.Configs; diff --git a/TunnelVisionLabs.Collections.Trees.Benchmarks/Program.cs b/TunnelVisionLabs.Collections.Trees.Benchmarks/Program.cs index 597d92a..5684127 100644 --- a/TunnelVisionLabs.Collections.Trees.Benchmarks/Program.cs +++ b/TunnelVisionLabs.Collections.Trees.Benchmarks/Program.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Benchmarks { using BenchmarkDotNet.Running; diff --git a/TunnelVisionLabs.Collections.Trees.Benchmarks/Properties/AssemblyInfo.cs b/TunnelVisionLabs.Collections.Trees.Benchmarks/Properties/AssemblyInfo.cs index 2d71da8..26095d5 100644 --- a/TunnelVisionLabs.Collections.Trees.Benchmarks/Properties/AssemblyInfo.cs +++ b/TunnelVisionLabs.Collections.Trees.Benchmarks/Properties/AssemblyInfo.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - using System; using System.Reflection; using System.Runtime.InteropServices; diff --git a/TunnelVisionLabs.Collections.Trees.Experimental/Properties/AssemblyInfo.cs b/TunnelVisionLabs.Collections.Trees.Experimental/Properties/AssemblyInfo.cs index 275731d..139a406 100644 --- a/TunnelVisionLabs.Collections.Trees.Experimental/Properties/AssemblyInfo.cs +++ b/TunnelVisionLabs.Collections.Trees.Experimental/Properties/AssemblyInfo.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - using System; using System.Reflection; using System.Runtime.CompilerServices; diff --git a/TunnelVisionLabs.Collections.Trees.Test/AbstractSetTest.cs b/TunnelVisionLabs.Collections.Trees.Test/AbstractSetTest.cs index 86e64ca..192fbe2 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/AbstractSetTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/AbstractSetTest.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test { using System; @@ -18,7 +16,7 @@ public abstract class AbstractSetTest public void TestUnionWith() { ISet set = CreateSet(); - Assert.Throws(() => set.UnionWith(null)); + Assert.Throws(() => set.UnionWith(null!)); set.UnionWith(TransformEnumerableForSetOperation(Enumerable.Range(0, 7))); set.UnionWith(TransformEnumerableForSetOperation(Enumerable.Range(5, 5))); @@ -29,7 +27,7 @@ public void TestUnionWith() public void TestExceptWith() { ISet set = CreateSet(); - Assert.Throws(() => set.ExceptWith(null)); + Assert.Throws(() => set.ExceptWith(null!)); // Return without iterating if the set is already empty set.ExceptWith(EverythingThrowsEnumerable.Instance); @@ -51,7 +49,7 @@ public void TestExceptWith() public void TestIntersectWith() { ISet set = CreateSet(); - Assert.Throws(() => set.IntersectWith(null)); + Assert.Throws(() => set.IntersectWith(null!)); // Return without iterating if the set is already empty set.IntersectWith(EverythingThrowsEnumerable.Instance); @@ -78,7 +76,7 @@ public void TestSymmetricExceptWith() { ISet set = CreateSet(); ISet second = CreateSet(); - Assert.Throws(() => set.SymmetricExceptWith(null)); + Assert.Throws(() => set.SymmetricExceptWith(null!)); // Test behavior when the current set is empty set.SymmetricExceptWith(TransformEnumerableForSetOperation(new[] { 1, 5, 3 })); @@ -112,7 +110,7 @@ public void TestSymmetricExceptWith() public void TestIsProperSubsetOf() { ISet set = CreateSet(); - Assert.Throws(() => set.IsProperSubsetOf(null)); + Assert.Throws(() => set.IsProperSubsetOf(null!)); // Test behavior when the current set is empty Assert.False(set.IsProperSubsetOf(TransformEnumerableForSetOperation(Enumerable.Empty()))); @@ -147,7 +145,7 @@ public void TestIsProperSubsetOf() public void TestIsProperSupersetOf() { ISet set = CreateSet(); - Assert.Throws(() => set.IsProperSupersetOf(null)); + Assert.Throws(() => set.IsProperSupersetOf(null!)); // Return without iterating if the set is already empty Assert.False(set.IsProperSupersetOf(EverythingThrowsEnumerable.Instance)); @@ -185,7 +183,7 @@ public void TestIsProperSupersetOf() public void TestIsSubsetOf() { ISet set = CreateSet(); - Assert.Throws(() => set.IsSubsetOf(null)); + Assert.Throws(() => set.IsSubsetOf(null!)); // Return without iterating if the set is already empty Assert.True(set.IsSubsetOf(EverythingThrowsEnumerable.Instance)); @@ -219,7 +217,7 @@ public void TestIsSubsetOf() public void TestIsSupersetOf() { ISet set = CreateSet(); - Assert.Throws(() => set.IsSupersetOf(null)); + Assert.Throws(() => set.IsSupersetOf(null!)); // Test IsSupersetOf self set.Add(1); @@ -254,7 +252,7 @@ public void TestIsSupersetOf() public void TestOverlaps() { ISet set = CreateSet(); - Assert.Throws(() => set.Overlaps(null)); + Assert.Throws(() => set.Overlaps(null!)); // Return without iterating if the set is already empty Assert.False(set.Overlaps(EverythingThrowsEnumerable.Instance)); @@ -274,7 +272,7 @@ public void TestOverlaps() public void TestSetEquals() { ISet set = CreateSet(); - Assert.Throws(() => set.SetEquals(null)); + Assert.Throws(() => set.SetEquals(null!)); // Test behavior when the current set is empty Assert.True(set.SetEquals(TransformEnumerableForSetOperation(Enumerable.Empty()))); @@ -343,7 +341,7 @@ protected static void TestICollectionInterfaceImpl(ICollection collection, bool { var copy = new object[collection.Count]; - Assert.Throws(() => collection.CopyTo(null, 0)); + Assert.Throws(() => collection.CopyTo(null!, 0)); Assert.Throws(() => collection.CopyTo(new object[1, collection.Count], 0)); Assert.Throws(() => collection.CopyTo(Array.CreateInstance(typeof(object), lengths: new[] { collection.Count }, lowerBounds: new[] { -1 }), 0)); Assert.Throws(() => collection.CopyTo(copy, -1)); @@ -370,7 +368,7 @@ protected static void TestICollectionInterfaceImpl(ICollection collection, bool { var copy = new int[collection.Count]; - Assert.Throws(() => collection.CopyTo(null, 0)); + Assert.Throws(() => collection.CopyTo(null!, 0)); Assert.Throws(() => collection.CopyTo(new int[1, collection.Count], 0)); Assert.Throws(() => collection.CopyTo(Array.CreateInstance(typeof(int), lengths: new[] { collection.Count }, lowerBounds: new[] { -1 }), 0)); Assert.Throws(() => collection.CopyTo(copy, -1)); diff --git a/TunnelVisionLabs.Collections.Trees.Test/CollectionAssert.cs b/TunnelVisionLabs.Collections.Trees.Test/CollectionAssert.cs index 9f56397..0d8a106 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/CollectionAssert.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/CollectionAssert.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/EverythingThrowsEnumerableTest.cs b/TunnelVisionLabs.Collections.Trees.Test/EverythingThrowsEnumerableTest.cs index e676b2f..c9f8440 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/EverythingThrowsEnumerableTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/EverythingThrowsEnumerableTest.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/EverythingThrowsEnumerable`1.cs b/TunnelVisionLabs.Collections.Trees.Test/EverythingThrowsEnumerable`1.cs index 853ee72..01ea44b 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/EverythingThrowsEnumerable`1.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/EverythingThrowsEnumerable`1.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/ExceptionUtilitiesTest.cs b/TunnelVisionLabs.Collections.Trees.Test/ExceptionUtilitiesTest.cs index dfe5c34..475d817 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/ExceptionUtilitiesTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/ExceptionUtilitiesTest.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/Generator.cs b/TunnelVisionLabs.Collections.Trees.Test/Generator.cs index eeb61a6..92ef5a9 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Generator.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Generator.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/GeneratorTest.cs b/TunnelVisionLabs.Collections.Trees.Test/GeneratorTest.cs index 7474b3d..fbf23c3 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/GeneratorTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/GeneratorTest.cs @@ -1,10 +1,9 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test { + using System.Diagnostics; using System.Reflection; using Xunit; @@ -25,7 +24,8 @@ public void TestSeed() void ResetSeed(int? seed) { - FieldInfo seedField = typeof(Generator).GetField("_seed", BindingFlags.Static | BindingFlags.NonPublic); + FieldInfo? seedField = typeof(Generator).GetField("_seed", BindingFlags.Static | BindingFlags.NonPublic); + Debug.Assert(seedField is object, $"Assertion failed: {nameof(seedField)} is object"); seedField.SetValue(null, seed); } } diff --git a/TunnelVisionLabs.Collections.Trees.Test/Properties/AssemblyInfo.cs b/TunnelVisionLabs.Collections.Trees.Test/Properties/AssemblyInfo.cs index 083cab0..da53c70 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Properties/AssemblyInfo.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Properties/AssemblyInfo.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - using System; using System.Reflection; using System.Runtime.InteropServices; diff --git a/TunnelVisionLabs.Collections.Trees.Test/ReverseComparerTests.cs b/TunnelVisionLabs.Collections.Trees.Test/ReverseComparerTests.cs index a5861b9..bfc9463 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/ReverseComparerTests.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/ReverseComparerTests.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test { using System.Collections.Generic; diff --git a/TunnelVisionLabs.Collections.Trees.Test/ReverseComparer`1.cs b/TunnelVisionLabs.Collections.Trees.Test/ReverseComparer`1.cs index c27cbb2..82442fa 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/ReverseComparer`1.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/ReverseComparer`1.cs @@ -1,11 +1,10 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test { using System.Collections.Generic; + using System.Diagnostics.CodeAnalysis; internal sealed class ReverseComparer : IComparer { @@ -13,12 +12,12 @@ internal sealed class ReverseComparer : IComparer private readonly IComparer _comparer; - public ReverseComparer(IComparer comparer) + public ReverseComparer(IComparer? comparer) { _comparer = comparer ?? Comparer.Default; } - public int Compare(T x, T y) + public int Compare([AllowNull] T x, [AllowNull] T y) { var direct = _comparer.Compare(x, y); if (direct == int.MinValue) diff --git a/TunnelVisionLabs.Collections.Trees.Test/SubsetHashCodeEqualityComparer`1.cs b/TunnelVisionLabs.Collections.Trees.Test/SubsetHashCodeEqualityComparer`1.cs index da36172..cba8d61 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/SubsetHashCodeEqualityComparer`1.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/SubsetHashCodeEqualityComparer`1.cs @@ -1,12 +1,11 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test { using System; using System.Collections.Generic; + using System.Diagnostics.CodeAnalysis; internal sealed class SubsetHashCodeEqualityComparer : IEqualityComparer { @@ -24,7 +23,7 @@ public SubsetHashCodeEqualityComparer(IEqualityComparer equalityComparer, Fun _getHashCode = getHashCode; } - public bool Equals(T x, T y) => _equalityComparer.Equals(x, y); + public bool Equals([AllowNull] T x, [AllowNull] T y) => _equalityComparer.Equals(x, y); public int GetHashCode(T obj) => _getHashCode(obj); } diff --git a/TunnelVisionLabs.Collections.Trees.Test/ThrowingTraceListener.cs b/TunnelVisionLabs.Collections.Trees.Test/ThrowingTraceListener.cs index 601d9e5..ee63ca8 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/ThrowingTraceListener.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/ThrowingTraceListener.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/TreeSpanTest.cs b/TunnelVisionLabs.Collections.Trees.Test/TreeSpanTest.cs index 39cfeb9..daa675a 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/TreeSpanTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/TreeSpanTest.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/ZeroHashCodeEqualityComparer`1.cs b/TunnelVisionLabs.Collections.Trees.Test/ZeroHashCodeEqualityComparer`1.cs index 0e9195d..3cf2b9f 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/ZeroHashCodeEqualityComparer`1.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/ZeroHashCodeEqualityComparer`1.cs @@ -1,23 +1,22 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test { using System.Collections.Generic; + using System.Diagnostics.CodeAnalysis; internal sealed class ZeroHashCodeEqualityComparer : IEqualityComparer { public static readonly ZeroHashCodeEqualityComparer Default = new ZeroHashCodeEqualityComparer(null); private readonly IEqualityComparer _comparer; - public ZeroHashCodeEqualityComparer(IEqualityComparer comparer) + public ZeroHashCodeEqualityComparer(IEqualityComparer? comparer) { _comparer = comparer ?? EqualityComparer.Default; } - public bool Equals(T x, T y) => _comparer.Equals(x, y); + public bool Equals([AllowNull] T x, [AllowNull] T y) => _comparer.Equals(x, y); public int GetHashCode(T obj) => 0; } diff --git a/TunnelVisionLabs.Collections.Trees/ComparisonComparer`1.cs b/TunnelVisionLabs.Collections.Trees/ComparisonComparer`1.cs index 15bb045..f76b043 100644 --- a/TunnelVisionLabs.Collections.Trees/ComparisonComparer`1.cs +++ b/TunnelVisionLabs.Collections.Trees/ComparisonComparer`1.cs @@ -1,13 +1,12 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees { using System; using System.Collections.Generic; using System.Diagnostics; + using System.Diagnostics.CodeAnalysis; internal sealed class ComparisonComparer : IComparer { @@ -19,6 +18,8 @@ public ComparisonComparer(Comparison comparison) _comparison = comparison; } - public int Compare(T x, T y) => _comparison(x, y); +#pragma warning disable CS8604 // Possible null reference argument. (.NET 5 corrected the signature of Comparison) + public int Compare([AllowNull] T x, [AllowNull] T y) => _comparison(x, y); +#pragma warning restore CS8604 // Possible null reference argument. } } diff --git a/TunnelVisionLabs.Collections.Trees/ExceptionUtilities.cs b/TunnelVisionLabs.Collections.Trees/ExceptionUtilities.cs index 04b4d6e..ef0a4d5 100644 --- a/TunnelVisionLabs.Collections.Trees/ExceptionUtilities.cs +++ b/TunnelVisionLabs.Collections.Trees/ExceptionUtilities.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees { using System; diff --git a/TunnelVisionLabs.Collections.Trees/ExcludeFromCodeCoverageAttribute.cs b/TunnelVisionLabs.Collections.Trees/ExcludeFromCodeCoverageAttribute.cs index 72d7172..58db5fd 100644 --- a/TunnelVisionLabs.Collections.Trees/ExcludeFromCodeCoverageAttribute.cs +++ b/TunnelVisionLabs.Collections.Trees/ExcludeFromCodeCoverageAttribute.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - #if NETSTANDARD1_1 namespace System.Diagnostics.CodeAnalysis diff --git a/TunnelVisionLabs.Collections.Trees/KeyOfPairComparer`2.cs b/TunnelVisionLabs.Collections.Trees/KeyOfPairComparer`2.cs index d659636..d2df197 100644 --- a/TunnelVisionLabs.Collections.Trees/KeyOfPairComparer`2.cs +++ b/TunnelVisionLabs.Collections.Trees/KeyOfPairComparer`2.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees { using System.Collections.Generic; diff --git a/TunnelVisionLabs.Collections.Trees/KeyOfPairEqualityComparer`2.cs b/TunnelVisionLabs.Collections.Trees/KeyOfPairEqualityComparer`2.cs index 34cccb5..5052507 100644 --- a/TunnelVisionLabs.Collections.Trees/KeyOfPairEqualityComparer`2.cs +++ b/TunnelVisionLabs.Collections.Trees/KeyOfPairEqualityComparer`2.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees { using System.Collections.Generic; diff --git a/TunnelVisionLabs.Collections.Trees/Properties/AssemblyInfo.cs b/TunnelVisionLabs.Collections.Trees/Properties/AssemblyInfo.cs index 328cdcf..0f26a92 100644 --- a/TunnelVisionLabs.Collections.Trees/Properties/AssemblyInfo.cs +++ b/TunnelVisionLabs.Collections.Trees/Properties/AssemblyInfo.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - using System; using System.Reflection; using System.Runtime.CompilerServices; diff --git a/TunnelVisionLabs.Collections.Trees/SetHelper.cs b/TunnelVisionLabs.Collections.Trees/SetHelper.cs index b90c1fb..627af73 100644 --- a/TunnelVisionLabs.Collections.Trees/SetHelper.cs +++ b/TunnelVisionLabs.Collections.Trees/SetHelper.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees { using System; diff --git a/TunnelVisionLabs.Collections.Trees/TreeSpan.cs b/TunnelVisionLabs.Collections.Trees/TreeSpan.cs index cb6b7d8..76f3801 100644 --- a/TunnelVisionLabs.Collections.Trees/TreeSpan.cs +++ b/TunnelVisionLabs.Collections.Trees/TreeSpan.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees { using System; @@ -68,7 +66,7 @@ public static TreeSpan Intersect(TreeSpan left, TreeSpan right) public bool IsProperSubspanOf(TreeSpan other) => Count < other.Count && IsSubspanOf(other); - public override bool Equals(object obj) + public override bool Equals(object? obj) { if (!(obj is TreeSpan other)) return false; diff --git a/TunnelVisionLabs.Collections.Trees/ValidationRules.cs b/TunnelVisionLabs.Collections.Trees/ValidationRules.cs index 38f0b32..098522d 100644 --- a/TunnelVisionLabs.Collections.Trees/ValidationRules.cs +++ b/TunnelVisionLabs.Collections.Trees/ValidationRules.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees { using System; From fa6f986cdb7e931e5f57a2a0f5167d0ce3acb41d Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Mon, 20 Jul 2020 07:27:50 -0700 Subject: [PATCH 22/23] Enable nullable reference types for TreeList --- .../List/BinarySearch1.cs | 19 ++++- .../List/BinarySearch2.cs | 47 ++++++++---- .../List/BinarySearch3.cs | 49 ++++++++---- .../List/CopyTo1.cs | 4 +- .../List/CopyTo2.cs | 4 +- .../List/CopyTo3.cs | 4 +- .../List/TreeListAdd.cs | 4 +- .../List/TreeListAddRange.cs | 6 +- .../List/TreeListClear.cs | 2 - .../List/TreeListContains.cs | 6 +- .../List/TreeListCount.cs | 2 - .../List/TreeListCtor1.cs | 2 - .../List/TreeListCtor2.cs | 6 +- .../List/TreeListForEach.cs | 8 +- .../List/TreeListGetEnumerator.cs | 2 - .../List/TreeListGetRange.cs | 2 - .../List/TreeListICollectionCopyTo.cs | 4 +- .../List/TreeListICollectionIsReadOnly.cs | 2 - .../List/TreeListICollectionIsSynchronized.cs | 2 - .../List/TreeListICollectionSyncRoot.cs | 2 - .../List/TreeListIEnumerableGetEnumerator.cs | 2 - .../List/TreeListIEnumerableGetEnumerator2.cs | 6 +- .../List/TreeListIListAdd.cs | 12 ++- .../List/TreeListIListContains.cs | 8 +- .../List/TreeListIListIndexOf.cs | 12 ++- .../List/TreeListIListInsert.cs | 12 ++- .../List/TreeListIListIsFixedSize.cs | 2 - .../List/TreeListIListIsReadOnly.cs | 2 - .../List/TreeListIListItem.cs | 12 ++- .../List/TreeListIListRemove.cs | 6 +- .../List/TreeListIndexOf1.cs | 2 - .../List/TreeListIndexOf2.cs | 2 - .../List/TreeListIndexOf3.cs | 2 - .../List/TreeListInsertRange.cs | 10 +-- .../List/TreeListLastIndexOf1.cs | 4 +- .../List/TreeListLastIndexOf2.cs | 2 - .../List/TreeListLastIndexOf3.cs | 2 - .../List/TreeListRemoveAt.cs | 2 - .../List/TreeListRemoveRange.cs | 2 - .../List/TreeListReverse.cs | 2 - .../List/TreeListReverse2.cs | 2 - .../List/TreeListToArray.cs | 2 - .../TreeListTest.cs | 36 +++++---- .../PublicAPI.Unshipped.txt | 56 +++++++------- .../TreeList`1+Enumerator.cs | 14 ++-- .../TreeList`1+IndexNode.cs | 74 +++++++++++-------- .../TreeList`1+LeafNode.cs | 34 ++++----- .../TreeList`1+Node.cs | 28 ++++--- .../TreeList`1.cs | 40 +++++----- 49 files changed, 275 insertions(+), 292 deletions(-) diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/BinarySearch1.cs b/TunnelVisionLabs.Collections.Trees.Test/List/BinarySearch1.cs index ccd2fba..29dcde1 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/BinarySearch1.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/BinarySearch1.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; @@ -53,11 +51,21 @@ public void PosTest4() Assert.Equal(1, listObject.BinarySearch(new MyClass(20))); } + [Fact] + public void TestComparable() + { + MyClass first = new MyClass(10); + MyClass second = new MyClass(20); + Assert.Equal(-1, first.CompareTo(second)); + Assert.Equal(1, second.CompareTo(first)); + Assert.Equal(1, first.CompareTo(null)); + } + [Fact(DisplayName = "PosTest5: The item to be search is a null reference")] public void PosTest5() { string[] strArray = { "apple", "banana", "chocolate", "dog", "food" }; - TreeList listObject = new TreeList(strArray); + TreeList listObject = new TreeList(strArray); Assert.Equal(-1, listObject.BinarySearch(null)); } @@ -78,8 +86,11 @@ public MyClass(int a) _value = a; } - public int CompareTo(object obj) + public int CompareTo(object? obj) { + if (obj is null) + return 1; + return _value.CompareTo(((MyClass)obj)._value); } } diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/BinarySearch2.cs b/TunnelVisionLabs.Collections.Trees.Test/List/BinarySearch2.cs index a18a57c..9d18c57 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/BinarySearch2.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/BinarySearch2.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; @@ -51,18 +49,29 @@ public void PosTest4() MyClass myclass1 = new MyClass(10); MyClass myclass2 = new MyClass(20); MyClass myclass3 = new MyClass(30); - MyClass[] mc = new MyClass[3] { myclass1, myclass2, myclass3 }; - TreeList listObject = new TreeList(mc); + MyClass?[] mc = new MyClass?[4] { myclass1, null, myclass2, myclass3 }; + TreeList listObject = new TreeList(mc); MyClassIC myclassIC = new MyClassIC(); listObject.Sort(myclassIC); - Assert.Equal(2, listObject.BinarySearch(new MyClass(10), myclassIC)); + Assert.Equal(3, listObject.BinarySearch(new MyClass(10), myclassIC)); + Assert.Equal(0, listObject.BinarySearch(null, myclassIC)); + } + + [Fact] + public void TestComparable() + { + MyClass first = new MyClass(10); + MyClass second = new MyClass(20); + Assert.Equal(-1, first.CompareTo(second)); + Assert.Equal(1, second.CompareTo(first)); + Assert.Equal(1, first.CompareTo(null)); } [Fact(DisplayName = "PosTest5: The item to be search is a null reference")] public void PosTest5() { string[] strArray = { "apple", "banana", "chocolate", "dog", "food" }; - TreeList listObject = new TreeList(strArray); + TreeList listObject = new TreeList(strArray); listObject.Sort(); StrClass strClass = new StrClass(); Assert.Equal(-1, listObject.BinarySearch(null, strClass)); @@ -72,8 +81,8 @@ public void PosTest5() [Fact] public void PosTest5Ext() { - string[] strArray = { null, "banana", "chocolate", "dog", "food" }; - TreeList listObject = new TreeList(strArray); + string?[] strArray = { null, "banana", "chocolate", "dog", "food" }; + TreeList listObject = new TreeList(strArray); listObject.Sort(); StrClass strClass = new StrClass(); Assert.Equal(~1, listObject.BinarySearch(string.Empty, strClass)); @@ -112,8 +121,11 @@ public MyClass(int a) public int Value => _value; - public int CompareTo(object obj) + public int CompareTo(object? obj) { + if (obj is null) + return 1; + return _value.CompareTo(((MyClass)obj)._value); } } @@ -130,9 +142,9 @@ public int Compare(int x, int y) } } - public class StrClass : IComparer + public class StrClass : IComparer { - public int Compare(string x, string y) + public int Compare(string? x, string? y) { { if (x == null) @@ -182,10 +194,19 @@ public int Compare(string x, string y) } } - public class MyClassIC : IComparer + public class MyClassIC : IComparer { - public int Compare(MyClass x, MyClass y) + public int Compare(MyClass? x, MyClass? y) { + if (x is null) + { + return y is null ? 0 : -1; + } + else if (y is null) + { + return 1; + } + return (-1) * x.Value.CompareTo(y.Value); } } diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/BinarySearch3.cs b/TunnelVisionLabs.Collections.Trees.Test/List/BinarySearch3.cs index 8131097..7c0035d 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/BinarySearch3.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/BinarySearch3.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; @@ -51,18 +49,29 @@ public void PosTest4() MyClass myclass1 = new MyClass(10); MyClass myclass2 = new MyClass(20); MyClass myclass3 = new MyClass(30); - MyClass[] mc = new MyClass[3] { myclass1, myclass2, myclass3 }; - TreeList listObject = new TreeList(mc); + MyClass?[] mc = new MyClass?[4] { myclass1, null, myclass2, myclass3 }; + TreeList listObject = new TreeList(mc); MyClassIC myclassIC = new MyClassIC(); listObject.Sort(myclassIC); - Assert.Equal(2, listObject.BinarySearch(0, 3, new MyClass(10), myclassIC)); + Assert.Equal(3, listObject.BinarySearch(0, 4, new MyClass(10), myclassIC)); + Assert.Equal(0, listObject.BinarySearch(0, 4, null, myclassIC)); + } + + [Fact] + public void TestComparable() + { + MyClass first = new MyClass(10); + MyClass second = new MyClass(20); + Assert.Equal(-1, first.CompareTo(second)); + Assert.Equal(1, second.CompareTo(first)); + Assert.Equal(1, first.CompareTo(null)); } [Fact(DisplayName = "PosTest5: The item to be search is a null reference")] public void PosTest5() { - string[] strArray = { "apple", "banana", "chocolate", "dog", "food" }; - TreeList listObject = new TreeList(strArray); + string?[] strArray = { "apple", "banana", "chocolate", "dog", "food" }; + TreeList listObject = new TreeList(strArray); listObject.Sort(); StrClass strClass = new StrClass(); Assert.Equal(-1, listObject.BinarySearch(0, 3, null, strClass)); @@ -72,8 +81,8 @@ public void PosTest5() [Fact] public void PosTest5Ext() { - string[] strArray = { null, "banana", "chocolate", "dog", "food" }; - TreeList listObject = new TreeList(strArray); + string?[] strArray = { null, "banana", "chocolate", "dog", "food" }; + TreeList listObject = new TreeList(strArray); listObject.Sort(); StrClass strClass = new StrClass(); Assert.Equal(~1, listObject.BinarySearch(0, 3, string.Empty, strClass)); @@ -145,8 +154,11 @@ public MyClass(int a) public int Value => _value; - public int CompareTo(object obj) + public int CompareTo(object? obj) { + if (obj is null) + return 1; + return _value.CompareTo(((MyClass)obj)._value); } } @@ -163,9 +175,9 @@ public int Compare(int x, int y) } } - public class StrClass : IComparer + public class StrClass : IComparer { - public int Compare(string x, string y) + public int Compare(string? x, string? y) { { if (x == null) @@ -215,10 +227,19 @@ public int Compare(string x, string y) } } - public class MyClassIC : IComparer + public class MyClassIC : IComparer { - public int Compare(MyClass x, MyClass y) + public int Compare(MyClass? x, MyClass? y) { + if (x is null) + { + return y is null ? 0 : -1; + } + else if (y is null) + { + return 1; + } + return (-1) * x.Value.CompareTo(y.Value); } } diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/CopyTo1.cs b/TunnelVisionLabs.Collections.Trees.Test/List/CopyTo1.cs index 3cd06f9..bf37776 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/CopyTo1.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/CopyTo1.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; @@ -62,7 +60,7 @@ public void NegTest1() { int[] iArray = { 1, 9, 3, 6, 5, 8, 7, 2, 4, 0 }; TreeList listObject = new TreeList(iArray); - Assert.Throws(() => listObject.CopyTo(null)); + Assert.Throws(() => listObject.CopyTo(null!)); } [Fact(DisplayName = "NegTest2: The number of elements in the source List is greater than the number of elements that the destination array can contain")] diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/CopyTo2.cs b/TunnelVisionLabs.Collections.Trees.Test/List/CopyTo2.cs index c10d486..0be2124 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/CopyTo2.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/CopyTo2.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; @@ -75,7 +73,7 @@ public void NegTest1() { int[] iArray = { 1, 9, 3, 6, 5, 8, 7, 2, 4, 0 }; TreeList listObject = new TreeList(iArray); - Assert.Throws(() => listObject.CopyTo(null, 0)); + Assert.Throws(() => listObject.CopyTo(null!, 0)); } [Fact(DisplayName = "NegTest2: The number of elements in the source List is greater than the number of elements that the destination array can contain")] diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/CopyTo3.cs b/TunnelVisionLabs.Collections.Trees.Test/List/CopyTo3.cs index f66c2cb..c209137 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/CopyTo3.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/CopyTo3.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; @@ -73,7 +71,7 @@ public void NegTest1() { int[] iArray = { 1, 9, 3, 6, 5, 8, 7, 2, 4, 0 }; TreeList listObject = new TreeList(iArray); - Assert.Throws(() => listObject.CopyTo(0, null, 0, 10)); + Assert.Throws(() => listObject.CopyTo(0, null!, 0, 10)); } [Fact(DisplayName = "NegTest2: The number of elements in the source List is greater than the number of elements that the destination array can contain")] diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListAdd.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListAdd.cs index b098020..ea933cc 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListAdd.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListAdd.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections.Generic; @@ -54,7 +52,7 @@ public void PosTest3() [Fact(DisplayName = "PosTest4: Add null object to the list")] public void PosTest4() { - TreeList listObject = new TreeList(); + TreeList listObject = new TreeList(); listObject.Add(null); Assert.Null(listObject[0]); } diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListAddRange.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListAddRange.cs index c82eb3d..b716812 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListAddRange.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListAddRange.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; @@ -57,9 +55,9 @@ public void PosTest3() [Fact(DisplayName = "NegTest1: The argument is a null reference")] public void NegTest1() { - IEnumerable i = null; + IEnumerable? i = null; TreeList listObject = new TreeList(); - Assert.Throws(() => listObject.AddRange(i)); + Assert.Throws(() => listObject.AddRange(i!)); } public class MyClass diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListClear.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListClear.cs index 62c2b7b..9574d18 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListClear.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListClear.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections.Generic; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListContains.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListContains.cs index fa06d13..3319b51 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListContains.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListContains.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - // This file contains tests for Contains... #pragma warning disable xUnit2017 // Do not use Contains() to check if a value exists in a collection @@ -56,8 +54,8 @@ public void PosTest4() [Fact(DisplayName = "PosTest5: The argument is a null reference")] public void PosTest5() { - string[] strArray = { "apple", "banana", "chocolate", null, "food" }; - TreeList listObject = new TreeList(strArray); + string?[] strArray = { "apple", "banana", "chocolate", null, "food" }; + TreeList listObject = new TreeList(strArray); Assert.True(listObject.Contains(null)); } diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListCount.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListCount.cs index faa0498..4f2c084 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListCount.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListCount.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections.Generic; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListCtor1.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListCtor1.cs index 1f73723..de648a6 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListCtor1.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListCtor1.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections.Generic; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListCtor2.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListCtor2.cs index 128296a..9cabbfa 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListCtor2.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListCtor2.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; @@ -56,8 +54,8 @@ public void PosTest4() [Fact(DisplayName = "NegTest1: The argument is a null reference")] public void NegTest1() { - IEnumerable i = null; - Assert.Throws(() => new TreeList(i)); + IEnumerable? i = null; + Assert.Throws(() => new TreeList(i!)); } public class MyClass diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListForEach.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListForEach.cs index 409838b..72c7d4f 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListForEach.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListForEach.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; @@ -59,15 +57,15 @@ public void NegTest1() { int[] iArray = { 1, 9, 3, 6, -1, 8, 7, 1, 2, 4 }; TreeList listObject = new TreeList(iArray); - Action action = null; - Assert.Throws(() => listObject.ForEach(action)); + Action? action = null; + Assert.Throws(() => listObject.ForEach(action!)); } public class MyClass { public int Sum { get; set; } = 0; - public string Result { get; set; } + public string? Result { get; set; } public void SumCalc(int a) { diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListGetEnumerator.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListGetEnumerator.cs index 425b2c5..b2aaa69 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListGetEnumerator.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListGetEnumerator.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections.Generic; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListGetRange.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListGetRange.cs index fee62c8..91f517f 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListGetRange.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListGetRange.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListICollectionCopyTo.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListICollectionCopyTo.cs index b7af79a..33a6cf2 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListICollectionCopyTo.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListICollectionCopyTo.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; @@ -78,7 +76,7 @@ public void NegTest1() { int[] iArray = { 1, 9, 3, 6, 5, 8, 7, 2, 4, 0 }; TreeList listObject = new TreeList(iArray); - Assert.Throws(() => ((ICollection)listObject).CopyTo(null, 0)); + Assert.Throws(() => ((ICollection)listObject).CopyTo(null!, 0)); } [Fact(DisplayName = "NegTest2: The number of elements in the source List is greater than the number of elements that the destination array can contain")] diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListICollectionIsReadOnly.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListICollectionIsReadOnly.cs index 7f4d04d..fa54610 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListICollectionIsReadOnly.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListICollectionIsReadOnly.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections.Generic; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListICollectionIsSynchronized.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListICollectionIsSynchronized.cs index 2963665..8816311 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListICollectionIsSynchronized.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListICollectionIsSynchronized.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListICollectionSyncRoot.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListICollectionSyncRoot.cs index a21d93e..135337f 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListICollectionSyncRoot.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListICollectionSyncRoot.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIEnumerableGetEnumerator.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIEnumerableGetEnumerator.cs index 227a4b8..b3c006d 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIEnumerableGetEnumerator.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIEnumerableGetEnumerator.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections.Generic; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIEnumerableGetEnumerator2.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIEnumerableGetEnumerator2.cs index 07a6856..8a4bc23 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIEnumerableGetEnumerator2.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIEnumerableGetEnumerator2.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections; @@ -32,7 +30,7 @@ public void PosTest1() int j = 0; for (IEnumerator itr = returnValue; itr.MoveNext();) { - int current = (int)itr.Current; + int current = (int)itr.Current!; Assert.Equal(expectValue[j], current); j++; @@ -57,7 +55,7 @@ public void PosTest2() int j = 0; for (IEnumerator itr = returnValue; itr.MoveNext();) { - string current = (string)itr.Current; + string? current = (string?)itr.Current; Assert.Equal(expectValue[j], current); j++; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListAdd.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListAdd.cs index a000cb4..7329647 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListAdd.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListAdd.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; @@ -23,7 +21,7 @@ public void PosTest1() int count = 10; int[] expectValue = new int[10]; IList myIList = myList; - object element = null; + object? element = null; for (int i = 1; i <= count; i++) { element = i * count; @@ -35,7 +33,7 @@ public void PosTest1() int j = 0; for (IEnumerator itr = returnValue; itr.MoveNext();) { - int current = (int)itr.Current; + int current = (int)itr.Current!; Assert.Equal(expectValue[j], current); j++; @@ -47,8 +45,8 @@ public void PosTest2() { TreeList myList = new TreeList(); int count = 10; - string[] expectValue = new string[10]; - object element = null; + string?[] expectValue = new string?[10]; + object? element = null; IList myIList = myList; for (int i = 1; i <= count; i++) { @@ -61,7 +59,7 @@ public void PosTest2() int j = 0; for (IEnumerator itr = returnValue; itr.MoveNext();) { - string current = (string)itr.Current; + string? current = (string?)itr.Current; Assert.Equal(expectValue[j], current); j++; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListContains.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListContains.cs index 60ad004..94f53fa 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListContains.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListContains.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections; @@ -22,7 +20,7 @@ public void PosTest1() int count = 10; int[] expectValue = new int[10]; IList myIList = myList; - object element = null; + object? element = null; for (int i = 1; i <= count; i++) { element = i * count; @@ -38,8 +36,8 @@ public void PosTest2() { TreeList myList = new TreeList(); int count = 10; - string[] expectValue = new string[10]; - object element = null; + string?[] expectValue = new string?[10]; + object? element = null; IList myIList = myList; for (int i = 1; i <= count; i++) { diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListIndexOf.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListIndexOf.cs index 7c6de9c..ec0bf8b 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListIndexOf.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListIndexOf.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections; @@ -22,7 +20,7 @@ public void PosTest1() int count = 10; int[] expectValue = new int[10]; IList myIList = myList; - object element = null; + object? element = null; for (int i = 1; i <= count; i++) { element = i * count; @@ -42,8 +40,8 @@ public void PosTest2() { TreeList myList = new TreeList(); int count = 10; - string[] expectValue = new string[10]; - object element = null; + string?[] expectValue = new string?[10]; + object? element = null; IList myIList = myList; for (int i = 1; i <= count; i++) { @@ -64,8 +62,8 @@ public void PosTest3() { TreeList myList = new TreeList(); int count = 10; - string[] expectValue = new string[10]; - object element = null; + string?[] expectValue = new string?[10]; + object? element = null; IList myIList = myList; for (int i = 1; i <= count; i++) { diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListInsert.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListInsert.cs index 0e935ca..6af1a45 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListInsert.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListInsert.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; @@ -28,7 +26,7 @@ public void PosTest1() } IList myIList = myList; - object element = null; + object? element = null; for (int i = 1; i <= count; i++) { element = 0; @@ -46,7 +44,7 @@ public void PosTest1() int j = 0; for (IEnumerator itr = returnValue; itr.MoveNext();) { - int current = (int)itr.Current; + int current = (int)itr.Current!; Assert.Equal(expectValue[j], current); j++; @@ -58,13 +56,13 @@ public void PosTest2() { TreeList myList = new TreeList(); int count = 10; - string[] expectValue = new string[20]; + string?[] expectValue = new string?[20]; for (int z = 0; z < 20; z++) { expectValue[z] = string.Empty; } - object element = null; + object? element = null; IList myIList = myList; for (int i = 1; i <= count; i++) { @@ -83,7 +81,7 @@ public void PosTest2() int j = 0; for (IEnumerator itr = returnValue; itr.MoveNext();) { - string current = (string)itr.Current; + string current = (string)itr.Current!; Assert.Equal(expectValue[j], current); j++; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListIsFixedSize.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListIsFixedSize.cs index eea6e36..93dcb07 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListIsFixedSize.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListIsFixedSize.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListIsReadOnly.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListIsReadOnly.cs index ad8b626..6663cb4 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListIsReadOnly.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListIsReadOnly.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListItem.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListItem.cs index 27844e9..b456b13 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListItem.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListItem.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; @@ -23,7 +21,7 @@ public void PosTest1() int count = 10; int[] expectValue = new int[10]; IList myIList = myList; - object element = null; + object? element = null; for (int i = 1; i <= count; i++) { element = i * count; @@ -33,7 +31,7 @@ public void PosTest1() for (int j = 0; j < myIList.Count; j++) { - int current = (int)myIList[j]; + int current = (int)myIList[j]!; Assert.Equal(expectValue[j], current); } } @@ -43,8 +41,8 @@ public void PosTest2() { TreeList myList = new TreeList(); int count = 10; - string[] expectValue = new string[10]; - object element = null; + string?[] expectValue = new string?[10]; + object? element = null; IList myIList = myList; for (int i = 1; i <= count; i++) { @@ -55,7 +53,7 @@ public void PosTest2() for (int j = 0; j < myIList.Count; j++) { - string current = (string)myIList[j]; + string current = (string)myIList[j]!; Assert.Equal(expectValue[j], current); } } diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListRemove.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListRemove.cs index a8da2e3..18972a2 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListRemove.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIListRemove.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections; @@ -21,7 +19,7 @@ public void PosTest1() TreeList myList = new TreeList(); int count = 10; IList myIList = myList; - object element = null; + object? element = null; for (int i = 1; i <= count; i++) { element = i * count; @@ -41,7 +39,7 @@ public void PosTest2() { TreeList myList = new TreeList(); int count = 10; - object element = null; + object? element = null; IList myIList = myList; for (int i = 1; i <= count; i++) { diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIndexOf1.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIndexOf1.cs index 15bec63..6ab8085 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIndexOf1.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIndexOf1.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections.Generic; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIndexOf2.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIndexOf2.cs index d6fcd24..a96063c 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIndexOf2.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIndexOf2.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIndexOf3.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIndexOf3.cs index 2c66ba9..d17a63e 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIndexOf3.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListIndexOf3.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListInsertRange.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListInsertRange.cs index e527550..0a79b27 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListInsertRange.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListInsertRange.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; @@ -69,8 +67,8 @@ public void PosTest3() public void PosTest4() { string[] strArray = { "apple", "dog", "banana", "food" }; - TreeList listObject = new TreeList(strArray); - string[] insert = new string[2] { null, null }; + TreeList listObject = new TreeList(strArray); + string?[] insert = new string?[2] { null, null }; int index = Generator.GetInt32(0, 4); listObject.InsertRange(index, insert); Assert.Equal(6, listObject.Count); @@ -83,9 +81,9 @@ public void NegTest1() { string[] strArray = { "apple", "dog", "banana", "food" }; TreeList listObject = new TreeList(strArray); - string[] insert = null; + string[]? insert = null; int index = Generator.GetInt32(0, 4); - Assert.Throws(() => listObject.InsertRange(index, insert)); + Assert.Throws(() => listObject.InsertRange(index, insert!)); } [Fact(DisplayName = "NegTest2: The index is negative")] diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListLastIndexOf1.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListLastIndexOf1.cs index 49f786c..ee8591d 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListLastIndexOf1.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListLastIndexOf1.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections.Generic; @@ -72,7 +70,7 @@ public void PosTest5() public void PosTest6() { string[] strArray = { "apple", "banana", "chocolate" }; - TreeList listObject = new TreeList(strArray); + TreeList listObject = new TreeList(strArray); int result = listObject.LastIndexOf(null); Assert.Equal(-1, result); } diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListLastIndexOf2.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListLastIndexOf2.cs index 24f9447..2cc340a 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListLastIndexOf2.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListLastIndexOf2.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListLastIndexOf3.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListLastIndexOf3.cs index bea8643..c049801 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListLastIndexOf3.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListLastIndexOf3.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListRemoveAt.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListRemoveAt.cs index ebc0649..b542d2a 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListRemoveAt.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListRemoveAt.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListRemoveRange.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListRemoveRange.cs index 8f50547..3248362 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListRemoveRange.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListRemoveRange.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListReverse.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListReverse.cs index 32d45b0..b978ec1 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListReverse.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListReverse.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections.Generic; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListReverse2.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListReverse2.cs index 1798f8c..4750a3b 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListReverse2.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListReverse2.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListToArray.cs b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListToArray.cs index 741e244..54f3962 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/List/TreeListToArray.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/List/TreeListToArray.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.List { using System.Collections.Generic; diff --git a/TunnelVisionLabs.Collections.Trees.Test/TreeListTest.cs b/TunnelVisionLabs.Collections.Trees.Test/TreeListTest.cs index ea83f36..02ac2a0 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/TreeListTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/TreeListTest.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test { using System; @@ -79,7 +77,7 @@ private static void TestIListInterfaceImpl(IList list, bool supportsNullValues) list.Remove("Text"); Assert.Equal(originalCount, list.Count); - object removedItem = list[0]; + object? removedItem = list[0]; list.Remove(list[0]); Assert.Equal(originalCount - 1, list.Count); Assert.True(list.Contains(removedItem)); @@ -210,8 +208,8 @@ public void TestIndexer() public void TestCopyToValidation() { TreeList list = new TreeList(Enumerable.Range(0, 10)); - Assert.Throws("dest", () => list.CopyTo(null)); - Assert.Throws("dest", () => list.CopyTo(0, null, 0, list.Count)); + Assert.Throws("dest", () => list.CopyTo(null!)); + Assert.Throws("dest", () => list.CopyTo(0, null!, 0, list.Count)); Assert.Throws("srcIndex", () => list.CopyTo(-1, new int[list.Count], 0, list.Count)); Assert.Throws("dstIndex", () => list.CopyTo(0, new int[list.Count], -1, list.Count)); Assert.Throws("length", () => list.CopyTo(0, new int[list.Count], 0, -1)); @@ -219,7 +217,7 @@ public void TestCopyToValidation() Assert.Throws(string.Empty, () => list.CopyTo(0, new int[list.Count], 1, list.Count)); ICollection collection = list; - Assert.Throws("dest", () => collection.CopyTo(null, 0)); + Assert.Throws("dest", () => collection.CopyTo(null!, 0)); Assert.Throws("dstIndex", () => collection.CopyTo(new int[collection.Count], -1)); Assert.Throws("dstIndex", () => collection.CopyTo(Array.CreateInstance(typeof(int), new[] { list.Count }, new[] { 1 }), 0)); Assert.Throws(string.Empty, () => collection.CopyTo(new int[collection.Count], collection.Count + 1)); @@ -476,9 +474,9 @@ public void TestFindIndex() reference.Insert(index, i); } - Assert.Throws(() => list.FindIndex(null)); - Assert.Throws(() => list.FindIndex(0, null)); - Assert.Throws(() => list.FindIndex(0, 0, null)); + Assert.Throws(() => list.FindIndex(null!)); + Assert.Throws(() => list.FindIndex(0, null!)); + Assert.Throws(() => list.FindIndex(0, 0, null!)); Assert.Throws(() => list.FindIndex(-1, i => true)); Assert.Throws(() => list.FindIndex(0, -1, i => true)); @@ -517,9 +515,9 @@ public void TestFindLastIndex() reference.Insert(index, i); } - Assert.Throws(() => list.FindLastIndex(null)); - Assert.Throws(() => list.FindLastIndex(-1, null)); - Assert.Throws(() => list.FindLastIndex(-1, 0, null)); + Assert.Throws(() => list.FindLastIndex(null!)); + Assert.Throws(() => list.FindLastIndex(-1, null!)); + Assert.Throws(() => list.FindLastIndex(-1, 0, null!)); Assert.Throws(() => list.FindLastIndex(list.Count, i => true)); Assert.Throws(() => list.FindLastIndex(list.Count - 1, -1, i => true)); @@ -716,7 +714,7 @@ public void TestSortComparison() reference.Insert(index, item); } - Assert.Throws(() => list.Sort((Comparison)null)); + Assert.Throws(() => list.Sort((Comparison)null!)); Comparison comparison = (x, y) => x - y; list.Sort(comparison); @@ -937,7 +935,7 @@ public void TestRemoveValue() public void TestRemoveAll() { var list = new TreeList(4, Enumerable.Range(0, 10)); - Assert.Throws(() => list.RemoveAll(null)); + Assert.Throws(() => list.RemoveAll(null!)); Assert.Equal(5, list.RemoveAll(i => (i % 2) == 0)); Assert.Equal(new[] { 1, 3, 5, 7, 9 }, list); @@ -949,7 +947,7 @@ public void TestRemoveAll() public void TestExists() { var list = new TreeList(4, Enumerable.Range(0, 10)); - Assert.Throws(() => list.Exists(null)); + Assert.Throws(() => list.Exists(null!)); Assert.False(list.Exists(value => value < 0)); foreach (var i in list) @@ -964,7 +962,7 @@ public void TestExists() public void TestFind() { var list = new TreeList(4, Enumerable.Range(1, 10)); - Assert.Throws(() => list.Find(null)); + Assert.Throws(() => list.Find(null!)); Assert.Equal(0, list.Find(value => value < 0)); foreach (var i in list) @@ -979,7 +977,7 @@ public void TestFind() public void TestFindAll() { var list = new TreeList(4, Enumerable.Range(0, 10)); - Assert.Throws(() => list.FindAll(null)); + Assert.Throws(() => list.FindAll(null!)); TreeList found = list.FindAll(i => (i % 2) == 0); @@ -995,7 +993,7 @@ public void TestFindLast() { var list = new TreeList(4, Enumerable.Range(1, 10)); var reference = new List(Enumerable.Range(1, 10)); - Assert.Throws(() => list.FindLast(null)); + Assert.Throws(() => list.FindLast(null!)); Assert.Equal(0, list.FindLast(i => i < 0)); Assert.Equal(0, reference.FindLast(i => i < 0)); @@ -1012,7 +1010,7 @@ public void TestTrueForAll() { var list = new TreeList(); Assert.True(list.TrueForAll(i => false)); - Assert.Throws(() => list.TrueForAll(null)); + Assert.Throws(() => list.TrueForAll(null!)); list.Add(1); Assert.True(list.TrueForAll(i => i > 0)); diff --git a/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt b/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt index 17f9e34..5d9f924 100644 --- a/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt +++ b/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt @@ -587,59 +587,59 @@ TunnelVisionLabs.Collections.Trees.TreeDictionary.this[TKey key].g TunnelVisionLabs.Collections.Trees.TreeDictionary.this[TKey key].set -> void TunnelVisionLabs.Collections.Trees.TreeList TunnelVisionLabs.Collections.Trees.TreeList.Add(T item) -> void -~TunnelVisionLabs.Collections.Trees.TreeList.AddRange(System.Collections.Generic.IEnumerable collection) -> void +TunnelVisionLabs.Collections.Trees.TreeList.AddRange(System.Collections.Generic.IEnumerable! collection) -> void TunnelVisionLabs.Collections.Trees.TreeList.BinarySearch(T item) -> int -~TunnelVisionLabs.Collections.Trees.TreeList.BinarySearch(T item, System.Collections.Generic.IComparer comparer) -> int -~TunnelVisionLabs.Collections.Trees.TreeList.BinarySearch(int index, int count, T item, System.Collections.Generic.IComparer comparer) -> int +TunnelVisionLabs.Collections.Trees.TreeList.BinarySearch(T item, System.Collections.Generic.IComparer? comparer) -> int +TunnelVisionLabs.Collections.Trees.TreeList.BinarySearch(int index, int count, T item, System.Collections.Generic.IComparer? comparer) -> int TunnelVisionLabs.Collections.Trees.TreeList.Clear() -> void TunnelVisionLabs.Collections.Trees.TreeList.Contains(T item) -> bool -~TunnelVisionLabs.Collections.Trees.TreeList.ConvertAll(System.Func converter) -> TunnelVisionLabs.Collections.Trees.TreeList -~TunnelVisionLabs.Collections.Trees.TreeList.CopyTo(T[] array) -> void -~TunnelVisionLabs.Collections.Trees.TreeList.CopyTo(T[] array, int arrayIndex) -> void -~TunnelVisionLabs.Collections.Trees.TreeList.CopyTo(int srcIndex, T[] dest, int dstIndex, int length) -> void +TunnelVisionLabs.Collections.Trees.TreeList.ConvertAll(System.Func! converter) -> TunnelVisionLabs.Collections.Trees.TreeList! +TunnelVisionLabs.Collections.Trees.TreeList.CopyTo(T[]! array) -> void +TunnelVisionLabs.Collections.Trees.TreeList.CopyTo(T[]! array, int arrayIndex) -> void +TunnelVisionLabs.Collections.Trees.TreeList.CopyTo(int srcIndex, T[]! dest, int dstIndex, int length) -> void TunnelVisionLabs.Collections.Trees.TreeList.Count.get -> int TunnelVisionLabs.Collections.Trees.TreeList.Enumerator TunnelVisionLabs.Collections.Trees.TreeList.Enumerator.Current.get -> T TunnelVisionLabs.Collections.Trees.TreeList.Enumerator.Dispose() -> void TunnelVisionLabs.Collections.Trees.TreeList.Enumerator.MoveNext() -> bool -~TunnelVisionLabs.Collections.Trees.TreeList.Exists(System.Predicate match) -> bool -~TunnelVisionLabs.Collections.Trees.TreeList.Find(System.Predicate match) -> T -~TunnelVisionLabs.Collections.Trees.TreeList.FindAll(System.Predicate match) -> TunnelVisionLabs.Collections.Trees.TreeList -~TunnelVisionLabs.Collections.Trees.TreeList.FindIndex(System.Predicate match) -> int -~TunnelVisionLabs.Collections.Trees.TreeList.FindIndex(int startIndex, System.Predicate match) -> int -~TunnelVisionLabs.Collections.Trees.TreeList.FindIndex(int startIndex, int count, System.Predicate match) -> int -~TunnelVisionLabs.Collections.Trees.TreeList.FindLast(System.Predicate match) -> T -~TunnelVisionLabs.Collections.Trees.TreeList.FindLastIndex(System.Predicate match) -> int -~TunnelVisionLabs.Collections.Trees.TreeList.FindLastIndex(int startIndex, System.Predicate match) -> int -~TunnelVisionLabs.Collections.Trees.TreeList.FindLastIndex(int startIndex, int count, System.Predicate match) -> int -~TunnelVisionLabs.Collections.Trees.TreeList.ForEach(System.Action action) -> void +TunnelVisionLabs.Collections.Trees.TreeList.Exists(System.Predicate! match) -> bool +TunnelVisionLabs.Collections.Trees.TreeList.Find(System.Predicate! match) -> T +TunnelVisionLabs.Collections.Trees.TreeList.FindAll(System.Predicate! match) -> TunnelVisionLabs.Collections.Trees.TreeList! +TunnelVisionLabs.Collections.Trees.TreeList.FindIndex(System.Predicate! match) -> int +TunnelVisionLabs.Collections.Trees.TreeList.FindIndex(int startIndex, System.Predicate! match) -> int +TunnelVisionLabs.Collections.Trees.TreeList.FindIndex(int startIndex, int count, System.Predicate! match) -> int +TunnelVisionLabs.Collections.Trees.TreeList.FindLast(System.Predicate! match) -> T +TunnelVisionLabs.Collections.Trees.TreeList.FindLastIndex(System.Predicate! match) -> int +TunnelVisionLabs.Collections.Trees.TreeList.FindLastIndex(int startIndex, System.Predicate! match) -> int +TunnelVisionLabs.Collections.Trees.TreeList.FindLastIndex(int startIndex, int count, System.Predicate! match) -> int +TunnelVisionLabs.Collections.Trees.TreeList.ForEach(System.Action! action) -> void TunnelVisionLabs.Collections.Trees.TreeList.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.TreeList.Enumerator -~TunnelVisionLabs.Collections.Trees.TreeList.GetRange(int index, int count) -> TunnelVisionLabs.Collections.Trees.TreeList +TunnelVisionLabs.Collections.Trees.TreeList.GetRange(int index, int count) -> TunnelVisionLabs.Collections.Trees.TreeList! TunnelVisionLabs.Collections.Trees.TreeList.IndexOf(T item) -> int TunnelVisionLabs.Collections.Trees.TreeList.IndexOf(T item, int index) -> int TunnelVisionLabs.Collections.Trees.TreeList.IndexOf(T item, int index, int count) -> int TunnelVisionLabs.Collections.Trees.TreeList.Insert(int index, T item) -> void -~TunnelVisionLabs.Collections.Trees.TreeList.InsertRange(int index, System.Collections.Generic.IEnumerable collection) -> void +TunnelVisionLabs.Collections.Trees.TreeList.InsertRange(int index, System.Collections.Generic.IEnumerable! collection) -> void TunnelVisionLabs.Collections.Trees.TreeList.LastIndexOf(T item) -> int TunnelVisionLabs.Collections.Trees.TreeList.LastIndexOf(T item, int index) -> int TunnelVisionLabs.Collections.Trees.TreeList.LastIndexOf(T item, int index, int count) -> int TunnelVisionLabs.Collections.Trees.TreeList.Remove(T item) -> bool -~TunnelVisionLabs.Collections.Trees.TreeList.RemoveAll(System.Predicate match) -> int +TunnelVisionLabs.Collections.Trees.TreeList.RemoveAll(System.Predicate! match) -> int TunnelVisionLabs.Collections.Trees.TreeList.RemoveAt(int index) -> void TunnelVisionLabs.Collections.Trees.TreeList.RemoveRange(int index, int count) -> void TunnelVisionLabs.Collections.Trees.TreeList.Reverse() -> void TunnelVisionLabs.Collections.Trees.TreeList.Reverse(int index, int count) -> void TunnelVisionLabs.Collections.Trees.TreeList.Sort() -> void -~TunnelVisionLabs.Collections.Trees.TreeList.Sort(System.Collections.Generic.IComparer comparer) -> void -~TunnelVisionLabs.Collections.Trees.TreeList.Sort(System.Comparison comparison) -> void -~TunnelVisionLabs.Collections.Trees.TreeList.Sort(int index, int count, System.Collections.Generic.IComparer comparer) -> void -~TunnelVisionLabs.Collections.Trees.TreeList.ToArray() -> T[] +TunnelVisionLabs.Collections.Trees.TreeList.Sort(System.Collections.Generic.IComparer? comparer) -> void +TunnelVisionLabs.Collections.Trees.TreeList.Sort(System.Comparison! comparison) -> void +TunnelVisionLabs.Collections.Trees.TreeList.Sort(int index, int count, System.Collections.Generic.IComparer? comparer) -> void +TunnelVisionLabs.Collections.Trees.TreeList.ToArray() -> T[]! TunnelVisionLabs.Collections.Trees.TreeList.TreeList() -> void -~TunnelVisionLabs.Collections.Trees.TreeList.TreeList(System.Collections.Generic.IEnumerable collection) -> void +TunnelVisionLabs.Collections.Trees.TreeList.TreeList(System.Collections.Generic.IEnumerable! collection) -> void TunnelVisionLabs.Collections.Trees.TreeList.TreeList(int branchingFactor) -> void -~TunnelVisionLabs.Collections.Trees.TreeList.TreeList(int branchingFactor, System.Collections.Generic.IEnumerable collection) -> void +TunnelVisionLabs.Collections.Trees.TreeList.TreeList(int branchingFactor, System.Collections.Generic.IEnumerable! collection) -> void TunnelVisionLabs.Collections.Trees.TreeList.TrimExcess() -> void -~TunnelVisionLabs.Collections.Trees.TreeList.TrueForAll(System.Predicate match) -> bool +TunnelVisionLabs.Collections.Trees.TreeList.TrueForAll(System.Predicate! match) -> bool TunnelVisionLabs.Collections.Trees.TreeList.this[int index].get -> T TunnelVisionLabs.Collections.Trees.TreeList.this[int index].set -> void TunnelVisionLabs.Collections.Trees.TreeQueue diff --git a/TunnelVisionLabs.Collections.Trees/TreeList`1+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/TreeList`1+Enumerator.cs index 5798b93..1666e03 100644 --- a/TunnelVisionLabs.Collections.Trees/TreeList`1+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/TreeList`1+Enumerator.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees { using System; @@ -18,7 +16,7 @@ public struct Enumerator : IEnumerator private readonly int _version; private int _index; - private LeafNode _leafNode; + private LeafNode? _leafNode; private int _leafIndex; private T _current; @@ -35,12 +33,12 @@ internal Enumerator(TreeList list, TreeSpan span) _index = -1; _leafNode = null; _leafIndex = -1; - _current = default; + _current = default!; } public T Current => _current; - object IEnumerator.Current => Current; + object? IEnumerator.Current => Current; public void Dispose() { @@ -72,7 +70,7 @@ public bool MoveNext() _index = _span.Start - 1; _leafIndex--; } - else if (_leafIndex == _leafNode.Count - 1) + else if (_leafIndex == _leafNode!.Count - 1) { // Need to move to the next leaf _leafNode = _leafNode.Next; @@ -87,7 +85,7 @@ public bool MoveNext() } _leafIndex++; - _current = _leafNode[_leafIndex]; + _current = _leafNode![_leafIndex]; return true; } @@ -101,7 +99,7 @@ internal void InternalReset() _leafNode = null; _index = -1; _leafIndex = -1; - _current = default; + _current = default!; } } } diff --git a/TunnelVisionLabs.Collections.Trees/TreeList`1+IndexNode.cs b/TunnelVisionLabs.Collections.Trees/TreeList`1+IndexNode.cs index 9818e87..f208218 100644 --- a/TunnelVisionLabs.Collections.Trees/TreeList`1+IndexNode.cs +++ b/TunnelVisionLabs.Collections.Trees/TreeList`1+IndexNode.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees { using System; @@ -15,7 +13,7 @@ private sealed class IndexNode : Node { private readonly int[] _offsets; private readonly Node[] _nodes; - private IndexNode _next; + private IndexNode? _next; private int _nodeCount; private int _count; @@ -37,11 +35,11 @@ internal IndexNode(int branchingFactor, Node child1, Node child2) _count = child1.Count + child2.Count; } - internal IndexNode(int branchingFactor, Node firstChild, Node lastChild, out IndexNode lastNode) + internal IndexNode(int branchingFactor, Node firstChild, Node lastChild, out IndexNode? lastNode) : this(branchingFactor) { lastNode = null; - for (Node current = firstChild; current != null; current = current == lastChild ? null : current.NextNode) + for (Node? current = firstChild; current != null; current = current == lastChild ? null : current.NextNode) { if (_nodeCount == _nodes.Length) { @@ -61,13 +59,21 @@ internal IndexNode(int branchingFactor, Node firstChild, Node lastChild, out Ind internal override int Count => _count; - internal override LeafNode FirstLeaf => _nodes[0].FirstLeaf; + internal override LeafNode FirstLeaf + { + get + { + LeafNode? firstLeaf = _nodes[0].FirstLeaf; + Debug.Assert(firstLeaf is object, $"Assertion failed: {nameof(firstLeaf)} is object"); + return firstLeaf; + } + } - internal override Node NextNode => Next; + internal override Node? NextNode => Next; internal override Node FirstChild => _nodes[0]; - internal IndexNode Next => _next; + internal IndexNode? Next => _next; internal override T this[int index] { @@ -140,10 +146,10 @@ internal override int LastIndexOf(T item, TreeSpan span) return -1; } - internal override Node Insert(int branchingFactor, bool isAppend, int index, T item) + internal override Node? Insert(int branchingFactor, bool isAppend, int index, T item) { int pageIndex = FindLowerBound(_offsets, _nodeCount, index); - Node splitChild = _nodes[pageIndex].Insert(branchingFactor, isAppend, index - _offsets[pageIndex], item); + Node? splitChild = _nodes[pageIndex].Insert(branchingFactor, isAppend, index - _offsets[pageIndex], item); if (splitChild == null) { for (int i = pageIndex + 1; i < _nodeCount; i++) @@ -160,11 +166,11 @@ internal override Node Insert(int branchingFactor, bool isAppend, int index, T i return InsertIndex(branchingFactor, isAppend, pageIndex + 1, splitChild); } - internal override Node InsertRange(int branchingFactor, bool isAppend, int index, IEnumerable collection) + internal override Node? InsertRange(int branchingFactor, bool isAppend, int index, IEnumerable collection) { int pageIndex = FindLowerBound(_offsets, _nodeCount, index); int previousCount = _nodes[pageIndex].Count; - Node lastImpactedChild = _nodes[pageIndex].InsertRange(branchingFactor, isAppend, index - _offsets[pageIndex], collection); + Node? lastImpactedChild = _nodes[pageIndex].InsertRange(branchingFactor, isAppend, index - _offsets[pageIndex], collection); if (lastImpactedChild == null) { int insertionCount = _nodes[pageIndex].Count - previousCount; @@ -182,13 +188,13 @@ internal override Node InsertRange(int branchingFactor, bool isAppend, int index pageIndex++; IndexNode insertionNode = this; - Node lastIndexNode = null; - for (Node item = _nodes[pageIndex - 1].NextNode; true; item = item.NextNode) + Node? lastIndexNode = null; + for (Node? item = _nodes[pageIndex - 1].NextNode; true; item = item.NextNode) { Debug.Assert(item != null, "Assertion failed: item != null"); Debug.Assert(pageIndex >= 0 && pageIndex <= insertionNode._nodes.Length, "Assertion failed: pageIndex >= 0 && pageIndex <= insertionNode._nodes.Length"); - IndexNode newLastIndex = insertionNode.InsertIndex(branchingFactor, isAppend, pageIndex, item); + IndexNode? newLastIndex = insertionNode.InsertIndex(branchingFactor, isAppend, pageIndex, item); if (newLastIndex != null) { // this insertion resulted in a split, so at minimum 'pageIndex' must be updated @@ -261,7 +267,7 @@ internal override bool RemoveLast() Debug.Assert(removedChild, $"Assertion failed: removedChild"); _nodeCount--; _offsets[_nodeCount] = 0; - _nodes[_nodeCount] = null; + _nodes[_nodeCount] = null!; _count--; return false; } @@ -283,8 +289,8 @@ internal override bool RemoveAt(int index) // _next cannot be null if (pageIndex == _nodeCount - 1), because there is no way we needed to rebalance // the children nodes for that case. This method would have already returned above. - Node expectedNext = pageIndex == _nodeCount - 1 ? _next._nodes[0] : _nodes[pageIndex + 1]; - Node nextChild = _nodes[pageIndex].NextNode; + Node expectedNext = pageIndex == _nodeCount - 1 ? _next!._nodes[0] : _nodes[pageIndex + 1]; + Node? nextChild = _nodes[pageIndex].NextNode; bool removedChild = nextChild != expectedNext; if (!removedChild) { @@ -299,24 +305,28 @@ internal override bool RemoveAt(int index) _count = _offsets[_nodeCount - 1] + _nodes[_nodeCount - 1].Count; - bool affectedNextPage = pageIndex == _nodeCount - 1 && _next != null; - if (affectedNextPage) + if (pageIndex == _nodeCount - 1 && _next != null) { + // The next page was affected for (int i = 1; i < _next._nodeCount; i++) { _next._offsets[i] = _next._offsets[i - 1] + _next._nodes[i - 1].Count; } _next._count = _next._offsets[_next._nodeCount - 1] + _next._nodes[_next._nodeCount - 1].Count; + return true; + } + else + { + return false; } - - return affectedNextPage; } else { bool removedFromNextPage = pageIndex == _nodeCount - 1; if (removedFromNextPage) { + Debug.Assert(_next is object, $"Per the explanation above, {nameof(_next)} cannot be null when {nameof(removedFromNextPage)} is true."); if (_next._nodeCount == 1) { // Removed the only child of the next page @@ -332,7 +342,7 @@ internal override bool RemoveAt(int index) _next._nodes[0] = _nodes[_nodeCount - 1]; _count = _offsets[_nodeCount - 1]; _offsets[_nodeCount - 1] = 0; - _nodes[_nodeCount - 1] = null; + _nodes[_nodeCount - 1] = null!; _nodeCount--; for (int i = 1; i < _next._nodeCount; i++) { @@ -350,7 +360,7 @@ internal override bool RemoveAt(int index) } _offsets[_nodeCount - 1] = 0; - _nodes[_nodeCount - 1] = default; + _nodes[_nodeCount - 1] = null!; _nodeCount--; _count = _offsets[_nodeCount - 1] + _nodes[_nodeCount - 1].Count; } @@ -557,7 +567,7 @@ internal override int BinarySearch(TreeSpan span, T item, IComparer comparer) int page = lowPage + ((highPage - lowPage + 1) >> 1); Debug.Assert(page > firstPage, $"Assertion failed: {nameof(page)} > {nameof(firstPage)}"); - T value = _nodes[page].FirstLeaf[0]; + T value = _nodes[page].FirstLeaf![0]; int c; try @@ -598,11 +608,11 @@ internal override int BinarySearch(TreeSpan span, T item, IComparer comparer) } } - internal override TreeList.Node ConvertAll(Func converter, TreeList.Node convertedNextNode) + internal override TreeList.Node ConvertAll(Func converter, TreeList.Node? convertedNextNode) { var result = new TreeList.IndexNode(_nodes.Length); - TreeList.Node convertedNextChild = convertedNextNode?.FirstChild; + TreeList.Node? convertedNextChild = convertedNextNode?.FirstChild; for (int i = _nodeCount - 1; i >= 0; i--) { convertedNextChild = _nodes[i].ConvertAll(converter, convertedNextChild); @@ -610,7 +620,7 @@ internal override TreeList.Node ConvertAll(Func co } Array.Copy(_offsets, result._offsets, _nodeCount); - result._next = (TreeList.IndexNode)convertedNextNode; + result._next = (TreeList.IndexNode?)convertedNextNode; result._count = _count; result._nodeCount = _nodeCount; return result; @@ -622,14 +632,16 @@ internal override bool TrimExcess() return false; // Simply rebuild this level by walking child nodes - IndexNode first = this; + IndexNode? first = this; int firstOffset = 0; _nodeCount = 0; _count = 0; - for (Node child = FirstChild; child != null; child = child.NextNode) + for (Node? child = FirstChild; child != null; child = child.NextNode) { if (firstOffset == first._nodes.Length) { + Debug.Assert(first.Next is object, "'child.NextNode' was not null, but it pointed to a node which is not a direct child of 'first'."); + first = first.Next; firstOffset = 0; first._nodeCount = 0; @@ -660,7 +672,7 @@ private TreeSpan MapSpanDownToChild(TreeSpan span, int childIndex) return TreeSpan.Intersect(mappedFullSpan, _nodes[childIndex].Span); } - private IndexNode InsertIndex(int branchingFactor, bool isAppend, int index, Node node) + private IndexNode? InsertIndex(int branchingFactor, bool isAppend, int index, Node node) { if (_nodeCount < _nodes.Length) { diff --git a/TunnelVisionLabs.Collections.Trees/TreeList`1+LeafNode.cs b/TunnelVisionLabs.Collections.Trees/TreeList`1+LeafNode.cs index 9554721..f6cbdb9 100644 --- a/TunnelVisionLabs.Collections.Trees/TreeList`1+LeafNode.cs +++ b/TunnelVisionLabs.Collections.Trees/TreeList`1+LeafNode.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees { using System; @@ -14,7 +12,7 @@ public partial class TreeList private sealed class LeafNode : Node { private readonly T[] _data; - private LeafNode _next; + private LeafNode? _next; private int _count; internal LeafNode(int branchingFactor) @@ -26,11 +24,11 @@ internal LeafNode(int branchingFactor) internal override LeafNode FirstLeaf => this; - internal override Node NextNode => Next; + internal override Node? NextNode => Next; - internal override Node FirstChild => null; + internal override Node? FirstChild => null; - internal LeafNode Next => _next; + internal LeafNode? Next => _next; internal override T this[int index] { @@ -71,7 +69,7 @@ internal override int LastIndexOf(T item, TreeSpan span) return Array.LastIndexOf(_data, item, span.EndInclusive, span.Count); } - internal override TreeList.Node ConvertAll(Func converter, TreeList.Node convertedNextNode) + internal override TreeList.Node ConvertAll(Func converter, TreeList.Node? convertedNextNode) { var result = new TreeList.LeafNode(_data.Length); @@ -80,12 +78,12 @@ internal override TreeList.Node ConvertAll(Func co result._data[i] = converter(_data[i]); } - result._next = (TreeList.LeafNode)convertedNextNode; + result._next = (TreeList.LeafNode?)convertedNextNode; result._count = _count; return result; } - internal override Node Insert(int branchingFactor, bool isAppend, int index, T item) + internal override Node? Insert(int branchingFactor, bool isAppend, int index, T item) { if (_count < _data.Length) { @@ -100,7 +98,7 @@ internal override Node Insert(int branchingFactor, bool isAppend, int index, T i if (isAppend) { // optimize the case of adding at the end of the overall list - var result = (LeafNode)Empty.Insert(branchingFactor, isAppend, 0, item); + var result = (LeafNode?)Empty.Insert(branchingFactor, isAppend, 0, item); _next = result; return result; } @@ -144,15 +142,15 @@ internal override Node Insert(int branchingFactor, bool isAppend, int index, T i } } - internal override Node InsertRange(int branchingFactor, bool isAppend, int index, IEnumerable collection) + internal override Node? InsertRange(int branchingFactor, bool isAppend, int index, IEnumerable collection) { Node insertionNode = this; - Node lastLeaf = null; + Node? lastLeaf = null; foreach (T item in collection) { Debug.Assert(index >= 0 && index <= ((LeafNode)insertionNode)._data.Length, "Assertion failed: index >= 0 && index <= ((LeafNode)insertionNode)._data.Length"); - Node newLastLeaf = insertionNode.Insert(branchingFactor, isAppend, index, item); + Node? newLastLeaf = insertionNode.Insert(branchingFactor, isAppend, index, item); if (newLastLeaf != null) { // this insertion resulted in a split, so at minimum 'index' must be updated @@ -206,7 +204,7 @@ internal override bool RemoveLast() { Debug.Assert(_count > 1, $"Assertion failed: _count > 1"); _count--; - _data[_count] = default; + _data[_count] = default!; return false; } } @@ -218,7 +216,7 @@ internal override bool RemoveAt(int index) _data[i] = _data[i + 1]; } - _data[_count - 1] = default; + _data[_count - 1] = default!; _count--; if (_count < _data.Length / 2 && _next != null) @@ -283,9 +281,9 @@ internal override int BinarySearch(TreeSpan span, T item, IComparer comparer) internal override bool TrimExcess() { bool changedAnything = false; - LeafNode first = this; + LeafNode? first = this; int firstOffset = 0; - LeafNode second = null; + LeafNode? second = null; int secondOffset = 0; while (first != null) { @@ -312,7 +310,7 @@ internal override bool TrimExcess() first._count = firstOffset; for (int i = firstOffset; i < first._data.Length; i++) { - first._data[i] = default; + first._data[i] = default!; } first._next = null; diff --git a/TunnelVisionLabs.Collections.Trees/TreeList`1+Node.cs b/TunnelVisionLabs.Collections.Trees/TreeList`1+Node.cs index 0bed807..98baf9d 100644 --- a/TunnelVisionLabs.Collections.Trees/TreeList`1+Node.cs +++ b/TunnelVisionLabs.Collections.Trees/TreeList`1+Node.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees { using System; @@ -23,17 +21,17 @@ internal abstract int Count get; } - internal abstract LeafNode FirstLeaf + internal abstract LeafNode? FirstLeaf { get; } - internal abstract Node NextNode + internal abstract Node? NextNode { get; } - internal abstract Node FirstChild + internal abstract Node? FirstChild { get; } @@ -51,7 +49,7 @@ internal static Node Insert(Node root, int branchingFactor, int index, T item) if (index > root.Count) throw new ArgumentOutOfRangeException(nameof(index)); - Node splitNode = root.Insert(branchingFactor, index == root.Count, index, item); + Node? splitNode = root.Insert(branchingFactor, index == root.Count, index, item); if (splitNode == null) return root; @@ -79,11 +77,11 @@ internal static Node InsertRange(Node root, int branchingFactor, int index, IEnu if (root == Empty) root = new LeafNode(branchingFactor); - Node splitNode = root.InsertRange(branchingFactor, index == root.Count, index, collection); + Node? splitNode = root.InsertRange(branchingFactor, index == root.Count, index, collection); while (splitNode != null) { // Make a new level, walking nodes on the previous root level from 'node' to 'splitNode' - IndexNode newRoot = new IndexNode(branchingFactor, root, splitNode, out IndexNode newSplitNode); + IndexNode newRoot = new IndexNode(branchingFactor, root, splitNode, out IndexNode? newSplitNode); root = newRoot; splitNode = newSplitNode == newRoot ? null : newSplitNode; } @@ -184,9 +182,9 @@ internal void Reverse(TreeSpan span) internal abstract int LastIndexOf(T item, TreeSpan span); - internal abstract Node Insert(int branchingFactor, bool isAppend, int index, T item); + internal abstract Node? Insert(int branchingFactor, bool isAppend, int index, T item); - internal abstract Node InsertRange(int branchingFactor, bool isAppend, int index, IEnumerable collection); + internal abstract Node? InsertRange(int branchingFactor, bool isAppend, int index, IEnumerable collection); internal abstract bool RemoveLast(); @@ -207,7 +205,7 @@ internal TreeList.Node ConvertAll(Func converter) return ConvertAll(converter, null); } - internal abstract TreeList.Node ConvertAll(Func converter, TreeList.Node convertedNextNode); + internal abstract TreeList.Node ConvertAll(Func converter, TreeList.Node? convertedNextNode); internal abstract bool TrimExcess(); @@ -223,11 +221,11 @@ internal override int Count } } - internal override LeafNode FirstLeaf => null; + internal override LeafNode? FirstLeaf => null; - internal override Node NextNode => null; + internal override Node? NextNode => null; - internal override Node FirstChild => null; + internal override Node? FirstChild => null; [ExcludeFromCodeCoverage] internal override T this[int index] @@ -318,7 +316,7 @@ internal override int BinarySearch(TreeSpan span, T item, IComparer comparer) return ~0; } - internal override TreeList.Node ConvertAll(Func converter, TreeList.Node convertedNextNode) + internal override TreeList.Node ConvertAll(Func converter, TreeList.Node? convertedNextNode) { return TreeList.Node.Empty; } diff --git a/TunnelVisionLabs.Collections.Trees/TreeList`1.cs b/TunnelVisionLabs.Collections.Trees/TreeList`1.cs index 8b48010..c370679 100644 --- a/TunnelVisionLabs.Collections.Trees/TreeList`1.cs +++ b/TunnelVisionLabs.Collections.Trees/TreeList`1.cs @@ -1,14 +1,13 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees { using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; + using System.Diagnostics.CodeAnalysis; using System.Linq; using ICollection = System.Collections.ICollection; using IList = System.Collections.IList; @@ -94,7 +93,7 @@ public T this[int index] } } - object IList.this[int index] + object? IList.this[int index] { get { @@ -113,10 +112,11 @@ object IList.this[int index] try { - this[index] = (T)value; + this[index] = (T)value!; } catch (InvalidCastException) { + Debug.Assert(value is object, $"Assertion failed: {nameof(value)} is object"); throw new ArgumentException($"The value \"{value.GetType()}\" isn't of type \"{typeof(T)}\" and can't be used in this generic collection.", nameof(value)); } } @@ -136,17 +136,18 @@ public void AddRange(IEnumerable collection) _version++; } - int IList.Add(object value) + int IList.Add(object? value) { if (value == null && default(T) != null) throw new ArgumentNullException(nameof(value)); try { - Add((T)value); + Add((T)value!); } catch (InvalidCastException) { + Debug.Assert(value is object, $"Assertion failed: {nameof(value)} is object"); throw new ArgumentException($"The value \"{value.GetType()}\" isn't of type \"{typeof(T)}\" and can't be used in this generic collection.", nameof(value)); } @@ -167,12 +168,12 @@ public bool Contains(T item) return IndexOf(item) >= 0; } - bool IList.Contains(object value) + bool IList.Contains(object? value) { if (value == null) { if (default(T) == null) - return Contains(default); + return Contains(default!); } else if (value is T) { @@ -225,7 +226,7 @@ void ICollection.CopyTo(Array dest, int index) try { int offset = index; - LeafNode leaf = _root.FirstLeaf; + LeafNode? leaf = _root.FirstLeaf; while (leaf != null) { leaf.CopyToArray(dest, offset); @@ -270,12 +271,12 @@ public int IndexOf(T item, int index, int count) return _root.IndexOf(item, new TreeSpan(index, count)); } - int IList.IndexOf(object value) + int IList.IndexOf(object? value) { if (value == null) { if (default(T) == null) - return IndexOf(default); + return IndexOf(default!); } else if (value is T) { @@ -297,7 +298,7 @@ public void InsertRange(int index, IEnumerable collection) _version++; } - void IList.Insert(int index, object value) + void IList.Insert(int index, object? value) { if (value == null && default(T) != null) throw new ArgumentNullException(nameof(value)); @@ -306,10 +307,11 @@ void IList.Insert(int index, object value) try { - Insert(index, (T)value); + Insert(index, (T)value!); } catch (InvalidCastException) { + Debug.Assert(value is object, $"Assertion failed: {nameof(value)} is object"); throw new ArgumentException(string.Format("The value \"{0}\" isn't of type \"{1}\" and can't be used in this generic collection.", value.GetType(), typeof(T)), nameof(value)); } } @@ -326,7 +328,7 @@ public bool Remove(T item) return false; } - void IList.Remove(object value) + void IList.Remove(object? value) { int index = ((IList)this).IndexOf(value); if (index >= 0) @@ -362,12 +364,12 @@ public int BinarySearch(T item) return BinarySearch(0, Count, item, null); } - public int BinarySearch(T item, IComparer comparer) + public int BinarySearch(T item, IComparer? comparer) { return BinarySearch(0, Count, item, comparer); } - public int BinarySearch(int index, int count, T item, IComparer comparer) + public int BinarySearch(int index, int count, T item, IComparer? comparer) { if (index < 0) throw new ArgumentOutOfRangeException(nameof(index)); @@ -390,6 +392,7 @@ public bool Exists(Predicate match) return FindIndex(match) >= 0; } + [return: MaybeNull] public T Find(Predicate match) { if (match == null) @@ -436,6 +439,7 @@ public int FindIndex(int startIndex, int count, Predicate match) return _root.FindIndex(new TreeSpan(startIndex, count), match); } + [return: MaybeNull] public T FindLast(Predicate match) { int index = FindLastIndex(match); @@ -559,12 +563,12 @@ public void Sort() Sort(0, Count, null); } - public void Sort(IComparer comparer) + public void Sort(IComparer? comparer) { Sort(0, Count, comparer); } - public void Sort(int index, int count, IComparer comparer) + public void Sort(int index, int count, IComparer? comparer) { if (index < 0) throw new ArgumentOutOfRangeException(nameof(index)); From b0f7bf678f8afc7a6f063fde65d27f5095540fe0 Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Mon, 20 Jul 2020 10:44:03 -0700 Subject: [PATCH 23/23] Enable nullable reference types for ImmutableTreeList --- .../Immutable/ImmutableTreeListBenchmark.cs | 2 - .../ImmutableTreeListBuilderTest+ForEach.cs | 8 +- .../ImmutableTreeListBuilderTest+GetRange.cs | 2 - .../Immutable/ImmutableTreeListBuilderTest.cs | 72 ++++---- .../Immutable/ImmutableTreeListFactoryTest.cs | 2 - .../ImmutableTreeListTest+ForEach.cs | 8 +- .../ImmutableTreeListTest+GetRange.cs | 2 - .../Immutable/ImmutableTreeListTest.cs | 120 +++++++------- .../Immutable/ImmutableTreeList.cs | 2 - .../Immutable/ImmutableTreeList`1+Builder.cs | 44 ++--- .../ImmutableTreeList`1+Enumerator.cs | 20 +-- .../ImmutableTreeList`1+IndexNode.cs | 109 +++++++----- .../Immutable/ImmutableTreeList`1+LeafNode.cs | 22 ++- .../Immutable/ImmutableTreeList`1+Node.cs | 36 ++-- .../Immutable/ImmutableTreeList`1.cs | 39 ++--- .../PublicAPI.Unshipped.txt | 156 +++++++++--------- 16 files changed, 325 insertions(+), 319 deletions(-) diff --git a/TunnelVisionLabs.Collections.Trees.Benchmarks/Immutable/ImmutableTreeListBenchmark.cs b/TunnelVisionLabs.Collections.Trees.Benchmarks/Immutable/ImmutableTreeListBenchmark.cs index d753d95..306d224 100644 --- a/TunnelVisionLabs.Collections.Trees.Benchmarks/Immutable/ImmutableTreeListBenchmark.cs +++ b/TunnelVisionLabs.Collections.Trees.Benchmarks/Immutable/ImmutableTreeListBenchmark.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Benchmarks.Immutable { using System.Collections.Immutable; diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListBuilderTest+ForEach.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListBuilderTest+ForEach.cs index 03f753f..12582c5 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListBuilderTest+ForEach.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListBuilderTest+ForEach.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; @@ -60,15 +58,15 @@ public void NegTest1() { int[] iArray = { 1, 9, 3, 6, -1, 8, 7, 1, 2, 4 }; var listObject = ImmutableTreeList.Create(iArray).ToBuilder(); - Action action = null; - Assert.Throws(() => listObject.ForEach(action)); + Action? action = null; + Assert.Throws(() => listObject.ForEach(action!)); } public class MyClass { public int Sum { get; set; } = 0; - public string Result + public string? Result { get; set; } diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListBuilderTest+GetRange.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListBuilderTest+GetRange.cs index 5c5f8fe..7a2bab7 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListBuilderTest+GetRange.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListBuilderTest+GetRange.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListBuilderTest.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListBuilderTest.cs index bf3ed07..1c94730 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListBuilderTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListBuilderTest.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; @@ -68,7 +66,7 @@ private static void TestIListInterfaceImpl(IList list, bool supportsNullValues) list.Remove("Text"); Assert.Equal(originalCount, list.Count); - object removedItem = list[0]; + object? removedItem = list[0]; list.Remove(list[0]); Assert.Equal(originalCount - 1, list.Count); Assert.True(list.Contains(removedItem)); @@ -141,7 +139,7 @@ private static void TestICollectionInterfaceImpl(ICollection collection, bool is Assert.Same(collection.SyncRoot, collection.SyncRoot); } - Assert.Throws("array", () => collection.CopyTo(null, 0)); + Assert.Throws("array", () => collection.CopyTo(null!, 0)); Assert.Throws(() => collection.CopyTo(new int[collection.Count, 1], 0)); void CopyToArrayWithNonZeroLowerBound() => collection.CopyTo(Array.CreateInstance(typeof(int), lengths: new[] { collection.Count }, lowerBounds: new[] { 1 }), 0); @@ -224,40 +222,40 @@ private static void TestICollectionTInterfaceImpl(ICollection collection, var copy = new T[collection.Count]; Assert.Throws(() => collection.CopyTo(copy, -1)); - Assert.All(copy, item => Assert.Equal(default, item)); + Assert.All(copy, item => Assert.Equal(default!, item)); Assert.Throws(() => collection.CopyTo(copy, 1)); - Assert.All(copy, item => Assert.Equal(default, item)); + Assert.All(copy, item => Assert.Equal(default!, item)); collection.CopyTo(copy, 0); - Assert.Equal(600, copy[0]); - Assert.Equal(601, copy[1]); + Assert.Equal(600, copy[0]); + Assert.Equal(601, copy[1]); copy = new T[collection.Count + 2]; collection.CopyTo(copy, 1); - Assert.Equal(default, copy[0]); - Assert.Equal(600, copy[1]); - Assert.Equal(601, copy[2]); - Assert.Equal(default, copy[3]); + Assert.Equal(default!, copy[0]); + Assert.Equal(600, copy[1]); + Assert.Equal(601, copy[2]); + Assert.Equal(default!, copy[3]); } else { var copy = new T[collection.Count]; Assert.Throws(() => collection.CopyTo(copy, -1)); - Assert.All(copy, item => Assert.Equal(default, item)); + Assert.All(copy, item => Assert.Equal(default!, item)); Assert.Throws(() => collection.CopyTo(copy, 1)); - Assert.All(copy, item => Assert.Equal(default, item)); + Assert.All(copy, item => Assert.Equal(default!, item)); collection.CopyTo(copy, 0); - Assert.Equal(600, copy[0]); - Assert.Equal(601, copy[1]); + Assert.Equal(600, copy[0]); + Assert.Equal(601, copy[1]); copy = new T[collection.Count + 2]; collection.CopyTo(copy, 1); - Assert.Equal(default, copy[0]); - Assert.Equal(600, copy[1]); - Assert.Equal(601, copy[2]); - Assert.Equal(default, copy[3]); + Assert.Equal(default!, copy[0]); + Assert.Equal(600, copy[1]); + Assert.Equal(601, copy[2]); + Assert.Equal(default!, copy[3]); } } @@ -282,8 +280,8 @@ public void TestIndexer() public void TestCopyToValidation() { ImmutableTreeList.Builder list = ImmutableTreeList.CreateRange(Enumerable.Range(0, 10)).ToBuilder(); - Assert.Throws("array", () => list.CopyTo(null)); - Assert.Throws("array", () => list.CopyTo(0, null, 0, list.Count)); + Assert.Throws("array", () => list.CopyTo(null!)); + Assert.Throws("array", () => list.CopyTo(0, null!, 0, list.Count)); Assert.Throws("index", () => list.CopyTo(-1, new int[list.Count], 0, list.Count)); Assert.Throws("arrayIndex", () => list.CopyTo(0, new int[list.Count], -1, list.Count)); Assert.Throws("count", () => list.CopyTo(0, new int[list.Count], 0, -1)); @@ -343,7 +341,7 @@ public void TestAddRange() ImmutableTreeList.Builder list = ImmutableTreeList.CreateBuilder(); CollectionAssert.EnumeratorInvalidated(list, () => list.AddRange(expected)); - Assert.Throws("collection", () => list.AddRange(null)); + Assert.Throws("collection", () => list.AddRange(null!)); CollectionAssert.EnumeratorNotInvalidated(list, () => list.AddRange(Enumerable.Empty())); Assert.Equal(expected.Length, list.Count); @@ -411,7 +409,7 @@ public void TestInsertRange() ImmutableTreeList.Builder list = ImmutableTreeList.CreateBuilder(); List reference = new List(); - Assert.Throws("collection", () => list.InsertRange(0, null)); + Assert.Throws("collection", () => list.InsertRange(0, null!)); Assert.Throws("index", () => list.InsertRange(-1, Enumerable.Empty())); Assert.Throws(null, () => list.InsertRange(1, Enumerable.Empty())); @@ -591,9 +589,9 @@ public void TestFindIndex() reference.Insert(index, i); } - Assert.Throws(() => list.FindIndex(null)); - Assert.Throws(() => list.FindIndex(0, null)); - Assert.Throws(() => list.FindIndex(0, 0, null)); + Assert.Throws(() => list.FindIndex(null!)); + Assert.Throws(() => list.FindIndex(0, null!)); + Assert.Throws(() => list.FindIndex(0, 0, null!)); Assert.Throws(() => list.FindIndex(-1, i => true)); Assert.Throws(() => list.FindIndex(0, -1, i => true)); @@ -632,9 +630,9 @@ public void TestFindLastIndex() reference.Insert(index, i); } - Assert.Throws(() => list.FindLastIndex(null)); - Assert.Throws(() => list.FindLastIndex(-1, null)); - Assert.Throws(() => list.FindLastIndex(-1, 0, null)); + Assert.Throws(() => list.FindLastIndex(null!)); + Assert.Throws(() => list.FindLastIndex(-1, null!)); + Assert.Throws(() => list.FindLastIndex(-1, 0, null!)); Assert.Throws(() => list.FindLastIndex(list.Count, i => true)); Assert.Throws(() => list.FindLastIndex(list.Count - 1, -1, i => true)); @@ -814,7 +812,7 @@ public void TestSortComparison() reference.Insert(index, item); } - Assert.Throws(() => list.Sort((Comparison)null)); + Assert.Throws(() => list.Sort((Comparison)null!)); Comparison comparison = (x, y) => x - y; list.Sort(comparison); @@ -1073,7 +1071,7 @@ public void TestRemoveValue() public void TestRemoveAll() { var list = ImmutableTreeList.CreateRange(Enumerable.Range(0, 20)).ToBuilder(); - Assert.Throws(() => list.RemoveAll(null)); + Assert.Throws(() => list.RemoveAll(null!)); Assert.Equal(10, list.RemoveAll(i => (i % 2) == 0)); Assert.Equal(new[] { 1, 3, 5, 7, 9, 11, 13, 15, 17, 19 }, list); @@ -1085,7 +1083,7 @@ public void TestRemoveAll() public void TestExists() { var list = ImmutableTreeList.CreateRange(Enumerable.Range(0, 20)).ToBuilder(); - Assert.Throws(() => list.Exists(null)); + Assert.Throws(() => list.Exists(null!)); Assert.False(list.Exists(value => value < 0)); foreach (var i in list) @@ -1100,7 +1098,7 @@ public void TestExists() public void TestFind() { var list = ImmutableTreeList.CreateRange(Enumerable.Range(1, 20)).ToBuilder(); - Assert.Throws(() => list.Find(null)); + Assert.Throws(() => list.Find(null!)); Assert.Equal(0, list.Find(value => value < 0)); foreach (var i in list) @@ -1115,7 +1113,7 @@ public void TestFind() public void TestFindAll() { var list = ImmutableTreeList.CreateRange(Enumerable.Range(0, 20)).ToBuilder(); - Assert.Throws(() => list.FindAll(null)); + Assert.Throws(() => list.FindAll(null!)); ImmutableTreeList found = list.FindAll(i => (i % 2) == 0); @@ -1131,7 +1129,7 @@ public void TestFindLast() { var list = ImmutableTreeList.CreateRange(Enumerable.Range(1, 20)).ToBuilder(); var reference = new List(Enumerable.Range(1, 20)); - Assert.Throws(() => list.FindLast(null)); + Assert.Throws(() => list.FindLast(null!)); Assert.Equal(0, list.FindLast(i => i < 0)); Assert.Equal(0, reference.FindLast(i => i < 0)); @@ -1166,7 +1164,7 @@ public void TestTrueForAll() { var list = ImmutableTreeList.CreateBuilder(); Assert.True(list.TrueForAll(i => false)); - Assert.Throws(() => list.TrueForAll(null)); + Assert.Throws(() => list.TrueForAll(null!)); list.Add(1); Assert.True(list.TrueForAll(i => i > 0)); diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListFactoryTest.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListFactoryTest.cs index 59aca8c..5f59729 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListFactoryTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListFactoryTest.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System.Collections.Generic; diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListTest+ForEach.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListTest+ForEach.cs index 47d6e2c..48f2bab 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListTest+ForEach.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListTest+ForEach.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; @@ -60,15 +58,15 @@ public void NegTest1() { int[] iArray = { 1, 9, 3, 6, -1, 8, 7, 1, 2, 4 }; var listObject = ImmutableTreeList.Create(iArray); - Action action = null; - Assert.Throws(() => listObject.ForEach(action)); + Action? action = null; + Assert.Throws(() => listObject.ForEach(action!)); } public class MyClass { public int Sum { get; set; } = 0; - public string Result + public string? Result { get; set; } diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListTest+GetRange.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListTest+GetRange.cs index 4552376..5ba73bc 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListTest+GetRange.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListTest+GetRange.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; diff --git a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListTest.cs b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListTest.cs index fd32f4a..b6a841d 100644 --- a/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListTest.cs +++ b/TunnelVisionLabs.Collections.Trees.Test/Immutable/ImmutableTreeListTest.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Test.Immutable { using System; @@ -62,7 +60,7 @@ private static void TestIListInterfaceImpl(IList list, bool supportsNullValues) Assert.Throws(() => list.Remove("Text")); Assert.Equal(originalCount, list.Count); - object removedItem = list[0]; + object? removedItem = list[0]; Assert.Throws(() => list.Remove(list[0])); Assert.Equal(originalCount, list.Count); Assert.True(list.Contains(removedItem)); @@ -117,29 +115,29 @@ private static void TestIListTInterfaceImpl(IList list, bool supportsNullV { Assert.True(list.IsReadOnly); - Assert.Equal(600, list[0]); - Assert.Equal(601, list[1]); + Assert.Equal(600, list[0]); + Assert.Equal(601, list[1]); Assert.True(list.Contains((T)(object)600)); - Assert.False(list.Contains(default)); + Assert.False(list.Contains(default!)); Assert.Equal(0, list.IndexOf((T)(object)600)); Assert.Equal(1, list.IndexOf((T)(object)601)); - Assert.Equal(-1, list.IndexOf(default)); + Assert.Equal(-1, list.IndexOf(default!)); Assert.Throws(() => list[-1]); - Assert.Throws(() => list[-1] = default); + Assert.Throws(() => list[-1] = default!); Assert.Throws(() => list[list.Count]); - Assert.Throws(() => list[list.Count] = default); - Assert.Throws(() => list.Insert(-1, default)); - Assert.Throws(() => list.Insert(list.Count + 1, default)); + Assert.Throws(() => list[list.Count] = default!); + Assert.Throws(() => list.Insert(-1, default!)); + Assert.Throws(() => list.Insert(list.Count + 1, default!)); Assert.NotEqual(list[1], list[0]); Assert.Throws(() => list.Insert(0, list[0])); Assert.NotEqual(list[1], list[0]); int originalCount = list.Count; - Assert.Throws(() => list.Remove(default)); + Assert.Throws(() => list.Remove(default!)); Assert.Equal(originalCount, list.Count); Assert.Throws(() => list.RemoveAt(0)); Assert.Equal(originalCount, list.Count); @@ -151,27 +149,27 @@ private static void TestIListTInterfaceImpl(IList list, bool supportsNullV if (supportsNullValues) { - Assert.Throws(() => list.Add(default)); - Assert.NotEqual(default, list[list.Count - 1]); - Assert.False(list.Contains(default)); + Assert.Throws(() => list.Add(default!)); + Assert.NotEqual(default!, list[list.Count - 1]); + Assert.False(list.Contains(default!)); Assert.Equal(list.Count - 1, list.IndexOf((T)(object)601)); - Assert.Throws(() => list[list.Count - 1] = default); + Assert.Throws(() => list[list.Count - 1] = default!); Assert.Equal((T)(object)601, list[list.Count - 1]); - Assert.False(list.Contains(default)); - Assert.Equal(-1, list.IndexOf(default)); + Assert.False(list.Contains(default!)); + Assert.Equal(-1, list.IndexOf(default!)); - Assert.Throws(() => list[list.Count - 1] = default); - Assert.NotEqual(default, list[list.Count - 1]); + Assert.Throws(() => list[list.Count - 1] = default!); + Assert.NotEqual(default!, list[list.Count - 1]); } else { // In the face of two errors, verify consistent behavior - Assert.Throws(() => list[list.Count] = default); - Assert.Throws(() => list.Insert(-1, default)); + Assert.Throws(() => list[list.Count] = default!); + Assert.Throws(() => list.Insert(-1, default!)); - Assert.Throws(() => list.Add(default)); - Assert.Throws(() => list[list.Count - 1] = default); + Assert.Throws(() => list.Add(default!)); + Assert.Throws(() => list[list.Count - 1] = default!); Assert.Throws(() => list.Add(Activator.CreateInstance())); Assert.Throws(() => list[list.Count - 1] = Activator.CreateInstance()); Assert.Throws(() => list.Insert(0, Activator.CreateInstance())); @@ -210,7 +208,7 @@ private static void TestICollectionInterfaceImpl(ICollection collection, bool su Assert.NotNull(collection.SyncRoot); Assert.Same(collection, collection.SyncRoot); - Assert.Throws("array", () => collection.CopyTo(null, 0)); + Assert.Throws("array", () => collection.CopyTo(null!, 0)); Assert.Throws(() => collection.CopyTo(new int[collection.Count, 1], 0)); void CopyToArrayWithNonZeroLowerBound() => collection.CopyTo(Array.CreateInstance(typeof(int), lengths: new[] { collection.Count }, lowerBounds: new[] { 1 }), 0); @@ -293,45 +291,45 @@ private static void TestICollectionTInterfaceImpl(ICollection collection, var copy = new T[collection.Count]; Assert.Throws(() => collection.CopyTo(copy, -1)); - Assert.All(copy, item => Assert.Equal(default, item)); + Assert.All(copy, item => Assert.Equal(default!, item)); Assert.Throws(() => collection.CopyTo(copy, 1)); - Assert.All(copy, item => Assert.Equal(default, item)); + Assert.All(copy, item => Assert.Equal(default!, item)); collection.CopyTo(copy, 0); - Assert.Equal(600, copy[0]); - Assert.Equal(601, copy[1]); + Assert.Equal(600, copy[0]); + Assert.Equal(601, copy[1]); copy = new T[collection.Count + 2]; collection.CopyTo(copy, 1); - Assert.Equal(default, copy[0]); - Assert.Equal(600, copy[1]); - Assert.Equal(601, copy[2]); - Assert.Equal(default, copy[3]); + Assert.Equal(default!, copy[0]); + Assert.Equal(600, copy[1]); + Assert.Equal(601, copy[2]); + Assert.Equal(default!, copy[3]); } else { var copy = new T[collection.Count]; Assert.Throws(() => collection.CopyTo(copy, -1)); - Assert.All(copy, item => Assert.Equal(default, item)); + Assert.All(copy, item => Assert.Equal(default!, item)); Assert.Throws(() => collection.CopyTo(copy, 1)); - Assert.All(copy, item => Assert.Equal(default, item)); + Assert.All(copy, item => Assert.Equal(default!, item)); collection.CopyTo(copy, 0); - Assert.Equal(600, copy[0]); - Assert.Equal(601, copy[1]); + Assert.Equal(600, copy[0]); + Assert.Equal(601, copy[1]); copy = new T[collection.Count + 2]; collection.CopyTo(copy, 1); - Assert.Equal(default, copy[0]); - Assert.Equal(600, copy[1]); - Assert.Equal(601, copy[2]); - Assert.Equal(default, copy[3]); + Assert.Equal(default!, copy[0]); + Assert.Equal(600, copy[1]); + Assert.Equal(601, copy[2]); + Assert.Equal(default!, copy[3]); } Assert.Throws(() => collection.Clear()); - Assert.Throws(() => collection.Add(default)); - Assert.Throws(() => collection.Remove(default)); + Assert.Throws(() => collection.Add(default!)); + Assert.Throws(() => collection.Remove(default!)); } [Fact] @@ -364,8 +362,8 @@ public void TestIndexer() public void TestCopyToValidation() { ImmutableTreeList list = ImmutableTreeList.CreateRange(Enumerable.Range(0, 10)); - Assert.Throws("array", () => list.CopyTo(null)); - Assert.Throws("array", () => list.CopyTo(0, null, 0, list.Count)); + Assert.Throws("array", () => list.CopyTo(null!)); + Assert.Throws("array", () => list.CopyTo(0, null!, 0, list.Count)); Assert.Throws("index", () => list.CopyTo(-1, new int[list.Count], 0, list.Count)); Assert.Throws("arrayIndex", () => list.CopyTo(0, new int[list.Count], -1, list.Count)); Assert.Throws("count", () => list.CopyTo(0, new int[list.Count], 0, -1)); @@ -440,7 +438,7 @@ public void TestAddRange() ImmutableTreeList list = ImmutableTreeList.Create(); CollectionAssert.EnumeratorNotInvalidated(list, () => list = list.AddRange(expected)); - Assert.Throws("collection", () => list.AddRange(null)); + Assert.Throws("collection", () => list.AddRange(null!)); CollectionAssert.EnumeratorNotInvalidated(list, () => list.AddRange(Enumerable.Empty())); Assert.Equal(expected.Length, list.Count); @@ -550,7 +548,7 @@ public void TestInsertRange() ImmutableTreeList list = ImmutableTreeList.Create(); List reference = new List(); - Assert.Throws("collection", () => list.InsertRange(0, null)); + Assert.Throws("collection", () => list.InsertRange(0, null!)); Assert.Throws("index", () => list.InsertRange(-1, Enumerable.Empty())); Assert.Throws(null, () => list.InsertRange(1, Enumerable.Empty())); @@ -768,9 +766,9 @@ public void TestFindIndex() reference.Insert(index, i); } - Assert.Throws(() => list.FindIndex(null)); - Assert.Throws(() => list.FindIndex(0, null)); - Assert.Throws(() => list.FindIndex(0, 0, null)); + Assert.Throws(() => list.FindIndex(null!)); + Assert.Throws(() => list.FindIndex(0, null!)); + Assert.Throws(() => list.FindIndex(0, 0, null!)); Assert.Throws(() => list.FindIndex(-1, i => true)); Assert.Throws(() => list.FindIndex(0, -1, i => true)); @@ -809,9 +807,9 @@ public void TestFindLastIndex() reference.Insert(index, i); } - Assert.Throws(() => list.FindLastIndex(null)); - Assert.Throws(() => list.FindLastIndex(-1, null)); - Assert.Throws(() => list.FindLastIndex(-1, 0, null)); + Assert.Throws(() => list.FindLastIndex(null!)); + Assert.Throws(() => list.FindLastIndex(-1, null!)); + Assert.Throws(() => list.FindLastIndex(-1, 0, null!)); Assert.Throws(() => list.FindLastIndex(list.Count, i => true)); Assert.Throws(() => list.FindLastIndex(list.Count - 1, -1, i => true)); @@ -997,7 +995,7 @@ public void TestSortComparison() reference.Insert(index, item); } - Assert.Throws(() => list.Sort((Comparison)null)); + Assert.Throws(() => list.Sort((Comparison)null!)); Comparison comparison = (x, y) => x - y; list = list.Sort(comparison); @@ -1077,7 +1075,7 @@ public void TestRemoveRangeItems() Assert.IsType>(prunedViaInterface); Assert.Equal(referencePruned, prunedViaInterface); - Assert.Throws("items", () => list.RemoveRange(items: null)); + Assert.Throws("items", () => list.RemoveRange(items: null!)); } [Fact] @@ -1365,7 +1363,7 @@ private void TestReplaceValueImpl(IImmutableList list) public void TestRemoveAll() { var list = ImmutableTreeList.CreateRange(Enumerable.Range(0, 20)); - Assert.Throws(() => list.RemoveAll(null)); + Assert.Throws(() => list.RemoveAll(null!)); Assert.Equal(10, list.Count - list.RemoveAll(i => (i % 2) == 0).Count); Assert.Equal(Enumerable.Range(0, 20), list); @@ -1383,7 +1381,7 @@ public void TestRemoveAll() public void TestExists() { var list = ImmutableTreeList.CreateRange(Enumerable.Range(0, 20)); - Assert.Throws(() => list.Exists(null)); + Assert.Throws(() => list.Exists(null!)); Assert.False(list.Exists(value => value < 0)); foreach (var i in list) @@ -1398,7 +1396,7 @@ public void TestExists() public void TestFind() { var list = ImmutableTreeList.CreateRange(Enumerable.Range(1, 20)); - Assert.Throws(() => list.Find(null)); + Assert.Throws(() => list.Find(null!)); Assert.Equal(0, list.Find(value => value < 0)); foreach (var i in list) @@ -1413,7 +1411,7 @@ public void TestFind() public void TestFindAll() { var list = ImmutableTreeList.CreateRange(Enumerable.Range(0, 20)); - Assert.Throws(() => list.FindAll(null)); + Assert.Throws(() => list.FindAll(null!)); ImmutableTreeList found = list.FindAll(i => (i % 2) == 0); @@ -1429,7 +1427,7 @@ public void TestFindLast() { var list = ImmutableTreeList.CreateRange(Enumerable.Range(1, 20)); var reference = new List(Enumerable.Range(1, 20)); - Assert.Throws(() => list.FindLast(null)); + Assert.Throws(() => list.FindLast(null!)); Assert.Equal(0, list.FindLast(i => i < 0)); Assert.Equal(0, reference.FindLast(i => i < 0)); @@ -1446,7 +1444,7 @@ public void TestTrueForAll() { var list = ImmutableTreeList.Create(); Assert.True(list.TrueForAll(i => false)); - Assert.Throws(() => list.TrueForAll(null)); + Assert.Throws(() => list.TrueForAll(null!)); list = list.Add(1); Assert.True(list.TrueForAll(i => i > 0)); diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList.cs index 80703b4..8dc2da5 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System.Collections.Generic; diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+Builder.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+Builder.cs index d3d2be6..c93a062 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+Builder.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+Builder.cs @@ -1,14 +1,13 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; + using System.Diagnostics.CodeAnalysis; using System.Linq; public partial class ImmutableTreeList @@ -63,7 +62,7 @@ public T this[int index] } } - object IList.this[int index] + object? IList.this[int index] { get { @@ -82,10 +81,11 @@ object IList.this[int index] try { - this[index] = (T)value; + this[index] = (T)value!; } catch (InvalidCastException) { + Debug.Assert(value is object, $"Assertion failed: {nameof(value)} is object"); throw new ArgumentException($"The value \"{value.GetType()}\" isn't of type \"{typeof(T)}\" and can't be used in this generic collection.", nameof(value)); } } @@ -107,9 +107,9 @@ public void AddRange(IEnumerable items) public int BinarySearch(T item) => BinarySearch(0, Count, item, comparer: null); - public int BinarySearch(T item, IComparer comparer) => BinarySearch(0, Count, item, comparer); + public int BinarySearch(T item, IComparer? comparer) => BinarySearch(0, Count, item, comparer); - public int BinarySearch(int index, int count, T item, IComparer comparer) + public int BinarySearch(int index, int count, T item, IComparer? comparer) { if (index < 0) throw new ArgumentOutOfRangeException(nameof(index)); @@ -166,6 +166,7 @@ public void CopyTo(int index, T[] array, int arrayIndex, int count) public bool Exists(Predicate match) => FindIndex(match) >= 0; + [return: MaybeNull] public T Find(Predicate match) { if (match == null) @@ -206,6 +207,7 @@ public int FindIndex(int startIndex, int count, Predicate match) return _root.FindIndex(new TreeSpan(startIndex, count), match); } + [return: MaybeNull] public T FindLast(Predicate match) { int index = FindLastIndex(match); @@ -262,7 +264,7 @@ public void ForEach(Action action) public int IndexOf(T item, int index, int count) => IndexOf(item, index, count, equalityComparer: null); - public int IndexOf(T item, int index, int count, IEqualityComparer equalityComparer) + public int IndexOf(T item, int index, int count, IEqualityComparer? equalityComparer) { if (index < 0) throw new ArgumentOutOfRangeException(nameof(index)); @@ -292,7 +294,7 @@ public void InsertRange(int index, IEnumerable items) public int LastIndexOf(T item, int startIndex, int count) => LastIndexOf(item, startIndex, count, equalityComparer: null); - public int LastIndexOf(T item, int startIndex, int count, IEqualityComparer equalityComparer) + public int LastIndexOf(T item, int startIndex, int count, IEqualityComparer? equalityComparer) { if (Count == 0) { @@ -370,7 +372,7 @@ public void Reverse(int index, int count) public void Sort() => Sort(0, Count, comparer: null); - public void Sort(IComparer comparer) => Sort(0, Count, comparer); + public void Sort(IComparer? comparer) => Sort(0, Count, comparer); public void Sort(Comparison comparison) { @@ -380,7 +382,7 @@ public void Sort(Comparison comparison) Sort(0, Count, new ComparisonComparer(comparison)); } - public void Sort(int index, int count, IComparer comparer) + public void Sort(int index, int count, IComparer? comparer) { if (index < 0) throw new ArgumentOutOfRangeException(nameof(index)); @@ -422,29 +424,30 @@ public bool TrueForAll(Predicate match) IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); - int IList.Add(object value) + int IList.Add(object? value) { if (value == null && default(T) != null) throw new ArgumentNullException(nameof(value)); try { - Add((T)value); + Add((T)value!); } catch (InvalidCastException) { + Debug.Assert(value is object, $"Assertion failed: {nameof(value)} is object"); throw new ArgumentException($"The value \"{value.GetType()}\" isn't of type \"{typeof(T)}\" and can't be used in this generic collection.", nameof(value)); } return Count - 1; } - bool IList.Contains(object value) + bool IList.Contains(object? value) { if (value == null) { if (default(T) == null) - return Contains(default); + return Contains(default!); } else if (value is T) { @@ -454,12 +457,12 @@ bool IList.Contains(object value) return false; } - int IList.IndexOf(object value) + int IList.IndexOf(object? value) { if (value == null) { if (default(T) == null) - return IndexOf(default); + return IndexOf(default!); } else if (value is T) { @@ -469,7 +472,7 @@ int IList.IndexOf(object value) return -1; } - void IList.Insert(int index, object value) + void IList.Insert(int index, object? value) { if (value == null && default(T) != null) throw new ArgumentNullException(nameof(value)); @@ -478,15 +481,16 @@ void IList.Insert(int index, object value) try { - Insert(index, (T)value); + Insert(index, (T)value!); } catch (InvalidCastException) { + Debug.Assert(value is object, $"Assertion failed: {nameof(value)} is object"); throw new ArgumentException(string.Format("The value \"{0}\" isn't of type \"{1}\" and can't be used in this generic collection.", value.GetType(), typeof(T)), nameof(value)); } } - void IList.Remove(object value) + void IList.Remove(object? value) { int index = ((IList)this).IndexOf(value); if (index >= 0) @@ -507,7 +511,7 @@ void ICollection.CopyTo(Array array, int index) throw new ArgumentOutOfRangeException("Not enough space is available in the destination array.", nameof(index)); int offset = index; - LeafNode leaf = _root.FirstLeaf; + LeafNode? leaf = _root.FirstLeaf; while (leaf != null) { leaf.CopyToArray(array, offset); diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+Enumerator.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+Enumerator.cs index ea264bf..4087848 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+Enumerator.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+Enumerator.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; @@ -16,11 +14,11 @@ public struct Enumerator : IEnumerator private readonly Node _root; private readonly TreeSpan _span; - private readonly Builder _builder; + private readonly Builder? _builder; private readonly int _version; private int _index; - private LeafNode _leafNode; + private LeafNode? _leafNode; private int _leafIndex; private T _current; @@ -29,12 +27,12 @@ internal Enumerator(ImmutableTreeList list) { } - internal Enumerator(ImmutableTreeList list, Builder builder) + internal Enumerator(ImmutableTreeList list, Builder? builder) : this(list, list._root.Span, builder) { } - internal Enumerator(ImmutableTreeList list, TreeSpan span, Builder builder) + internal Enumerator(ImmutableTreeList list, TreeSpan span, Builder? builder) { _root = list._root; _span = span; @@ -43,12 +41,12 @@ internal Enumerator(ImmutableTreeList list, TreeSpan span, Builder builder) _index = -1; _leafNode = null; _leafIndex = -1; - _current = default; + _current = default!; } public T Current => _current; - object IEnumerator.Current => Current; + object? IEnumerator.Current => Current; public void Dispose() { @@ -80,7 +78,7 @@ public bool MoveNext() _index = _span.Start - 1; _leafIndex--; } - else if (_leafIndex == _leafNode.Count - 1) + else if (_leafIndex == _leafNode!.Count - 1) { if (_index == _root.Count - 1) { @@ -105,7 +103,7 @@ public bool MoveNext() } _leafIndex++; - _current = _leafNode[_leafIndex]; + _current = _leafNode![_leafIndex]; return true; } @@ -117,7 +115,7 @@ public void Reset() _leafNode = null; _index = -1; _leafIndex = -1; - _current = default; + _current = default!; } } } diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+IndexNode.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+IndexNode.cs index d2e6ca7..d2fc432 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+IndexNode.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+IndexNode.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; @@ -40,7 +38,7 @@ internal IndexNode(Node child1, Node child2) _count = child1.Count + child2.Count; } - internal IndexNode(ImmutableTreeList.Node children, out ImmutableTreeList.Node lastNode) + internal IndexNode(ImmutableTreeList.Node children, out ImmutableTreeList.Node? lastNode) { if (children.Count > _offsets.Length) { @@ -73,7 +71,15 @@ internal IndexNode(ImmutableTreeList.Node children, out ImmutableTreeList< internal int NodeCount => _nodeCount; - internal override LeafNode FirstLeaf => _nodes[0].FirstLeaf; + internal override LeafNode FirstLeaf + { + get + { + LeafNode? firstLeaf = _nodes[0].FirstLeaf; + Debug.Assert(firstLeaf is object, $"Assertion failed: {nameof(firstLeaf)} is object"); + return firstLeaf; + } + } internal override Node FirstChild => _nodes[0]; @@ -174,13 +180,13 @@ internal override int LastIndexOf(T item, TreeSpan span, IEqualityComparer eq return -1; } - internal override (Node currentNode, Node splitNode) Insert(bool isAppend, int index, T item) + internal override (Node currentNode, Node? splitNode) Insert(bool isAppend, int index, T item) { if (IsFrozen) return AsMutable().Insert(isAppend, index, item); int pageIndex = FindLowerBound(_offsets, _nodeCount, index); - (Node currentChild, Node splitChild) = _nodes[pageIndex].Insert(isAppend, index - _offsets[pageIndex], item); + (Node currentChild, Node? splitChild) = _nodes[pageIndex].Insert(isAppend, index - _offsets[pageIndex], item); _nodes[pageIndex] = currentChild; if (splitChild == null) { @@ -243,7 +249,7 @@ internal override ImmutableTreeList.Node InsertRange(bool isAppend, int in Debug.Assert(pageIndex >= 0 && pageIndex <= insertionNode._nodes.Length, "Assertion failed: pageIndex >= 0 && pageIndex <= insertionNode._nodes.Length"); Debug.Assert(!insertionNode.IsFrozen, $"Assertion failed: !{nameof(insertionNode)}.IsFrozen"); - (_, Node newLastIndex) = insertionNode.InsertIndex(isAppend, pageIndex, item); + (_, Node? newLastIndex) = insertionNode.InsertIndex(isAppend, pageIndex, item); if (newLastIndex != null) { // this insertion resulted in a split, so at minimum 'pageIndex' must be updated @@ -299,7 +305,7 @@ internal override Node RemoveLast() { result._nodeCount--; result._offsets[result._nodeCount] = default; - result._nodes[result._nodeCount] = default; + result._nodes[result._nodeCount] = null!; } else { @@ -310,15 +316,15 @@ internal override Node RemoveLast() return result; } - internal override (Node currentNode, Node nextNode) RemoveAt(int index, Node nextNode) + internal override (Node currentNode, Node? nextNode) RemoveAt(int index, Node? nextNode) { if (IsFrozen) return AsMutable().RemoveAt(index, nextNode); int pageIndex = FindLowerBound(_offsets, _nodeCount, index); - Node originalNextChild = pageIndex < _nodeCount - 1 ? _nodes[pageIndex + 1] : nextNode?.FirstChild; + Node? originalNextChild = pageIndex < _nodeCount - 1 ? _nodes[pageIndex + 1] : nextNode?.FirstChild; int? originalNextChildCount = originalNextChild?.Count; - (Node modifiedChild, Node modifiedNextChild) = _nodes[pageIndex].RemoveAt(index - _offsets[pageIndex], originalNextChild); + (Node modifiedChild, Node? modifiedNextChild) = _nodes[pageIndex].RemoveAt(index - _offsets[pageIndex], originalNextChild); _nodes[pageIndex] = modifiedChild; if (modifiedNextChild == originalNextChild && modifiedNextChild?.Count == originalNextChildCount) { @@ -329,11 +335,13 @@ internal override (Node currentNode, Node nextNode) RemoveAt(int index, Node nex return (this, nextNode); } - IndexNode nextIndex = (IndexNode)nextNode; + IndexNode? nextIndex = (IndexNode?)nextNode; bool removedChild = modifiedNextChild == null; if (!removedChild) { + Debug.Assert(modifiedNextChild is object, $"Assertion failed: {nameof(modifiedNextChild)} is object"); + bool affectedNextPage; if (pageIndex < _nodeCount - 1) { @@ -342,6 +350,10 @@ internal override (Node currentNode, Node nextNode) RemoveAt(int index, Node nex } else { + // nextIndex cannot be null if (pageIndex == _nodeCount - 1), because there is no way we needed + // to rebalance the children nodes for that case. This method would have already returned above. + Debug.Assert(nextIndex is object, $"Assertion failed: {nameof(nextIndex)} is object"); + affectedNextPage = true; nextIndex = nextIndex.AsMutable(); nextIndex._nodes[0] = modifiedNextChild; @@ -360,6 +372,8 @@ internal override (Node currentNode, Node nextNode) RemoveAt(int index, Node nex if (affectedNextPage) { + Debug.Assert(nextIndex is object, $"Per the explanation above, {nameof(nextIndex)} cannot be null when {nameof(affectedNextPage)} is true."); + for (int i = 1; i < nextIndex._nodeCount; i++) { nextIndex._offsets[i] = nextIndex._offsets[i - 1] + nextIndex._nodes[i - 1].Count; @@ -375,6 +389,10 @@ internal override (Node currentNode, Node nextNode) RemoveAt(int index, Node nex bool removedFromNextPage = pageIndex == _nodeCount - 1; if (removedFromNextPage) { + // nextIndex cannot be null if (pageIndex == _nodeCount - 1), because there is no way we needed + // to rebalance the children nodes for that case. This method would have already returned above. + Debug.Assert(nextIndex is object, $"Assertion failed: {nameof(nextIndex)} is object"); + if (nextIndex._nodeCount == 1) { // Removed the only child of the next page @@ -390,7 +408,7 @@ internal override (Node currentNode, Node nextNode) RemoveAt(int index, Node nex nextIndex._nodes[0] = _nodes[_nodeCount - 1]; _count = _offsets[_nodeCount - 1]; _offsets[_nodeCount - 1] = 0; - _nodes[_nodeCount - 1] = null; + _nodes[_nodeCount - 1] = null!; _nodeCount--; for (int i = 1; i < nextIndex._nodeCount; i++) { @@ -408,7 +426,7 @@ internal override (Node currentNode, Node nextNode) RemoveAt(int index, Node nex } _offsets[_nodeCount - 1] = 0; - _nodes[_nodeCount - 1] = default; + _nodes[_nodeCount - 1] = null!; _nodeCount--; _count = _offsets[_nodeCount - 1] + _nodes[_nodeCount - 1].Count; } @@ -624,7 +642,7 @@ internal override int BinarySearch(TreeSpan span, T item, IComparer comparer) int page = lowPage + ((highPage - lowPage + 1) >> 1); Debug.Assert(page > firstPage, $"Assertion failed: {nameof(page)} > {nameof(firstPage)}"); - T value = _nodes[page].FirstLeaf[0]; + T value = _nodes[page].FirstLeaf![0]; int c; try @@ -665,11 +683,11 @@ internal override int BinarySearch(TreeSpan span, T item, IComparer comparer) } } - internal override ImmutableTreeList.Node ConvertAll(Func converter, ImmutableTreeList.Node convertedNextNode) + internal override ImmutableTreeList.Node ConvertAll(Func converter, ImmutableTreeList.Node? convertedNextNode) { var result = new ImmutableTreeList.IndexNode(); - ImmutableTreeList.Node convertedNextChild = convertedNextNode?.FirstChild; + ImmutableTreeList.Node? convertedNextChild = convertedNextNode?.FirstChild; for (int i = _nodeCount - 1; i >= 0; i--) { convertedNextChild = _nodes[i].ConvertAll(converter, convertedNextChild); @@ -682,14 +700,14 @@ internal override ImmutableTreeList.Node ConvertAll(Func= 2, $"Assertion failed: {nameof(_nodes.Length)} >= 2"); Debug.Assert(_offsets.Length == _nodes.Length, $"Assertion failed: {nameof(_offsets)}.Length == {nameof(_nodes)}.Length"); diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+LeafNode.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+LeafNode.cs index ce6b75b..1f41e74 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+LeafNode.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+LeafNode.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; @@ -31,7 +29,7 @@ private LeafNode(LeafNode node) internal override LeafNode FirstLeaf => this; - internal override Node FirstChild => null; + internal override Node? FirstChild => null; internal override bool IsFrozen => _frozen; @@ -81,7 +79,7 @@ internal override int LastIndexOf(T item, TreeSpan span, IEqualityComparer eq return _data.LastIndexOf(item, span.EndInclusive, span.Count, equalityComparer); } - internal override ImmutableTreeList.Node ConvertAll(Func converter, ImmutableTreeList.Node convertedNextNode) + internal override ImmutableTreeList.Node ConvertAll(Func converter, ImmutableTreeList.Node? convertedNextNode) { var result = new ImmutableTreeList.LeafNode(); @@ -94,7 +92,7 @@ internal override ImmutableTreeList.Node ConvertAll(Func.Node InsertRange(bool isAppend, int in { Debug.Assert(index >= 0 && index <= ((LeafNode)insertionNode)._data.Length, "Assertion failed: index >= 0 && index <= ((LeafNode)insertionNode)._data.Length"); - (_, Node newLastLeaf) = insertionNode.Insert(isAppend, index, item); + (_, Node? newLastLeaf) = insertionNode.Insert(isAppend, index, item); if (newLastLeaf != null) { // this insertion resulted in a split, so at minimum 'index' must be updated @@ -227,11 +225,11 @@ internal override Node RemoveLast() LeafNode result = AsMutable(); result._count--; - result._data[result._count] = default; + result._data[result._count] = default!; return result; } - internal override (Node currentNode, Node nextNode) RemoveAt(int index, Node nextNode) + internal override (Node currentNode, Node? nextNode) RemoveAt(int index, Node? nextNode) { if (IsFrozen) return AsMutable().RemoveAt(index, nextNode); @@ -241,7 +239,7 @@ internal override (Node currentNode, Node nextNode) RemoveAt(int index, Node nex _data[i] = _data[i + 1]; } - _data[_count - 1] = default; + _data[_count - 1] = default!; _count--; if (_count < _data.Length / 2 && nextNode != null) @@ -305,7 +303,7 @@ internal override int BinarySearch(TreeSpan span, T item, IComparer comparer) return _data.BinarySearch(span.Start, span.Count, item, comparer); } - internal override (Node currentNode, Node nextNode) TrimExcessImpl(Node nextNode) + internal override (Node currentNode, Node? nextNode) TrimExcessImpl(Node? nextNode) { if (_count == _data.Length || nextNode == null) return (this, nextNode); @@ -313,7 +311,7 @@ internal override (Node currentNode, Node nextNode) TrimExcessImpl(Node nextNode if (IsFrozen) return AsMutable().TrimExcessImpl(nextNode); - LeafNode nextLeaf = ((LeafNode)nextNode).AsMutable(); + LeafNode? nextLeaf = ((LeafNode)nextNode).AsMutable(); int elementsToMove = Math.Min(_data.Length - _count, nextNode.Count); nextLeaf._data.Copy(0, ref _data, _count, elementsToMove); _count += elementsToMove; @@ -332,7 +330,7 @@ internal override (Node currentNode, Node nextNode) TrimExcessImpl(Node nextNode return (this, nextLeaf); } - internal override void Validate(ValidationRules rules, Node nextNode) + internal override void Validate(ValidationRules rules, Node? nextNode) { Debug.Assert(_data.Length >= 2, $"Assertion failed: {nameof(_data.Length)} >= 2"); Debug.Assert(_count >= 0 && _count <= _data.Length, $"Assertion failed: {nameof(_count)} >= 0 && {nameof(_count)} <= {nameof(_data)}.Length"); diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+Node.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+Node.cs index b6d8bd9..d16124c 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+Node.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1+Node.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; @@ -23,12 +21,12 @@ internal abstract int Count get; } - internal abstract LeafNode FirstLeaf + internal abstract LeafNode? FirstLeaf { get; } - internal abstract Node FirstChild + internal abstract Node? FirstChild { get; } @@ -54,7 +52,7 @@ internal static Node Insert(Node root, int index, T item) if (index > root.Count) throw new ArgumentOutOfRangeException(nameof(index)); - (Node newRoot, Node splitNode) = root.Insert(index == root.Count, index, item); + (Node newRoot, Node? splitNode) = root.Insert(index == root.Count, index, item); if (splitNode == null) return newRoot; @@ -77,7 +75,7 @@ internal static Node InsertRange(Node root, int index, IEnumerable collection if (root == Empty) root = new LeafNode(); - ImmutableTreeList.Node splitNode = root.InsertRange(index == root.Count, index, collection); + ImmutableTreeList.Node? splitNode = root.InsertRange(index == root.Count, index, collection); while (splitNode != null) { if (splitNode.Count == 1) @@ -163,7 +161,7 @@ internal static Node RemoveAll(Node root, Predicate match) internal static Node TrimExcess(Node root) { - (Node newRoot, Node mustBeNull) = root.TrimExcessImpl(null); + (Node newRoot, Node? mustBeNull) = root.TrimExcessImpl(null); Debug.Assert(mustBeNull == null, $"Assertion failed: {nameof(mustBeNull)} == null"); while (newRoot.FirstChild != null && ((IndexNode)newRoot).NodeCount == 1) { @@ -196,13 +194,13 @@ internal Node Reverse(TreeSpan span) internal abstract int LastIndexOf(T item, TreeSpan span, IEqualityComparer equalityComparer); - internal abstract (Node currentNode, Node splitNode) Insert(bool isAppend, int index, T item); + internal abstract (Node currentNode, Node? splitNode) Insert(bool isAppend, int index, T item); internal abstract ImmutableTreeList.Node InsertRange(bool isAppend, int index, IEnumerable collection); internal abstract Node RemoveLast(); - internal abstract (Node currentNode, Node nextNode) RemoveAt(int index, Node nextNode); + internal abstract (Node currentNode, Node? nextNode) RemoveAt(int index, Node? nextNode); internal abstract Node Sort(TreeSpan span, IComparer comparer); @@ -217,19 +215,19 @@ internal ImmutableTreeList.Node ConvertAll(Func co return ConvertAll(converter, null); } - internal abstract ImmutableTreeList.Node ConvertAll(Func converter, ImmutableTreeList.Node convertedNextNode); + internal abstract ImmutableTreeList.Node ConvertAll(Func converter, ImmutableTreeList.Node? convertedNextNode); - internal abstract (Node currentNode, Node nextNode) TrimExcessImpl(Node nextNode); + internal abstract (Node currentNode, Node? nextNode) TrimExcessImpl(Node? nextNode); - internal abstract void Validate(ValidationRules rules, Node nextNode); + internal abstract void Validate(ValidationRules rules, Node? nextNode); private sealed class EmptyNode : Node { internal override int Count => 0; - internal override LeafNode FirstLeaf => null; + internal override LeafNode? FirstLeaf => null; - internal override Node FirstChild => null; + internal override Node? FirstChild => null; internal override bool IsFrozen => true; @@ -271,7 +269,7 @@ internal override int LastIndexOf(T item, TreeSpan span, IEqualityComparer eq throw ExceptionUtilities.Unreachable; } - internal override (Node currentNode, Node splitNode) Insert(bool isAppend, int index, T item) + internal override (Node currentNode, Node? splitNode) Insert(bool isAppend, int index, T item) { Debug.Assert(index == 0 && isAppend, "index == 0 && isAppend"); return new LeafNode().Insert(isAppend, index, item); @@ -290,7 +288,7 @@ internal override Node RemoveLast() } [ExcludeFromCodeCoverage] - internal override (Node currentNode, Node nextNode) RemoveAt(int index, Node nextNode) + internal override (Node currentNode, Node? nextNode) RemoveAt(int index, Node? nextNode) { throw ExceptionUtilities.Unreachable; } @@ -327,19 +325,19 @@ internal override int BinarySearch(TreeSpan span, T item, IComparer comparer) return ~0; } - internal override ImmutableTreeList.Node ConvertAll(Func converter, ImmutableTreeList.Node convertedNextNode) + internal override ImmutableTreeList.Node ConvertAll(Func converter, ImmutableTreeList.Node? convertedNextNode) { return ImmutableTreeList.Node.Empty; } - internal override (Node currentNode, Node nextNode) TrimExcessImpl(Node nextNode) + internal override (Node currentNode, Node? nextNode) TrimExcessImpl(Node? nextNode) { Debug.Assert(nextNode == null, $"Assertion failed: {nameof(nextNode)} == null"); return (this, null); } - internal override void Validate(ValidationRules rules, Node nextNode) + internal override void Validate(ValidationRules rules, Node? nextNode) { Debug.Assert(this == Empty, $"Assertion failed: this == {nameof(Empty)}"); Debug.Assert(nextNode == null, $"Assertion failed: {nameof(nextNode)} == null"); diff --git a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1.cs b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1.cs index e2dcdfe..52c5119 100644 --- a/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1.cs +++ b/TunnelVisionLabs.Collections.Trees/Immutable/ImmutableTreeList`1.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace TunnelVisionLabs.Collections.Trees.Immutable { using System; @@ -10,6 +8,7 @@ namespace TunnelVisionLabs.Collections.Trees.Immutable using System.Collections.Generic; using System.Collections.Immutable; using System.Diagnostics; + using System.Diagnostics.CodeAnalysis; using System.Linq; public sealed partial class ImmutableTreeList : IImmutableList, IReadOnlyList, IList, IList @@ -57,7 +56,7 @@ T IList.this[int index] set => throw new NotSupportedException(); } - object IList.this[int index] + object? IList.this[int index] { get => this[index]; set => throw new NotSupportedException(); @@ -82,9 +81,9 @@ public ImmutableTreeList AddRange(IEnumerable items) public int BinarySearch(T item) => BinarySearch(0, Count, item, comparer: null); - public int BinarySearch(T item, IComparer comparer) => BinarySearch(0, Count, item, comparer); + public int BinarySearch(T item, IComparer? comparer) => BinarySearch(0, Count, item, comparer); - public int BinarySearch(int index, int count, T item, IComparer comparer) + public int BinarySearch(int index, int count, T item, IComparer? comparer) { if (index < 0) throw new ArgumentOutOfRangeException(nameof(index)); @@ -134,6 +133,7 @@ public void CopyTo(int index, T[] array, int arrayIndex, int count) public bool Exists(Predicate match) => FindIndex(match) >= 0; + [return: MaybeNull] public T Find(Predicate match) { if (match == null) @@ -174,6 +174,7 @@ public int FindIndex(int startIndex, int count, Predicate match) return _root.FindIndex(new TreeSpan(startIndex, count), match); } + [return: MaybeNull] public T FindLast(Predicate match) { int index = FindLastIndex(match); @@ -237,7 +238,7 @@ public ImmutableTreeList GetRange(int index, int count) public int IndexOf(T value) => IndexOf(value, 0, Count, equalityComparer: null); - public int IndexOf(T item, int index, int count, IEqualityComparer equalityComparer) + public int IndexOf(T item, int index, int count, IEqualityComparer? equalityComparer) { if (index < 0) throw new ArgumentOutOfRangeException(nameof(index)); @@ -266,7 +267,7 @@ public ImmutableTreeList InsertRange(int index, IEnumerable items) return new ImmutableTreeList(root); } - public int LastIndexOf(T item, int index, int count, IEqualityComparer equalityComparer) + public int LastIndexOf(T item, int index, int count, IEqualityComparer? equalityComparer) { if (Count == 0) { @@ -291,7 +292,7 @@ public int LastIndexOf(T item, int index, int count, IEqualityComparer equali public ImmutableTreeList Remove(T value) => Remove(value, equalityComparer: null); - public ImmutableTreeList Remove(T value, IEqualityComparer equalityComparer) + public ImmutableTreeList Remove(T value, IEqualityComparer? equalityComparer) { int index = IndexOf(value, 0, Count, equalityComparer); if (index >= 0) @@ -322,7 +323,7 @@ public ImmutableTreeList RemoveAt(int index) public ImmutableTreeList RemoveRange(IEnumerable items) => RemoveRange(items, equalityComparer: null); - public ImmutableTreeList RemoveRange(IEnumerable items, IEqualityComparer equalityComparer) + public ImmutableTreeList RemoveRange(IEnumerable items, IEqualityComparer? equalityComparer) { if (items is null) throw new ArgumentNullException(nameof(items)); @@ -348,7 +349,7 @@ public ImmutableTreeList RemoveRange(int index, int count) public ImmutableTreeList Replace(T oldValue, T newValue) => Replace(oldValue, newValue, equalityComparer: null); - public ImmutableTreeList Replace(T oldValue, T newValue, IEqualityComparer equalityComparer) + public ImmutableTreeList Replace(T oldValue, T newValue, IEqualityComparer? equalityComparer) { int index = IndexOf(oldValue, 0, Count, equalityComparer); if (index < 0) @@ -395,7 +396,7 @@ public ImmutableTreeList SetItem(int index, T value) public ImmutableTreeList Sort() => Sort(0, Count, comparer: null); - public ImmutableTreeList Sort(IComparer comparer) => Sort(0, Count, comparer); + public ImmutableTreeList Sort(IComparer? comparer) => Sort(0, Count, comparer); public ImmutableTreeList Sort(Comparison comparison) { @@ -405,7 +406,7 @@ public ImmutableTreeList Sort(Comparison comparison) return Sort(0, Count, new ComparisonComparer(comparison)); } - public ImmutableTreeList Sort(int index, int count, IComparer comparer) + public ImmutableTreeList Sort(int index, int count, IComparer? comparer) { if (index < 0) throw new ArgumentOutOfRangeException(nameof(index)); @@ -476,16 +477,16 @@ public bool TrueForAll(Predicate match) bool ICollection.Remove(T item) => throw new NotSupportedException(); - int IList.Add(object value) => throw new NotSupportedException(); + int IList.Add(object? value) => throw new NotSupportedException(); void IList.Clear() => throw new NotSupportedException(); - bool IList.Contains(object value) + bool IList.Contains(object? value) { if (value == null) { if (default(T) == null) - return Contains(default); + return Contains(default!); } else if (value is T) { @@ -495,12 +496,12 @@ bool IList.Contains(object value) return false; } - int IList.IndexOf(object value) + int IList.IndexOf(object? value) { if (value == null) { if (default(T) == null) - return IndexOf(default); + return IndexOf(default!); } else if (value is T) { @@ -510,9 +511,9 @@ int IList.IndexOf(object value) return -1; } - void IList.Insert(int index, object value) => throw new NotSupportedException(); + void IList.Insert(int index, object? value) => throw new NotSupportedException(); - void IList.Remove(object value) => throw new NotSupportedException(); + void IList.Remove(object? value) => throw new NotSupportedException(); void IList.RemoveAt(int index) => throw new NotSupportedException(); diff --git a/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt b/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt index 5d9f924..77db173 100644 --- a/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt +++ b/TunnelVisionLabs.Collections.Trees/PublicAPI.Unshipped.txt @@ -227,109 +227,109 @@ TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.this[TKey key].get -> TValue TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Add(T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.AddRange(System.Collections.Generic.IEnumerable items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Add(T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.AddRange(System.Collections.Generic.IEnumerable! items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.BinarySearch(T item) -> int -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.BinarySearch(T item, System.Collections.Generic.IComparer comparer) -> int -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.BinarySearch(int index, int count, T item, System.Collections.Generic.IComparer comparer) -> int +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.BinarySearch(T item, System.Collections.Generic.IComparer? comparer) -> int +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.BinarySearch(int index, int count, T item, System.Collections.Generic.IComparer? comparer) -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Add(T item) -> void -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.AddRange(System.Collections.Generic.IEnumerable items) -> void +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.AddRange(System.Collections.Generic.IEnumerable! items) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.BinarySearch(T item) -> int -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.BinarySearch(T item, System.Collections.Generic.IComparer comparer) -> int -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.BinarySearch(int index, int count, T item, System.Collections.Generic.IComparer comparer) -> int +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.BinarySearch(T item, System.Collections.Generic.IComparer? comparer) -> int +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.BinarySearch(int index, int count, T item, System.Collections.Generic.IComparer? comparer) -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Clear() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Contains(T item) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.ConvertAll(System.Func converter) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.CopyTo(T[] array) -> void -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.CopyTo(T[] array, int arrayIndex) -> void -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.CopyTo(int index, T[] array, int arrayIndex, int count) -> void +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.ConvertAll(System.Func! converter) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.CopyTo(T[]! array) -> void +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.CopyTo(T[]! array, int arrayIndex) -> void +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.CopyTo(int index, T[]! array, int arrayIndex, int count) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Count.get -> int -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Exists(System.Predicate match) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Find(System.Predicate match) -> T -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.FindAll(System.Predicate match) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.FindIndex(System.Predicate match) -> int -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.FindIndex(int startIndex, System.Predicate match) -> int -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.FindIndex(int startIndex, int count, System.Predicate match) -> int -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.FindLast(System.Predicate match) -> T -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.FindLastIndex(System.Predicate match) -> int -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.FindLastIndex(int startIndex, System.Predicate match) -> int -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.FindLastIndex(int startIndex, int count, System.Predicate match) -> int -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.ForEach(System.Action action) -> void +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Exists(System.Predicate! match) -> bool +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Find(System.Predicate! match) -> T +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.FindAll(System.Predicate! match) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.FindIndex(System.Predicate! match) -> int +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.FindIndex(int startIndex, System.Predicate! match) -> int +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.FindIndex(int startIndex, int count, System.Predicate! match) -> int +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.FindLast(System.Predicate! match) -> T +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.FindLastIndex(System.Predicate! match) -> int +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.FindLastIndex(int startIndex, System.Predicate! match) -> int +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.FindLastIndex(int startIndex, int count, System.Predicate! match) -> int +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.ForEach(System.Action! action) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Enumerator -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.GetRange(int index, int count) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.GetRange(int index, int count) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.IndexOf(T item) -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.IndexOf(T item, int index) -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.IndexOf(T item, int index, int count) -> int -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.IndexOf(T item, int index, int count, System.Collections.Generic.IEqualityComparer equalityComparer) -> int +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.IndexOf(T item, int index, int count, System.Collections.Generic.IEqualityComparer? equalityComparer) -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Insert(int index, T item) -> void -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.InsertRange(int index, System.Collections.Generic.IEnumerable items) -> void +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.InsertRange(int index, System.Collections.Generic.IEnumerable! items) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.LastIndexOf(T item) -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.LastIndexOf(T item, int startIndex) -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.LastIndexOf(T item, int startIndex, int count) -> int -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.LastIndexOf(T item, int startIndex, int count, System.Collections.Generic.IEqualityComparer equalityComparer) -> int +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.LastIndexOf(T item, int startIndex, int count, System.Collections.Generic.IEqualityComparer? equalityComparer) -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Remove(T item) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.RemoveAll(System.Predicate match) -> int +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.RemoveAll(System.Predicate! match) -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.RemoveAt(int index) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Reverse() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Reverse(int index, int count) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Sort() -> void -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Sort(System.Collections.Generic.IComparer comparer) -> void -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Sort(System.Comparison comparison) -> void -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Sort(int index, int count, System.Collections.Generic.IComparer comparer) -> void -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.ToImmutable() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.TrueForAll(System.Predicate match) -> bool +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Sort(System.Collections.Generic.IComparer? comparer) -> void +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Sort(System.Comparison! comparison) -> void +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.Sort(int index, int count, System.Collections.Generic.IComparer? comparer) -> void +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.ToImmutable() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.TrueForAll(System.Predicate! match) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.this[int index].get -> T TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder.this[int index].set -> void -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Clear() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Clear() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Contains(T value) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.ConvertAll(System.Func converter) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.CopyTo(T[] array) -> void -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.CopyTo(T[] array, int arrayIndex) -> void -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.CopyTo(int index, T[] array, int arrayIndex, int count) -> void +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.ConvertAll(System.Func! converter) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.CopyTo(T[]! array) -> void +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.CopyTo(T[]! array, int arrayIndex) -> void +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.CopyTo(int index, T[]! array, int arrayIndex, int count) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Count.get -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Enumerator TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Enumerator.Current.get -> T TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Enumerator.Dispose() -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Enumerator.MoveNext() -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Enumerator.Reset() -> void -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Exists(System.Predicate match) -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Find(System.Predicate match) -> T -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.FindAll(System.Predicate match) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.FindIndex(System.Predicate match) -> int -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.FindIndex(int startIndex, System.Predicate match) -> int -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.FindIndex(int startIndex, int count, System.Predicate match) -> int -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.FindLast(System.Predicate match) -> T -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.FindLastIndex(System.Predicate match) -> int -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.FindLastIndex(int startIndex, System.Predicate match) -> int -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.FindLastIndex(int startIndex, int count, System.Predicate match) -> int -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.ForEach(System.Action action) -> void +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Exists(System.Predicate! match) -> bool +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Find(System.Predicate! match) -> T +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.FindAll(System.Predicate! match) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.FindIndex(System.Predicate! match) -> int +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.FindIndex(int startIndex, System.Predicate! match) -> int +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.FindIndex(int startIndex, int count, System.Predicate! match) -> int +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.FindLast(System.Predicate! match) -> T +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.FindLastIndex(System.Predicate! match) -> int +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.FindLastIndex(int startIndex, System.Predicate! match) -> int +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.FindLastIndex(int startIndex, int count, System.Predicate! match) -> int +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.ForEach(System.Action! action) -> void TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.GetEnumerator() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Enumerator -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.GetRange(int index, int count) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.IndexOf(T item, int index, int count, System.Collections.Generic.IEqualityComparer equalityComparer) -> int +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.GetRange(int index, int count) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.IndexOf(T item, int index, int count, System.Collections.Generic.IEqualityComparer? equalityComparer) -> int TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.IndexOf(T value) -> int -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Insert(int index, T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.InsertRange(int index, System.Collections.Generic.IEnumerable items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Insert(int index, T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.InsertRange(int index, System.Collections.Generic.IEnumerable! items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList! TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.IsEmpty.get -> bool -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.LastIndexOf(T item, int index, int count, System.Collections.Generic.IEqualityComparer equalityComparer) -> int -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Remove(T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Remove(T value, System.Collections.Generic.IEqualityComparer equalityComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.RemoveAll(System.Predicate match) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.RemoveAt(int index) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.RemoveRange(System.Collections.Generic.IEnumerable items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.RemoveRange(System.Collections.Generic.IEnumerable items, System.Collections.Generic.IEqualityComparer equalityComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.RemoveRange(int index, int count) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Replace(T oldValue, T newValue) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Replace(T oldValue, T newValue, System.Collections.Generic.IEqualityComparer equalityComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Reverse() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Reverse(int index, int count) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.SetItem(int index, T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Sort() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Sort(System.Collections.Generic.IComparer comparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Sort(System.Comparison comparison) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Sort(int index, int count, System.Collections.Generic.IComparer comparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.ToBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder -~TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.TrueForAll(System.Predicate match) -> bool +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.LastIndexOf(T item, int index, int count, System.Collections.Generic.IEqualityComparer? equalityComparer) -> int +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Remove(T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Remove(T value, System.Collections.Generic.IEqualityComparer? equalityComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.RemoveAll(System.Predicate! match) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.RemoveAt(int index) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.RemoveRange(System.Collections.Generic.IEnumerable! items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.RemoveRange(System.Collections.Generic.IEnumerable! items, System.Collections.Generic.IEqualityComparer? equalityComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.RemoveRange(int index, int count) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Replace(T oldValue, T newValue) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Replace(T oldValue, T newValue, System.Collections.Generic.IEqualityComparer? equalityComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Reverse() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Reverse(int index, int count) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.SetItem(int index, T value) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Sort() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Sort(System.Collections.Generic.IComparer? comparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Sort(System.Comparison! comparison) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Sort(int index, int count, System.Collections.Generic.IComparer? comparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.ToBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder! +TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.TrueForAll(System.Predicate! match) -> bool TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.this[int index].get -> T TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue @@ -759,12 +759,12 @@ static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToIm static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToImmutableTreeDictionary(this System.Collections.Generic.IEnumerable! source, System.Func! keySelector, System.Func! elementSelector, System.Collections.Generic.IEqualityComparer? keyComparer, System.Collections.Generic.IEqualityComparer? valueComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary! static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToImmutableTreeDictionary(this System.Collections.Generic.IEnumerable! source, System.Func! keySelector) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary! static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.ToImmutableTreeDictionary(this System.Collections.Generic.IEnumerable! source, System.Func! keySelector, System.Collections.Generic.IEqualityComparer? keyComparer) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary! -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Create() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Create(T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Create(params T[] items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.CreateBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.CreateRange(System.Collections.Generic.IEnumerable items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList -~static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.ToImmutableTreeList(this System.Collections.Generic.IEnumerable source) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Create() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Create(T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Create(params T[]! items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.CreateBuilder() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Builder! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.CreateRange(System.Collections.Generic.IEnumerable! items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList! +static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.ToImmutableTreeList(this System.Collections.Generic.IEnumerable! source) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList! static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Create() -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue! static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Create(T item) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue! static TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Create(params T[]! items) -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue! @@ -791,7 +791,7 @@ static TunnelVisionLabs.Collections.Trees.TreeSet.CreateSetComparer() -> Syst static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeDictionary! static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableSortedTreeSet! static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeDictionary! -~static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList +static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeList! static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeQueue! static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeSet! static readonly TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack.Empty -> TunnelVisionLabs.Collections.Trees.Immutable.ImmutableTreeStack!