32 references to TryGetService
System.Windows.Forms (5)
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (4)
258
if (_designerHost.
TryGetService
(out IComponentChangeService? changeService))
265
if (_designerHost.
TryGetService
(out IPropertyValueUIService? propertyValueService))
280
if (value.
TryGetService
(out IComponentChangeService? changeService))
291
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))
285
if (this.
TryGetService
(out eps))
317
if (loader is IExtenderProvider extenderProvider && this.
TryGetService
(out IExtenderProviderService? eps))
322
if (this.
TryGetService
(out IDesignerEventService? des))
383
this.
TryGetService
(out INameCreationService? nameCreate);
447
if (this.
TryGetService
(out DesignSurfaceServiceContainer? dsc))
456
if (this.
TryGetService
(out IServiceContainer? sc))
636
if (component is IExtenderProvider extenderComponent && this.
TryGetService
(out IExtenderProviderService? eps))
644
if (designer is IExtenderProvider extenderDesigner && this.
TryGetService
(out eps))
691
if (this.
TryGetService
(out IHelpService? helpService)
1033
if (this.
TryGetService
(out ITypeResolutionService? ts))
1094
if (this.
TryGetService
(out IHelpService? helpService))
1127
if (successful && _savedSelection is not null && this.
TryGetService
(out ISelectionService? ss))
1161
if (this.
TryGetService
(out ISelectionService? ss))
1257
ObjectDisposedException.ThrowIf(!this.
TryGetService
(out IServiceContainer? sc), typeof(IServiceContainer));
1263
ObjectDisposedException.ThrowIf(!this.
TryGetService
(out IServiceContainer? sc), typeof(IServiceContainer));
1269
ObjectDisposedException.ThrowIf(!this.
TryGetService
(out IServiceContainer? sc), typeof(IServiceContainer));
1275
ObjectDisposedException.ThrowIf(!this.
TryGetService
(out IServiceContainer? sc), typeof(IServiceContainer));
1281
ObjectDisposedException.ThrowIf(!this.
TryGetService
(out IServiceContainer? sc), typeof(IServiceContainer));
1287
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)