Implemented interface member:
method
GetService
System.IServiceProvider.GetService(System.Type)
45 references to GetService
DesignSurfaceExt (6)
DesignSurfaceExt.cs (6)
33IServiceContainer serviceProvider = GetService(typeof(IServiceContainer)) as IServiceContainer; 46IServiceContainer serviceProvider = GetService(typeof(IServiceContainer)) as IServiceContainer; 59IServiceContainer serviceProvider = GetService(typeof(IServiceContainer)) as IServiceContainer; 72IServiceContainer serviceProvider = GetService(typeof(IServiceContainer)) as IServiceContainer; 232public IDesignerHost GetIDesignerHost() => (IDesignerHost)GetService(typeof(IDesignerHost)); 347IMenuCommandService ims = GetService(typeof(IMenuCommandService)) as IMenuCommandService;
System.Windows.Forms.Design (3)
System\ComponentModel\Design\DesignerEventService.cs (1)
43host = surface.GetService(typeof(IDesignerHost)) as IDesignerHost;
System\ComponentModel\Design\DesignerHost.cs (1)
511serviceInstance = base.GetService(service) ?? _surface?.GetService(service);
System\ComponentModel\Design\DesignSurface.cs (1)
421return GetService(typeof(IExtenderProviderService))!;
System.Windows.Forms.Design.Tests (35)
System\ComponentModel\Design\DesignerHostTests.cs (12)
1072Assert.Same(otherService, surface.GetService(typeof(object))); 1105Assert.Same(otherService, surface.GetService(typeof(object))); 1135Assert.Same(otherService, surface.GetService(typeof(object))); 1169Assert.Same(otherService, surface.GetService(typeof(object))); 1207Assert.Same(otherService, surface.GetService(typeof(object))); 1242Assert.Same(otherService, surface.GetService(typeof(object))); 1732Assert.Same(service, surface.GetService(typeof(object))); 1746Assert.Same(service, surface.GetService(typeof(object))); 1760Assert.Same(service, surface.GetService(typeof(object))); 1775Assert.Same(service, surface.GetService(typeof(object))); 2891Assert.Null(surface.GetService(typeof(object))); 2905Assert.Null(surface.GetService(typeof(object)));
System\ComponentModel\Design\DesignSurfaceTests.cs (16)
621IExtenderListService defaultProviderService = (IExtenderListService)surface.GetService(typeof(IExtenderListService)); 660IExtenderListService defaultProviderService = (IExtenderListService)surface.GetService(typeof(IExtenderListService)); 705IExtenderListService defaultProviderService = (IExtenderListService)surface.GetService(typeof(IExtenderListService)); 1478Assert.Same(service, surface.GetService(typeof(int))); 1486ISelectionService service = Assert.IsAssignableFrom<ISelectionService>(surface.GetService(typeof(ISelectionService))); 1495Assert.IsAssignableFrom<IExtenderProviderService>(surface.GetService(typeof(IExtenderProviderService))); 1502Assert.IsAssignableFrom<IExtenderListService>(surface.GetService(typeof(IExtenderListService))); 1503Assert.IsAssignableFrom<IExtenderProviderService>(surface.GetService(typeof(IExtenderListService))); 1510Assert.IsAssignableFrom<ITypeDescriptorFilterService>(surface.GetService(typeof(ITypeDescriptorFilterService))); 1517Assert.IsAssignableFrom<IReferenceService>(surface.GetService(typeof(IReferenceService))); 1524Assert.Same(surface, surface.GetService(typeof(DesignSurface))); 1531Assert.Same(surface.ServiceContainer, surface.GetService(surface.ServiceContainer.GetType())); 1540Assert.Same(surface.ServiceContainer, surface.GetService(serviceType)); 1548Assert.Same(surface.Host, surface.GetService(serviceType)); 1555Assert.Null(surface.GetService(typeof(int))); 1564Assert.Null(surface.GetService(serviceType));
System\ComponentModel\Design\ExtenderProviderServiceTests.cs (7)
14object service = surface.GetService(typeof(IExtenderListService)); 23object service = surface.GetService(typeof(IExtenderListService)); 41object service = surface.GetService(typeof(IExtenderListService)); 50object service = surface.GetService(typeof(IExtenderListService)); 63object service = surface.GetService(typeof(IExtenderListService)); 88object service = surface.GetService(typeof(IExtenderListService)); 100object service = surface.GetService(typeof(IExtenderListService));
System.Windows.Forms.UI.IntegrationTests (1)
DesignBehaviorsTests.cs (1)
62var designerHost = (IDesignerHost)designSurface.GetService(typeof(IDesignerHost))!;