130 references to TryGetService
System.Windows.Forms (29)
System\Windows\Forms\ActiveX\AxHost.AxContainer.cs (3)
141
if (site.
TryGetService
(out IComponentChangeService? changeService))
296
|| !site.
TryGetService
(out ISelectionService? selectionService)
405
if (site.
TryGetService
(out IComponentChangeService? changeService))
System\Windows\Forms\ActiveX\AxHost.cs (7)
826
if (Site.
TryGetService
(out ISelectionService? selectionService))
854
if (Site.
TryGetService
(out ISelectionService? selectionService))
969
if (IsUserMode() || !Site.
TryGetService
(out ISelectionService? selectionService))
1990
if (Site.
TryGetService
(out IDesignerHost? host) && host.RootComponent is ContainerControl rootControl)
2392
if (Site.
TryGetService
(out ISelectionService? selectionService) && selectionService.GetComponentSelected(this))
2988
if (Site.
TryGetService
(out IComponentChangeService? changeService))
3019
Site.
TryGetService
(out IDesignerHost? host);
System\Windows\Forms\ActiveX\AxHost.OleInterfaces.cs (1)
511
if (_host.Site.
TryGetService
(out IComponentChangeService? changeService))
System\Windows\Forms\ComponentModel\COM2Interop\COM2PropertyPageUITypeConverter.cs (2)
32
if (!provider.
TryGetService
(out ICom2PropertyPageDisplayService? propertyPageService))
53
if (provider.
TryGetService
(out IUIService? uiService))
System\Windows\Forms\Control.cs (2)
5363
&& site.
TryGetService
(out IDesignerHost? host)
12715
if (site is not null && site.DesignMode && site.
TryGetService
(out changeService))
System\Windows\Forms\Controls\ListView\ListView.cs (1)
6201
if (site?.
TryGetService
(out IComponentChangeService? service) == true)
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (3)
1752
if (site.
TryGetService
(out IMenuCommandService? menuCommandService))
1762
if (_selectedObjects.Length == 1 && site.
TryGetService
(out IDesignerHost? designerHost))
3152
&& site.
TryGetService
(out IComponentChangeService? changeService))
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (1)
5081
if (_helpService is null && ServiceProvider.
TryGetService
(out _topHelpService!))
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (2)
798
if (Site.
TryGetService
(out IComponentChangeService? changeService))
1140
if (Site.
TryGetService
(out IDesignerHost? host) && host.RootComponent is ContainerControl rootContainerControl)
System\Windows\Forms\Controls\WebBrowser\WebBrowserContainer.cs (2)
284
if (site.
TryGetService
(out IComponentChangeService? service))
318
if (site.
TryGetService
(out IComponentChangeService? service))
System\Windows\Forms\Controls\WebBrowser\WebBrowserSiteBase.cs (1)
357
if (Host.Site.
TryGetService
(out IComponentChangeService? changeService))
System\Windows\Forms\Design\ComponentEditorForm.cs (2)
78
if (_component.Site.
TryGetService
(out IComponentChangeService? changeService))
170
if (_component.Site?.
TryGetService
(out IUIService? uiService) == true)
System\Windows\Forms\Design\EventsTab.cs (2)
60
if (_serviceProvider.
TryGetService
(out IDesignerEventService? designerEventService))
75
if (component.Site.
TryGetService
(out IEventBindingService? siteEventBindingService))
System.Windows.Forms.Design (101)
System\ComponentModel\Design\BinaryEditor.cs (1)
104
if (!provider.
TryGetService
(out IWindowsFormsEditorService? editorService))
System\ComponentModel\Design\CollectionEditor.cs (1)
221
if (!provider.
TryGetService
(out IWindowsFormsEditorService? editorService))
System\ComponentModel\Design\DateTimeEditor.cs (1)
17
if (!provider.
TryGetService
(out IWindowsFormsEditorService? editorService))
System\ComponentModel\Design\DesignerActionService.cs (5)
39
if (serviceProvider.
TryGetService
(out IComponentChangeService? componentChangeService))
136
if (_serviceProvider.
TryGetService
(out IComponentChangeService? componentChangeService))
176
if (serviceContainer.
TryGetService
(out DesignerCommandSet? designerCommandSet))
374
if (_serviceProvider.
TryGetService
(out DesignerActionUIService? designerActionUIService))
381
if (_serviceProvider.
TryGetService
(out DesignerActionUIService? designerActionUIService))
System\ComponentModel\Design\DesignerActionUI.cs (9)
57
if (!serviceProvider.
TryGetService
(out BehaviorService? behaviorService) ||
58
!serviceProvider.
TryGetService
(out ISelectionService? selectionService))
68
if (!serviceProvider.
TryGetService
(out DesignerActionService? designerActionService))
75
if (!serviceProvider.
TryGetService
(out DesignerActionUIService? designerActionUIService))
88
if (serviceProvider.
TryGetService
(out IComponentChangeService? cs))
99
if (serviceProvider.
TryGetService
(out IUIService? uiService))
123
if (_serviceProvider.
TryGetService
(out IComponentChangeService? cs))
538
if (_serviceProvider.
TryGetService
(out IDesignerHost? host) && host.InTransaction)
549
if (_serviceProvider.
TryGetService
(out IDesignerHost? host))
System\ComponentModel\Design\DesignerEventService.cs (1)
106
if (comp.Site.
TryGetService
(out ISelectionService? ss) && ss.GetComponentSelected(comp))
System\ComponentModel\Design\DesignerHost.Site.cs (1)
248
if (validateName && this.
TryGetService
(out INameCreationService? nameService))
System\ComponentModel\Design\EventBindingService.EventPropertyDescriptor.cs (4)
161
if (site is null && _eventService._provider.
TryGetService
(out IReferenceService? referenceService))
180
if (!site.
TryGetService
(out IDictionaryService? dictionaryService))
213
if (site.
TryGetService
(out IDesignerHost? host))
223
if (site.
TryGetService
(out IComponentChangeService? changeService))
System\ComponentModel\Design\MultilineStringEditor.cs (1)
19
if (!provider.
TryGetService
(out IWindowsFormsEditorService? editorService))
System\ComponentModel\Design\ObjectSelectorEditor.cs (1)
29
if (!provider.
TryGetService
(out IWindowsFormsEditorService? editorService))
System\ComponentModel\Design\ReferenceService.cs (1)
194
if (_provider.
TryGetService
(out IComponentChangeService? cs))
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.CodeDomSerializationStore.ComponentListCodeDomSerializer.cs (3)
162
if (manager.
TryGetService
(out MemberRelationshipService? relationships) && relationships[comp, prop] != MemberRelationship.Empty)
233
if (!site.
TryGetService
(out INestedContainer? container))
478
if (c.Site.
TryGetService
(out INestedContainer? nested) && nested.Components.Count > 0)
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.ModifiersExtenderProvider.cs (3)
69
if (comp.Site.
TryGetService
(out IDictionaryService? dictionary))
95
if (comp.Site.
TryGetService
(out IDictionaryService? dictionary))
168
if (comp.Site.
TryGetService
(out IDictionaryService? dictionary))
System\ComponentModel\Design\Serialization\CodeDomLocalizationProvider.LanguageExtenders.cs (3)
52
if (site.
TryGetService
(out IComponentChangeService? changeService)
53
&& site.
TryGetService
(out IContainer? container))
160
if (_serviceProvider.
TryGetService
(out IDesignerLoaderService? ls))
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (2)
102
if (provider.
TryGetService
(out TypeDescriptionProviderService? service))
1584
if (manager.
TryGetService
(out MemberRelationshipService? relationships))
System\ComponentModel\Design\Serialization\ComponentCache.cs (4)
28
if (manager.
TryGetService
(out DesignerOptionService? options))
105
if (_serManager.
TryGetService
(out IComponentChangeService? cs))
132
if (_serManager.
TryGetService
(out IReferenceService? rs))
165
if (_serManager.
TryGetService
(out IReferenceService? rs))
System\ComponentModel\Design\Serialization\ResourceCodeDomSerializer.SerializationResourceManager.cs (4)
114
if (_manager.
TryGetService
(out IResourceService? rs))
393
if (_manager.
TryGetService
(out IResourceService? resSvc))
463
if (_manager.
TryGetService
(out IResourceService? service))
734
if (nameBase is null && manager.
TryGetService
(out IReferenceService? referenceService))
System\ComponentModel\Design\TypeDescriptorFilterService.cs (1)
27
if (site.
TryGetService
(out IDesignerHost? host))
System\Drawing\Design\ColorEditor.cs (1)
21
if (!provider.
TryGetService
(out IWindowsFormsEditorService? editorService))
System\Drawing\Design\ContentAlignmentEditor.cs (1)
21
if (!provider.
TryGetService
(out IWindowsFormsEditorService? editorService))
System\Drawing\Design\CursorEditor.cs (1)
24
if (!provider.
TryGetService
(out IWindowsFormsEditorService? editorService))
System\Drawing\Design\FontEditor.cs (1)
21
if (!provider.
TryGetService
(out IWindowsFormsEditorService? _))
System\Drawing\Design\IconEditor.cs (1)
58
if (!provider.
TryGetService
(out IWindowsFormsEditorService? _))
System\Drawing\Design\ImageEditor.cs (1)
65
if (!provider.
TryGetService
(out IWindowsFormsEditorService? _))
System\Windows\Forms\Design\AnchorEditor.cs (1)
19
if (!provider.
TryGetService
(out IWindowsFormsEditorService? editorService))
System\Windows\Forms\Design\BaseContextMenuStrip.cs (4)
156
if (_serviceProvider.
TryGetService
(out IMenuCommandService? menuCommandService))
200
if (_serviceProvider.
TryGetService
(out IUIService? uis))
237
if (_serviceProvider.
TryGetService
(out IUIService? uis))
321
if (_comp is not null && _serviceProvider.
TryGetService
(out ISelectionService? selectionService))
System\Windows\Forms\Design\Behavior\ContainerSelectorBehavior.cs (4)
52
if (!serviceProvider.
TryGetService
(out BehaviorService? behaviorService))
95
if (_serviceProvider.
TryGetService
(out ISelectionService? selSvc)
208
if (!_serviceProvider.
TryGetService
(out ISelectionService? selSvc)
209
|| !_serviceProvider.
TryGetService
(out IDesignerHost? host))
System\Windows\Forms\Design\Behavior\DesignerActionBehavior.cs (1)
122
if (_serviceProvider.
TryGetService
(out ISelectionService? selectionService) &&
System\Windows\Forms\Design\Behavior\SelectionManager.cs (2)
71
if (_serviceProvider.
TryGetService
(out IComponentChangeService? cs))
189
if (_serviceProvider.
TryGetService
(out IComponentChangeService? cs))
System\Windows\Forms\Design\Behavior\ToolboxItemSnapLineBehavior.cs (1)
340
if (_serviceProvider.
TryGetService
(out IDesignerHost? host))
System\Windows\Forms\Design\BorderSidesEditor.cs (1)
19
if (!provider.
TryGetService
(out IWindowsFormsEditorService? editorService))
System\Windows\Forms\Design\CommandSet.cs (3)
66
if (site.
TryGetService
(out IDesignerHost? host))
376
if (site.
TryGetService
(out IDesignerHost? host))
2477
if (site.
TryGetService
(out IDesignerHost? host))
System\Windows\Forms\Design\ComponentTray.cs (3)
2029
if (site.
TryGetService
(out IComponentChangeService cs))
2034
if (site.
TryGetService
(out IDictionaryService ds))
2054
if (component.Site.
TryGetService
(out IDictionaryService ds))
System\Windows\Forms\Design\ControlCommandSet.cs (2)
1254
if (site.
TryGetService
(out IDesignerHost host)
1271
if (site.
TryGetService
(out IDesignerHost host)
System\Windows\Forms\Design\DataGridViewAddColumnDialog.cs (4)
56
if (_liveDataGridView.Site.
TryGetService
(out IUIService? uiService))
520
if (!_liveDataGridView.Site.
TryGetService
(out IComponentChangeService? changeService))
635
if (_liveDataGridView.Site.
TryGetService
(out IDesignerHost? host))
660
if (!_liveDataGridView.Site.
TryGetService
(out IDesignerHost? host))
System\Windows\Forms\Design\DataGridViewColumnCollectionEditor.cs (2)
18
!provider.
TryGetService
(out IWindowsFormsEditorService? editorService) ||
20
!provider.
TryGetService
(out IDesignerHost? host))
System\Windows\Forms\Design\DataGridViewDesigner.cs (3)
96
if (dataGridView.Site.
TryGetService
(out IComponentChangeService? ccs))
118
if (component.Site.
TryGetService
(out IComponentChangeService? componentChangeService))
797
if (Component.Site.
TryGetService
(out IUIService? service))
System\Windows\Forms\Design\DesignerFrame.cs (1)
140
if (_designerSite.
TryGetService
(out IComponentChangeService? changeService))
System\Windows\Forms\Design\DesignerUtils.cs (3)
352
if (provider.
TryGetService
(out DesignerOptionService? options))
371
if (provider.
TryGetService
(out DesignerOptionService? designerOptionService))
377
return provider.
TryGetService
(out IDesignerOptionService? optionService)
System\Windows\Forms\Design\DockEditor.cs (1)
19
if (!provider.
TryGetService
(out IWindowsFormsEditorService? editorService))
System\Windows\Forms\Design\FileNameEditor.cs (1)
19
if (!provider.
TryGetService
(out IWindowsFormsEditorService? _))
System\Windows\Forms\Design\FormatStringEditor.cs (2)
17
if (!provider.
TryGetService
(out IWindowsFormsEditorService? editorService))
43
if (provider.
TryGetService
(out IComponentChangeService? changeService))
System\Windows\Forms\Design\ImageListImageEditor.cs (1)
32
if (!provider.
TryGetService
(out IWindowsFormsEditorService? _))
System\Windows\Forms\Design\LinkAreaEditor.cs (1)
19
if (!provider.
TryGetService
(out IWindowsFormsEditorService? editorService))
System\Windows\Forms\Design\MaskedTextBoxTextEditor.cs (1)
13
if (context?.Instance is null || !provider.
TryGetService
(out IWindowsFormsEditorService? editorService))
System\Windows\Forms\Design\NewItemsContextMenuStrip.cs (1)
28
if (serviceProvider.
TryGetService
(out IUIService? uis))
System\Windows\Forms\Design\OleDragDropHandler.ComponentDataObject.cs (2)
88
if (!_serviceProvider.
TryGetService
(out ISelectionService? selectionService))
229
if (host is null && removeComp.Site.
TryGetService
(out host))
System\Windows\Forms\Design\ShortcutKeysEditor.cs (1)
23
if (!provider.
TryGetService
(out IWindowsFormsEditorService? editorService))
System\Windows\Forms\Design\StandardCommandToolStripMenuItem.cs (1)
65
if (_menuCommandService is null && _serviceProvider.
TryGetService
(out IMenuCommandService? menuCommandService))
System\Windows\Forms\Design\ToolStripItemBehavior.cs (1)
676
if (currentDropItem.Site.
TryGetService
(out IComponentChangeService changeService))
System\Windows\Forms\Design\TreeNodeCollectionEditor.cs (1)
146
TreeView.Site.
TryGetService
(out IDictionaryService dictionaryService);