17 references to Contains
System.Windows.Forms (2)
System\Windows\Forms\DataBinding\BindingContext.cs (2)
160
public bool Contains(object dataSource) =>
Contains
(dataSource, string.Empty);
295
if (propBinding.BindableComponent is not null && newBindingContext.
Contains
(propBinding.BindableComponent, string.Empty))
System.Windows.Forms.Tests (15)
System\Windows\Forms\BindingContextTests.cs (15)
364
Assert.True(context.
Contains
(dataSource, null));
365
Assert.True(context.
Contains
(dataSource, string.Empty));
367
Assert.False(context.
Contains
(1, null));
368
Assert.False(context.
Contains
(1, string.Empty));
381
Assert.True(context.
Contains
(dataSource1, null));
382
Assert.True(context.
Contains
(dataSource1, string.Empty));
383
Assert.False(context.
Contains
(dataSource1, "Property"));
384
Assert.True(context.
Contains
(dataSource2, null));
385
Assert.True(context.
Contains
(dataSource2, string.Empty));
386
Assert.True(context.
Contains
(dataSource2, "Property"));
387
Assert.True(context.
Contains
(dataSource2, "property"));
388
Assert.False(context.
Contains
(dataSource2, "NoSuchProperty"));
389
Assert.False(context.
Contains
(1, "Property"));
397
Assert.Throws<ArgumentNullException>("dataSource", () => context.
Contains
(null, null));
398
Assert.Throws<ArgumentNullException>("dataSource", () => context.
Contains
(null, string.Empty));