64 references to
System.Windows.Forms (2)
System\Windows\Forms\Controls\DataGridView\DataGridView.DataConnection.cs (1)
1523if (_owner.BindingContext[newDataSource] is not CurrencyManager cm)
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (1)
805cm = (CurrencyManager)dataGridView.BindingContext[DataSource];
System.Windows.Forms.Tests (62)
System\Windows\Forms\BindingContextTests.cs (32)
74Assert.Same(source1.CurrencyManager, context[dataSource]); 81Assert.Same(source2.CurrencyManager, context[dataSource]); 98Assert.Same(source1.CurrencyManager, context[dataSource1]); 99Assert.Same(source2.CurrencyManager, context[dataSource2]); 119Assert.Same(source1.CurrencyManager, context[dataSource]); 126Assert.Same(source2.CurrencyManager, context[dataSource]); 143Assert.Same(source1.CurrencyManager, context[dataSource1]); 144Assert.Same(source2.CurrencyManager, context[dataSource2]); 406PropertyManager manager = Assert.IsType<PropertyManager>(context[dataSource]); 411Assert.Same(manager, context[dataSource]); 419CurrencyManager manager = Assert.IsType<CurrencyManager>(context[dataSource]); 425Assert.Same(manager, context[dataSource]); 433CurrencyManager manager = Assert.IsType<CurrencyManager>(context[dataSource]); 439Assert.Same(manager, context[dataSource]); 452CurrencyManager manager = Assert.IsType<CurrencyManager>(context[mockIListSource.Object]); 458Assert.Same(manager, context[mockIListSource.Object]); 470Assert.Throws<ArgumentNullException>("dataSource", () => context[mockIListSource.Object]); 497PropertyManager manager = Assert.IsType<PropertyManager>(context[mockCurrencyManagerProvider.Object]); 499Assert.Same(manager, context[mockCurrencyManagerProvider.Object]); 550Assert.Same(manager, context[dataSource]); 552Assert.Same(manager, context[dataSource]); 713PropertyManager manager = Assert.IsType<PropertyManager>(context[dataSource]); 721PropertyManager newManager = Assert.IsType<PropertyManager>(context[dataSource]); 727Assert.Same(newManager, context[dataSource]); 734Assert.Throws<ArgumentNullException>("dataSource", () => context[null]); 804PropertyManager manager = Assert.IsType<PropertyManager>(context[dataSource]); 822CurrencyManager manager = Assert.IsType<CurrencyManager>(context[dataSource]); 886PropertyManager manager1 = Assert.IsType<PropertyManager>(context1[dataSource]); 892PropertyManager manager2 = Assert.IsType<PropertyManager>(context2[dataSource]); 917CurrencyManager manager1 = Assert.IsType<CurrencyManager>(context1[dataSource]); 924CurrencyManager manager2 = Assert.IsType<CurrencyManager>(context2[dataSource]); 952PropertyManager manager = Assert.IsAssignableFrom<PropertyManager>(context[dataSource]);
System\Windows\Forms\ListControlTests.cs (26)
202Assert.Same(value[dataSource], control.DataManager); 210Assert.Same(value[dataSource], control.DataManager); 229Assert.Same(value[dataSource], control.DataManager); 237Assert.Same(value[dataSource], control.DataManager); 257Assert.Same(value[dataSource], control.DataManager); 265Assert.Same(value[dataSource], control.DataManager); 286Assert.Same(value[dataSource], control.DataManager); 293Assert.Same(value[dataSource], control.DataManager); 872Assert.Same(context[value], control.DataManager); 885Assert.Same(context[value], control.DataManager); 909Assert.Same(context[value], control.DataManager); 922Assert.Same(context[value], control.DataManager); 940Assert.Same(context[value], control.DataManager); 946Assert.Same(context[value], control.DataManager); 969Assert.Same(context[value], control.DataManager); 982Assert.Same(context[value], control.DataManager); 1175Assert.Same(context[dataSource], control.DataManager); 1182Assert.Same(context[dataSource], control.DataManager); 1204Assert.Same(context[dataSource], control.DataManager); 1211Assert.Same(context[dataSource], control.DataManager); 1237Assert.Same(context[dataSource], control.DataManager); 1252Assert.Same(context[dataSource], control.DataManager); 1773Assert.Same(context[dataSource], control.DataManager); 1781Assert.Same(context[dataSource], control.DataManager); 1821Assert.Same(context[dataSource], control.DataManager); 1829Assert.Same(context[dataSource], control.DataManager);
System\Windows\Forms\PropertyManagerTests.cs (4)
28PropertyManager manager = Assert.IsType<PropertyManager>(context[new DataSource()]); 38PropertyManager manager = Assert.IsType<PropertyManager>(context[new DataSource()]); 395PropertyManager manager = Assert.IsType<PropertyManager>(context[new DataSource()]); 405PropertyManager manager = Assert.IsType<PropertyManager>(context[new DataSource()]);