32 references to TryGetService
System.Windows.Forms (5)
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (4)
256if (_designerHost.TryGetService(out IComponentChangeService? changeService)) 263if (_designerHost.TryGetService(out IPropertyValueUIService? propertyValueService)) 278if (value.TryGetService(out IComponentChangeService? changeService)) 289if (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)) 289if (this.TryGetService(out eps)) 321if (loader is IExtenderProvider extenderProvider && this.TryGetService(out IExtenderProviderService? eps)) 326if (this.TryGetService(out IDesignerEventService? des)) 387this.TryGetService(out INameCreationService? nameCreate); 454if (this.TryGetService(out DesignSurfaceServiceContainer? dsc)) 463if (this.TryGetService(out IServiceContainer? sc)) 643if (component is IExtenderProvider extenderComponent && this.TryGetService(out IExtenderProviderService? eps)) 651if (designer is IExtenderProvider extenderDesigner && this.TryGetService(out eps)) 698if (this.TryGetService(out IHelpService? helpService) 1040if (this.TryGetService(out ITypeResolutionService? ts)) 1101if (this.TryGetService(out IHelpService? helpService)) 1134if (successful && _savedSelection is not null && this.TryGetService(out ISelectionService? ss)) 1168if (this.TryGetService(out ISelectionService? ss)) 1264ObjectDisposedException.ThrowIf(!this.TryGetService(out IServiceContainer? sc), typeof(IServiceContainer)); 1270ObjectDisposedException.ThrowIf(!this.TryGetService(out IServiceContainer? sc), typeof(IServiceContainer)); 1276ObjectDisposedException.ThrowIf(!this.TryGetService(out IServiceContainer? sc), typeof(IServiceContainer)); 1282ObjectDisposedException.ThrowIf(!this.TryGetService(out IServiceContainer? sc), typeof(IServiceContainer)); 1288ObjectDisposedException.ThrowIf(!this.TryGetService(out IServiceContainer? sc), typeof(IServiceContainer)); 1294ObjectDisposedException.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)