32 references to TryGetService
System.Windows.Forms (5)
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (4)
258if (_designerHost.TryGetService(out IComponentChangeService? changeService)) 265if (_designerHost.TryGetService(out IPropertyValueUIService? propertyValueService)) 280if (value.TryGetService(out IComponentChangeService? changeService)) 291if (value.TryGetService(out IPropertyValueUIService? propertyValueService))
System\Windows\Forms\Design\EventsTab.cs (1)
68if (_currentHost.TryGetService(out IEventBindingService? hostEventBindingService))
System.Windows.Forms.Design (27)
System\ComponentModel\Design\CollectionEditor.cs (1)
251if (host.TryGetService(out changeService))
System\ComponentModel\Design\DesignerHost.cs (23)
78if (this.TryGetService(out DesignSurfaceServiceContainer? dsc)) 87if (this.TryGetService(out IServiceContainer? sc)) 120this.TryGetService(out _typeService); 235&& this.TryGetService(out IExtenderProviderService? eps)) 285if (this.TryGetService(out eps)) 317if (loader is IExtenderProvider extenderProvider && this.TryGetService(out IExtenderProviderService? eps)) 322if (this.TryGetService(out IDesignerEventService? des)) 383this.TryGetService(out INameCreationService? nameCreate); 447if (this.TryGetService(out DesignSurfaceServiceContainer? dsc)) 456if (this.TryGetService(out IServiceContainer? sc)) 636if (component is IExtenderProvider extenderComponent && this.TryGetService(out IExtenderProviderService? eps)) 644if (designer is IExtenderProvider extenderDesigner && this.TryGetService(out eps)) 691if (this.TryGetService(out IHelpService? helpService) 1033if (this.TryGetService(out ITypeResolutionService? ts)) 1094if (this.TryGetService(out IHelpService? helpService)) 1127if (successful && _savedSelection is not null && this.TryGetService(out ISelectionService? ss)) 1161if (this.TryGetService(out ISelectionService? ss)) 1257ObjectDisposedException.ThrowIf(!this.TryGetService(out IServiceContainer? sc), typeof(IServiceContainer)); 1263ObjectDisposedException.ThrowIf(!this.TryGetService(out IServiceContainer? sc), typeof(IServiceContainer)); 1269ObjectDisposedException.ThrowIf(!this.TryGetService(out IServiceContainer? sc), typeof(IServiceContainer)); 1275ObjectDisposedException.ThrowIf(!this.TryGetService(out IServiceContainer? sc), typeof(IServiceContainer)); 1281ObjectDisposedException.ThrowIf(!this.TryGetService(out IServiceContainer? sc), typeof(IServiceContainer)); 1287ObjectDisposedException.ThrowIf(!this.TryGetService(out IServiceContainer? sc), typeof(IServiceContainer));
System\Drawing\Design\ToolboxItem.cs (1)
452if (host.TryGetService(out ITypeResolutionService? ts))
System\Windows\Forms\Design\DesignerUtils.cs (1)
627if (!host.TryGetService(out INameCreationService? nameCreationService))
System\Windows\Forms\Design\OleDragDropHandler.CfCodeToolboxItem.cs (1)
73if (!host.TryGetService(out IDesignerSerializationService? ds) || _serializationData is null)