Implemented interface member:
method
GetService
System.IServiceProvider.GetService(System.Type)
45 references to GetService
DesignSurfaceExt (6)
DesignSurfaceExt.cs (6)
26IServiceContainer serviceProvider = GetService(typeof(IServiceContainer)) as IServiceContainer; 39IServiceContainer serviceProvider = GetService(typeof(IServiceContainer)) as IServiceContainer; 52IServiceContainer serviceProvider = GetService(typeof(IServiceContainer)) as IServiceContainer; 65IServiceContainer serviceProvider = GetService(typeof(IServiceContainer)) as IServiceContainer; 225public IDesignerHost GetIDesignerHost() => (IDesignerHost)GetService(typeof(IDesignerHost)); 340IMenuCommandService 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)
1074Assert.Same(otherService, surface.GetService(typeof(object))); 1107Assert.Same(otherService, surface.GetService(typeof(object))); 1137Assert.Same(otherService, surface.GetService(typeof(object))); 1171Assert.Same(otherService, surface.GetService(typeof(object))); 1209Assert.Same(otherService, surface.GetService(typeof(object))); 1244Assert.Same(otherService, surface.GetService(typeof(object))); 1734Assert.Same(service, surface.GetService(typeof(object))); 1748Assert.Same(service, surface.GetService(typeof(object))); 1762Assert.Same(service, surface.GetService(typeof(object))); 1777Assert.Same(service, surface.GetService(typeof(object))); 2893Assert.Null(surface.GetService(typeof(object))); 2907Assert.Null(surface.GetService(typeof(object)));
System\ComponentModel\Design\DesignSurfaceTests.cs (16)
623IExtenderListService defaultProviderService = (IExtenderListService)surface.GetService(typeof(IExtenderListService)); 662IExtenderListService defaultProviderService = (IExtenderListService)surface.GetService(typeof(IExtenderListService)); 707IExtenderListService defaultProviderService = (IExtenderListService)surface.GetService(typeof(IExtenderListService)); 1480Assert.Same(service, surface.GetService(typeof(int))); 1488ISelectionService service = Assert.IsAssignableFrom<ISelectionService>(surface.GetService(typeof(ISelectionService))); 1497Assert.IsAssignableFrom<IExtenderProviderService>(surface.GetService(typeof(IExtenderProviderService))); 1504Assert.IsAssignableFrom<IExtenderListService>(surface.GetService(typeof(IExtenderListService))); 1505Assert.IsAssignableFrom<IExtenderProviderService>(surface.GetService(typeof(IExtenderListService))); 1512Assert.IsAssignableFrom<ITypeDescriptorFilterService>(surface.GetService(typeof(ITypeDescriptorFilterService))); 1519Assert.IsAssignableFrom<IReferenceService>(surface.GetService(typeof(IReferenceService))); 1526Assert.Same(surface, surface.GetService(typeof(DesignSurface))); 1533Assert.Same(surface.ServiceContainer, surface.GetService(surface.ServiceContainer.GetType())); 1542Assert.Same(surface.ServiceContainer, surface.GetService(serviceType)); 1550Assert.Same(surface.Host, surface.GetService(serviceType)); 1557Assert.Null(surface.GetService(typeof(int))); 1566Assert.Null(surface.GetService(serviceType));
System\ComponentModel\Design\ExtenderProviderServiceTests.cs (7)
16object service = surface.GetService(typeof(IExtenderListService)); 25object service = surface.GetService(typeof(IExtenderListService)); 43object service = surface.GetService(typeof(IExtenderListService)); 52object service = surface.GetService(typeof(IExtenderListService)); 65object service = surface.GetService(typeof(IExtenderListService)); 90object service = surface.GetService(typeof(IExtenderListService)); 102object service = surface.GetService(typeof(IExtenderListService));
System.Windows.Forms.UI.IntegrationTests (1)
DesignBehaviorsTests.cs (1)
62var designerHost = (IDesignerHost)designSurface.GetService(typeof(IDesignerHost))!;