1 write to _collection
System.Windows.Forms.Tests (1)
System\Windows\Forms\ListBox.SelectedObjectCollectionTests.cs (1)
16_collection = new(_owner);
32 references to _collection
System.Windows.Forms.Tests (32)
System\Windows\Forms\ListBox.SelectedObjectCollectionTests.cs (32)
24=> Assert.True(_collection.IsReadOnly); 33Assert.False(((ICollection)_collection).IsSynchronized); 34Assert.Same(_collection, ((ICollection)_collection).SyncRoot); 40Assert.True(((IList)_collection).IsFixedSize); 41Assert.True(((IList)_collection).IsReadOnly); 42Assert.False(((IList)_collection).IsSynchronized); 43Assert.Same(_collection, ((IList)_collection).SyncRoot); 57=> Assert.Throws<NotSupportedException>(() => ((IList)_collection)[index] = value); 64=> Assert.Throws<NotSupportedException>(() => ((IList)_collection).Add(value)); 68=> Assert.Throws<NotSupportedException>(() => ((IList)_collection).Clear()); 81=> Assert.Throws<NotSupportedException>(() => ((IList)_collection).Insert(index, value)); 88=> Assert.Throws<NotSupportedException>(() => ((IList)_collection).Remove(value)); 95=> Assert.Throws<NotSupportedException>(() => ((IList)_collection).RemoveAt(index)); 106_collection.Contains(value).Should().Be(expected); 118_collection.EnsureUpToDate(); 119_collection.IndexOf(value).Should().Be(expected); 126_collection.CopyTo(destination, 0); 137_collection.CopyTo(destination, 0); 144_collection.Clear(); 145_collection.Count.Should().Be(0); 154_collection.Clear(); 155_collection.Count.Should().Be(0); 162_collection.Remove("item1"); 163_collection.Count.Should().Be(0); 172_collection.Remove("item2"); 173_collection.Count.Should().Be(0); 183_collection.Remove("item3"); 184_collection.Count.Should().Be(1); 194_collection.Remove(null!); 195_collection.Count.Should().Be(1);