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