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!