Implemented interface member:
method
GetService
System.IServiceProvider.GetService(System.Type)
30 references to GetService
Aspire.Hosting.Tests (1)
Utils\TestServiceProvider.cs (1)
21return _serviceContainer.GetService(serviceType);
System.Windows.Forms.Design (3)
System\ComponentModel\Design\DesignSurface.cs (1)
388return _serviceContainer?.GetService(serviceType);
System\ComponentModel\Design\DesignSurfaceManager.cs (1)
302public object? GetService(Type serviceType) => _serviceContainer?.GetService(serviceType);
System\ComponentModel\Design\SiteNestedContainer.cs (1)
107return _services.GetService(serviceType);
System.Windows.Forms.Design.Tests (26)
System\ComponentModel\Design\DesignerHostTests.cs (8)
1108Assert.Same(service, otherContainer.GetService(typeof(object))); 1210Assert.Same(service, otherContainer.GetService(typeof(object))); 1733Assert.Same(service, surface.ServiceContainer.GetService(typeof(object))); 1747Assert.Same(service, surface.ServiceContainer.GetService(typeof(object))); 1761Assert.Same(service, surface.ServiceContainer.GetService(typeof(object))); 1776Assert.Same(service, surface.ServiceContainer.GetService(typeof(object))); 2892Assert.Null(surface.ServiceContainer.GetService(typeof(object))); 2906Assert.Null(surface.ServiceContainer.GetService(typeof(object)));
System\ComponentModel\Design\DesignSurfaceTests.cs (18)
216ISelectionService service = Assert.IsAssignableFrom<ISelectionService>(container.GetService(typeof(ISelectionService))); 226Assert.IsAssignableFrom<IExtenderProviderService>(container.GetService(typeof(IExtenderProviderService))); 234Assert.IsAssignableFrom<IExtenderListService>(container.GetService(typeof(IExtenderListService))); 235Assert.IsAssignableFrom<IExtenderProviderService>(container.GetService(typeof(IExtenderListService))); 243Assert.IsAssignableFrom<ITypeDescriptorFilterService>(container.GetService(typeof(ITypeDescriptorFilterService))); 251Assert.IsAssignableFrom<IReferenceService>(container.GetService(typeof(IReferenceService))); 259Assert.Same(surface, container.GetService(typeof(DesignSurface))); 267Assert.Same(container, container.GetService(container.GetType())); 284Assert.Same(surface.Host, container.GetService(serviceType)); 307Assert.NotNull(container.GetService(serviceType)); 309Assert.Null(container.GetService(serviceType)); 313Assert.Null(container.GetService(serviceType)); 1180Assert.Same(surface, container.GetService(typeof(DesignSurface))); 1183Assert.Null(container.GetService(typeof(DesignSurface))); 1271Assert.Same(surface, container.GetService(typeof(DesignSurface))); 1274Assert.Null(container.GetService(typeof(DesignSurface))); 1282Assert.Same(surface, container.GetService(typeof(DesignSurface))); 1285Assert.Same(surface, container.GetService(typeof(DesignSurface)));