32 references to TryGetService
System.Windows.Forms (5)
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (4)
256
if (_designerHost.
TryGetService
(out IComponentChangeService? changeService))
263
if (_designerHost.
TryGetService
(out IPropertyValueUIService? propertyValueService))
278
if (value.
TryGetService
(out IComponentChangeService? changeService))
289
if (value.
TryGetService
(out IPropertyValueUIService? propertyValueService))
System\Windows\Forms\Design\EventsTab.cs (1)
68
if (_currentHost.
TryGetService
(out IEventBindingService? hostEventBindingService))
System.Windows.Forms.Design (27)
System\ComponentModel\Design\CollectionEditor.cs (1)
251
if (host.
TryGetService
(out changeService))
System\ComponentModel\Design\DesignerHost.cs (23)
78
if (this.
TryGetService
(out DesignSurfaceServiceContainer? dsc))
87
if (this.
TryGetService
(out IServiceContainer? sc))
120
this.
TryGetService
(out _typeService);
235
&& this.
TryGetService
(out IExtenderProviderService? eps))
289
if (this.
TryGetService
(out eps))
321
if (loader is IExtenderProvider extenderProvider && this.
TryGetService
(out IExtenderProviderService? eps))
326
if (this.
TryGetService
(out IDesignerEventService? des))
387
this.
TryGetService
(out INameCreationService? nameCreate);
454
if (this.
TryGetService
(out DesignSurfaceServiceContainer? dsc))
463
if (this.
TryGetService
(out IServiceContainer? sc))
643
if (component is IExtenderProvider extenderComponent && this.
TryGetService
(out IExtenderProviderService? eps))
651
if (designer is IExtenderProvider extenderDesigner && this.
TryGetService
(out eps))
698
if (this.
TryGetService
(out IHelpService? helpService)
1040
if (this.
TryGetService
(out ITypeResolutionService? ts))
1101
if (this.
TryGetService
(out IHelpService? helpService))
1134
if (successful && _savedSelection is not null && this.
TryGetService
(out ISelectionService? ss))
1168
if (this.
TryGetService
(out ISelectionService? ss))
1264
ObjectDisposedException.ThrowIf(!this.
TryGetService
(out IServiceContainer? sc), typeof(IServiceContainer));
1270
ObjectDisposedException.ThrowIf(!this.
TryGetService
(out IServiceContainer? sc), typeof(IServiceContainer));
1276
ObjectDisposedException.ThrowIf(!this.
TryGetService
(out IServiceContainer? sc), typeof(IServiceContainer));
1282
ObjectDisposedException.ThrowIf(!this.
TryGetService
(out IServiceContainer? sc), typeof(IServiceContainer));
1288
ObjectDisposedException.ThrowIf(!this.
TryGetService
(out IServiceContainer? sc), typeof(IServiceContainer));
1294
ObjectDisposedException.ThrowIf(!this.
TryGetService
(out IServiceContainer? sc), typeof(IServiceContainer));
System\Drawing\Design\ToolboxItem.cs (1)
452
if (host.
TryGetService
(out ITypeResolutionService? ts))
System\Windows\Forms\Design\DesignerUtils.cs (1)
627
if (!host.
TryGetService
(out INameCreationService? nameCreationService))
System\Windows\Forms\Design\OleDragDropHandler.CfCodeToolboxItem.cs (1)
73
if (!host.
TryGetService
(out IDesignerSerializationService? ds) || _serializationData is null)