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