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)
1106Assert.Same(service, otherContainer.GetService(typeof(object))); 1208Assert.Same(service, otherContainer.GetService(typeof(object))); 1731Assert.Same(service, surface.ServiceContainer.GetService(typeof(object))); 1745Assert.Same(service, surface.ServiceContainer.GetService(typeof(object))); 1759Assert.Same(service, surface.ServiceContainer.GetService(typeof(object))); 1774Assert.Same(service, surface.ServiceContainer.GetService(typeof(object))); 2890Assert.Null(surface.ServiceContainer.GetService(typeof(object))); 2904Assert.Null(surface.ServiceContainer.GetService(typeof(object)));
System\ComponentModel\Design\DesignSurfaceTests.cs (18)
214ISelectionService service = Assert.IsAssignableFrom<ISelectionService>(container.GetService(typeof(ISelectionService))); 224Assert.IsAssignableFrom<IExtenderProviderService>(container.GetService(typeof(IExtenderProviderService))); 232Assert.IsAssignableFrom<IExtenderListService>(container.GetService(typeof(IExtenderListService))); 233Assert.IsAssignableFrom<IExtenderProviderService>(container.GetService(typeof(IExtenderListService))); 241Assert.IsAssignableFrom<ITypeDescriptorFilterService>(container.GetService(typeof(ITypeDescriptorFilterService))); 249Assert.IsAssignableFrom<IReferenceService>(container.GetService(typeof(IReferenceService))); 257Assert.Same(surface, container.GetService(typeof(DesignSurface))); 265Assert.Same(container, container.GetService(container.GetType())); 282Assert.Same(surface.Host, container.GetService(serviceType)); 305Assert.NotNull(container.GetService(serviceType)); 307Assert.Null(container.GetService(serviceType)); 311Assert.Null(container.GetService(serviceType)); 1178Assert.Same(surface, container.GetService(typeof(DesignSurface))); 1181Assert.Null(container.GetService(typeof(DesignSurface))); 1269Assert.Same(surface, container.GetService(typeof(DesignSurface))); 1272Assert.Null(container.GetService(typeof(DesignSurface))); 1280Assert.Same(surface, container.GetService(typeof(DesignSurface))); 1283Assert.Same(surface, container.GetService(typeof(DesignSurface)));