3 implementations of AddService
System.ComponentModel.TypeConverter (1)
System\ComponentModel\Design\ServiceContainer.cs (1)
58
public void
AddService
(Type serviceType, object serviceInstance)
System.Windows.Forms.Design (2)
System\ComponentModel\Design\DesignerHost.cs (1)
1265
void IServiceContainer.
AddService
(Type serviceType, object serviceInstance)
System\ComponentModel\Design\DesignerHost.Site.cs (1)
100
void IServiceContainer.
AddService
(Type serviceType, object serviceInstance)
25 references to AddService
DesignSurfaceExt (4)
DesignSurfaceExt.cs (4)
41
serviceProvider.
AddService
(typeof(DesignerOptionService), opsService2);
54
serviceProvider.
AddService
(typeof(DesignerOptionService), opsService2);
67
serviceProvider.
AddService
(typeof(DesignerOptionService), opsService2);
80
serviceProvider.
AddService
(typeof(DesignerOptionService), opsService2);
System.Windows.Forms.Design (5)
System\ComponentModel\Design\DesignerActionService.cs (1)
37
host?.
AddService
(typeof(DesignerActionService), this);
System\ComponentModel\Design\DesignerHost.cs (2)
91
sc.
AddService
(t, this);
1268
sc.
AddService
(serviceType, serviceInstance);
System\ComponentModel\Design\DesignerHost.Site.cs (1)
102
SiteServiceContainer.
AddService
(serviceType, serviceInstance);
System\ComponentModel\Design\ServiceContainerExtensions.cs (1)
9
serviceContainer.
AddService
(typeof(T), serviceInstance);
System.Windows.Forms.Design.Tests (16)
System\ComponentModel\Design\ComponentDesignerTests.cs (4)
2168
.Setup(c => c.
AddService
(typeof(DesignerCommandSet), It.IsAny<DesignerCommandSet>()))
2180
mockSite.As<IServiceContainer>().Verify(s => s.
AddService
(typeof(DesignerCommandSet), set), Times.Once());
2224
.Setup(c => c.
AddService
(typeof(DesignerCommandSet), It.IsAny<DesignerCommandSet>()))
2238
mockSite.As<IServiceContainer>().Verify(s => s.
AddService
(typeof(DesignerCommandSet), It.IsAny<DesignerCommandSet>()), Times.Never());
System\ComponentModel\Design\DesignerActionServiceTests.cs (4)
18
.Setup(h => h.
AddService
(typeof(DesignerActionService), It.IsAny<DesignerActionService>()))
39
mockDesignerHost.Verify(h => h.
AddService
(typeof(DesignerActionService), service), Times.Once());
254
.Setup(h => h.
AddService
(typeof(DesignerActionService), It.IsAny<DesignerActionService>()));
285
.Setup(h => h.
AddService
(typeof(DesignerActionService), It.IsAny<DesignerActionService>()));
System\ComponentModel\Design\DesignerHostTests.cs (5)
1070
container.
AddService
(typeof(object), service);
1730
host.
AddService
(typeof(object), service);
1786
Assert.Throws<ObjectDisposedException>(() => host.
AddService
(typeof(object), new object()));
2888
host.
AddService
(typeof(object), new object());
2902
host.
AddService
(typeof(object), new object());
ToolStripDesignerTests.cs (2)
28
mockDesignerHost.Setup(s => s.
AddService
(typeof(ToolStripKeyboardHandlingService), It.IsAny<object>()));
29
mockDesignerHost.Setup(s => s.
AddService
(typeof(ISupportInSituService), It.IsAny<object>()));
ToolStripDropDownDesignerTest.cs (1)
30
mockDesignerHost.Setup(s => s.
AddService
(It.IsAny<Type>(), It.IsAny<object>()));