1 implementation of Add
System.ComponentModel.TypeConverter (1)
System\ComponentModel\Container.cs (1)
28
public virtual void
Add
(IComponent? component) => Add(component, null);
120 references to Add
System.IO.Ports (1)
System\IO\Ports\SerialPort.cs (1)
551
container.
Add
(this);
System.Windows.Forms (9)
System\Windows\Forms\ContextMenuStrip.cs (1)
22
container.
Add
(this);
System\Windows\Forms\Controls\ImageList\ImageList.cs (1)
71
container.
Add
(this);
System\Windows\Forms\Controls\TabControl\TabControl.ControlCollection.cs (1)
58
site.Container?.
Add
(tabPage);
System\Windows\Forms\DataBinding\BindingNavigator.cs (1)
65
container.
Add
(this);
System\Windows\Forms\DataBinding\BindingSource.cs (1)
102
container.
Add
(this);
System\Windows\Forms\ErrorProvider\ErrorProvider.cs (1)
85
container.
Add
(this);
System\Windows\Forms\NotifyIcon.cs (1)
71
container.
Add
(this);
System\Windows\Forms\Timer.cs (1)
46
container.
Add
(this);
System\Windows\Forms\ToolTip\ToolTip.cs (1)
81
cont.
Add
(this);
System.Windows.Forms.Design (9)
System\ComponentModel\Design\Serialization\DesignerSerializationManager.cs (1)
375
Container.
Add
(component);
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (1)
225
_destHost.Container.
Add
(c);
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (1)
252
currentContainer.
Add
(newColumns[i]);
System\Windows\Forms\Design\DataGridViewDesigner.cs (1)
350
currentContainer?.
Add
(col);
System\Windows\Forms\Design\ParentControlDesigner.cs (4)
647
container.
Add
(children[i]);
1413
container.
Add
(comp);
2344
container.
Add
(component);
2374
oldContainer?.
Add
(component);
System\Windows\Forms\Design\ToolStripItemDesigner.cs (1)
885
host.Container.
Add
(ToolStripItem);
System.Windows.Forms.Design.Tests (97)
System\ComponentModel\Design\DesignerHostTests.cs (63)
279
host.Container.
Add
(component1);
290
host.Container.
Add
(component2);
301
host.Container.
Add
(component3);
312
host.Container.
Add
(component4);
428
host.Container.
Add
(component);
435
host.Container.
Add
(component);
498
host.Container.
Add
(component);
505
host.Container.
Add
(component);
571
host.Container.
Add
(component);
584
host.Container.
Add
(component);
596
host.Container.
Add
(component);
601
host.Container.
Add
(component);
637
host.Container.
Add
(component);
692
host.Container.
Add
(component);
892
host.Container.
Add
(component);
897
Assert.Throws<Exception>(() => host.Container.
Add
(newComponent));
913
host.Container.
Add
(component);
926
host.Container.
Add
(component);
945
host.Container.
Add
(component);
957
host.Container.
Add
(component);
975
host.Container.
Add
(component);
987
host.Container.
Add
(component);
1005
host.Container.
Add
(component);
1041
host.Container.
Add
(component);
1068
host.Container.
Add
(component);
1101
host.Container.
Add
(component);
1131
host.Container.
Add
(component);
1165
host.Container.
Add
(component);
1203
host.Container.
Add
(component);
1238
host.Container.
Add
(component);
1302
host.Container.
Add
(component1);
1477
host.Container.
Add
(component);
1502
host.Container.
Add
(component);
1515
host.Container.
Add
(component);
1549
host.Container.
Add
(component);
1562
host.Container.
Add
(component);
1572
host.Container.
Add
(component);
1582
host.Container.
Add
(component);
1592
host.Container.
Add
(component);
1623
host.Container.
Add
(component);
1629
host.Container.
Add
(component);
1637
host.Container.
Add
(component);
1655
Assert.Throws<NotImplementedException>(() => host.Container.
Add
(component));
1668
Assert.Throws<InvalidOperationException>(() => host.Container.
Add
(component));
1678
Assert.Throws<InvalidOperationException>(() => host.Container.
Add
(component));
1688
Assert.Throws<DivideByZeroException>(() => host.Container.
Add
(component));
1707
host.Container.
Add
(component);
1811
host.Container.
Add
(component);
1826
host.Container.
Add
(component);
2253
host.Container.
Add
(component);
2531
host.Container.
Add
(rootComponent);
2532
host.Container.
Add
(component);
2619
host.Container.
Add
(component);
2688
host.Container.
Add
(component);
2718
host.Container.
Add
(component);
2735
host.Container.
Add
(component);
2754
host1.Container.
Add
(otherComponent);
2755
host2.Container.
Add
(component);
2771
host1.Container.
Add
(otherComponent);
2808
host.Container.
Add
(component1);
2809
host.Container.
Add
(component2);
2860
host.Container.
Add
(component);
2873
host.Container.
Add
(component);
System\ComponentModel\Design\SiteNestedContainerTests.cs (33)
181
container.
Add
(component1);
192
container.
Add
(component2);
203
container.
Add
(component3);
214
container.
Add
(component4);
337
container.
Add
(component);
344
container.
Add
(component);
408
container.
Add
(component);
417
Assert.Throws<ArgumentException>("provider", () => container.
Add
(component));
423
container.
Add
(component);
488
container.
Add
(component);
502
container.
Add
(component);
536
container.
Add
(component);
542
container.
Add
(component);
550
container.
Add
(component);
570
Assert.Throws<NotImplementedException>(() => container.
Add
(component));
585
Assert.Throws<InvalidOperationException>(() => container.
Add
(component));
596
Assert.Throws<InvalidOperationException>(() => container.
Add
(component));
607
Assert.Throws<DivideByZeroException>(() => container.
Add
(component));
627
container.
Add
(component);
653
container.
Add
(component);
673
container.
Add
(rootComponent);
674
container.
Add
(component);
750
container.
Add
(component);
814
container.
Add
(component);
845
container.
Add
(component);
863
container.
Add
(component);
883
container1.
Add
(otherComponent);
884
container2.
Add
(component);
901
container1.
Add
(otherComponent);
940
container.
Add
(component1);
941
container.
Add
(component2);
994
container.
Add
(component);
1008
container.
Add
(component);
System\Windows\Forms\Design\FlowPanelDesignerTests.cs (1)
22
mockContainer.Object.
Add
(panel);
System.Windows.Forms.Tests (4)
BindingNavigatorTests.cs (2)
40
mockContainer.Setup(x => x.
Add
(It.IsAny<BindingNavigator>())).Verifiable();
48
mockContainer.Verify(x => x.
Add
(bn));
ContextMenuStripTests.cs (2)
24
mockContainer.Setup(x => x.
Add
(It.IsAny<ContextMenuStrip>())).Verifiable();
32
mockContainer.Verify(x => x.
Add
(cms));