7 implementations of Site
System.ComponentModel.Primitives (1)
System\ComponentModel\Component.cs (1)
62public virtual ISite? Site
System.ComponentModel.TypeConverter (1)
System\ComponentModel\MarshalByValueComponent.cs (1)
54public virtual ISite? Site
System.Windows.Forms (2)
System\Windows\Forms\Control.cs (1)
2926public override ISite? Site
System\Windows\Forms\Controls\DataGridView\DataGridViewColumn.cs (1)
696public ISite? Site { get; set; }
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (1)
1306ISite? IComponent.Site
System.Windows.Forms.Tests (2)
System\Windows\Forms\LayoutEventArgsTests.cs (1)
91public ISite Site { get; set; }
System\Windows\Forms\ListControlTests.cs (1)
2872public ISite Site { get; set; }
6 writes to Site
System.ComponentModel.TypeConverter (3)
System\ComponentModel\Container.cs (3)
72component.Site = newSite; 121site.Component.Site = null; 195component!.Site = null;
System.Windows.Forms.Design (1)
System\ComponentModel\Design\DesignerHost.cs (1)
690component.Site = null;
System.Windows.Forms.Design.Tests (2)
System\Windows\Forms\Design\MaskedTextBoxDesignerTests.cs (2)
110_maskedTextBoxDesigner.Component.Site = mockMockSite.Object; 133_maskedTextBoxDesigner.Component.Site = mockMockSite.Object;
309 references to Site
System.ComponentModel.Primitives (3)
System\ComponentModel\ComponentCollection.cs (3)
25if (comp != null && comp.Site != null && comp.Site.Name != null && string.Equals(comp.Site.Name, name, StringComparison.OrdinalIgnoreCase))
System.ComponentModel.TypeConverter (23)
System\ComponentModel\ComponentResourceManager.cs (1)
132ISite? site = ((IComponent)value).Site;
System\ComponentModel\Container.cs (2)
45ISite? site = component.Site; 187ISite? site = component?.Site;
System\ComponentModel\MemberDescriptor.cs (1)
444protected static ISite? GetSite(object? component) => (component as IComponent)?.Site;
System\ComponentModel\NestedContainer.cs (5)
45if (Owner != null && Owner.Site != null) 47if (Owner.Site is INestedSite nestedOwnerSite) 53ownerName = Owner.Site.Name; 132if (owner != null && owner.Site != null) 134return owner.Site.DesignMode;
System\ComponentModel\ReferenceConverter.cs (1)
103ISite? site = comp.Site;
System\ComponentModel\ReflectPropertyDescriptor.cs (1)
925ISite? site = comp?.Site;
System\ComponentModel\ReflectTypeDescriptionProvider.cs (6)
322if (comp != null && comp.Site != null) 324IDictionaryService? ds = comp.Site.GetService(typeof(IDictionaryService)) as IDictionaryService; 654if (component != null && component.Site != null) 656IExtenderListService? extenderList = component.Site.GetService(typeof(IExtenderListService)) as IExtenderListService; 665IContainer? cont = component.Site.Container; 848INestedSite? ns = comp?.Site as INestedSite;
System\ComponentModel\ReflectTypeDescriptionProvider.ReflectedTypeData.cs (1)
163ISite? site = comp?.Site;
System\ComponentModel\TypeDescriptor.cs (5)
648ISite? site = component.Site; 1280if (prov is IComponent component && component.Site != null) 1282name = component.Site.Name; 1954ISite? site = component?.Site; 2554ISite? site = component.Site;
System.Configuration.ConfigurationManager (2)
System\Configuration\ApplicationSettingsBase.cs (2)
66if (owner.Site != null) 68ISettingsProviderService providerService = owner.Site.GetService(typeof(ISettingsProviderService)) as ISettingsProviderService;
System.Windows.Forms (29)
System\Windows\Forms\ActiveX\AxHost.AxContainer.cs (1)
324if (component is Control control && component != _parent && component.Site is not null)
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (5)
1068&& component.Site is not null 1484if (@object is IComponent component && component.Site is ISite site) 1756if (component?.Site is ISite site) 2995if (SelectedObject is IComponent currentSelection && currentSelection.Site is null) 3157&& component.Site is ISite site
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CommandsPane.cs (1)
18/// <see cref="DesignerVerb"/> commands are found by looking for services on <see cref="IComponent.Site"/>.
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (1)
176public virtual IContainer? Container => Component?.Site?.Container;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\MultiPropertyDescriptorGridEntry.cs (4)
44if (component.Site is not null) 48container = component.Site.Container; 51else if (container == component.Site.Container) 279bool needChangeNotify = objects[0] is not IComponent component || component.Site is null;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyDescriptorGridEntry.cs (3)
576bool needChangeNotify = owner is not IComponent component || component.Site is null; 846string componentName = component.Site?.Name ?? component.GetType().Name; 852_eventBindings ??= component.Site?.GetService<IEventBindingService>();
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\SingleSelectRootGridEntry.cs (1)
168return component.Site?.Name ?? Target.GetType().Name;
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.StubSite.cs (6)
39IContainer? ISite.Container => _owner.Site?.Container; 44bool ISite.DesignMode => _owner.Site?.DesignMode ?? false; 52get => _owner.Site?.Name; 57if (_owner.Site is not null) 59_owner.Site.Name = value; 74return service == typeof(IDictionaryService) ? this : _owner.Site?.GetService(service);
System\Windows\Forms\Controls\WebBrowser\WebBrowserContainer.cs (1)
217if (comp is Control ctrl && comp != _parent && comp.Site is not null)
System\Windows\Forms\DataBinding\Binding.cs (1)
576return comp.Site?.DesignMode ?? false;
System\Windows\Forms\Design\ComponentEditorForm.cs (3)
78if (_component.Site.TryGetService(out IComponentChangeService? changeService)) 170if (_component.Site?.TryGetService(out IUIService? uiService) == true) 223ISite? site = _component.Site;
System\Windows\Forms\Design\EventsTab.cs (1)
75if (component.Site.TryGetService(out IEventBindingService? siteEventBindingService))
System\Windows\Forms\Internal\WinFormsUtils.cs (1)
323return component.Site?.Name ?? string.Empty;
System.Windows.Forms.Design (204)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (1)
249if (_createdItems is [IComponent { Site: not null }, ..])
System\ComponentModel\Design\CollectionEditor.cs (1)
307if (item is not IComponent { Site: null } component)
System\ComponentModel\Design\ComponentDesigner.cs (8)
38if (_component?.Site is { } site) 385if (component.Site is IServiceContainer sc && GetService(typeof(DesignerCommandSet)) is null) 503Debug.Assert(Component.Site is not null); 506settingsKeyName = $"{rootComponent.Site!.Name}.{Component.Site.Name}"; 510settingsKeyName = Component.Site.Name; 557protected virtual object? GetService(Type serviceType) => _component?.Site?.GetService(serviceType); 564ISite componentSite = Component.Site ?? throw new InvalidOperationException("Component should have a site");
System\ComponentModel\Design\DesignerActionList.cs (1)
22public object? GetService(Type serviceType) => Component?.Site?.GetService(serviceType);
System\ComponentModel\Design\DesignerActionPanel.cs (1)
618IServiceProvider? serviceProvider = relatedComponent.Site;
System\ComponentModel\Design\DesignerActionService.cs (2)
175IServiceContainer? serviceContainer = component.Site as IServiceContainer; 244if (_selectionService?.PrimarySelection is IComponent { Site: IServiceContainer container } comp)
System\ComponentModel\Design\DesignerEventService.cs (2)
84if (ce.Component?.Site?.Container is IDesignerHost { Loading: true }) 106if (comp.Site.TryGetService(out ISelectionService? ss) && ss.GetComponentSelected(comp))
System\ComponentModel\Design\DesignerHost.cs (10)
205ISite? existingSite = component.Site; 259_rootComponentClassName ??= component.Site!.Name; 617Site? site = component.Site as Site; 634ISite? site = component.Site; 974if (component.Site is null || component.Site.Container != this) 1001string name = component.Site?.Name ?? component.GetType().Name; 1060else if (_rootComponent?.Site is not null) 1062_rootComponentClassName = _rootComponent.Site.Name; 1176if (item is IComponent component && component.Site?.Name is string name)
System\ComponentModel\Design\EventBindingService.EventPropertyDescriptor.cs (4)
83ISite? site = (component as IComponent)?.Site; 92site = baseComponent.Site; 159ISite? site = (component as IComponent)?.Site; 167site = baseComponent.Site;
System\ComponentModel\Design\InheritanceService.cs (1)
69ISite? site = component.Site;
System\ComponentModel\Design\ReferenceService.cs (4)
132if (compAdded.Site is not INestedSite) 147if (compRemoved.Site is not INestedSite) 320Debug.Assert(sitedComponent.Site is not null, $"Sited component is not really sited: {sitedComponent}"); 350Debug.Assert(SitedComponent.Site is not null, $"Sited component is not really sited: {SitedComponent}");
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.CodeDomSerializationStore.ComponentListCodeDomSerializer.cs (2)
232ISite? site = curComp?.Site; 478if (c.Site.TryGetService(out INestedContainer? nested) && nested.Components.Count > 0)
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.CodeDomSerializationStore.cs (1)
291ISite? site = comp.Site;
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.cs (1)
721string? name = e.Component!.Site!.Name;
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.ModifiersExtenderProvider.cs (5)
51_host ??= component.Site?.GetService<IDesignerHost>(); 69if (comp.Site.TryGetService(out IDictionaryService? dictionary)) 95if (comp.Site.TryGetService(out IDictionaryService? dictionary)) 122ISite? site = comp.Site; 168if (comp.Site.TryGetService(out IDictionaryService? dictionary))
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.ModifiersInheritedExtenderProvider.cs (2)
58_host ??= component.Site?.GetService<IDesignerHost>(); 80ISite? site = comp.Site;
System\ComponentModel\Design\Serialization\CodeDomLocalizationProvider.LanguageExtenders.cs (1)
50ISite? site = component.Site;
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (1)
1912if (GetReflectionTypeHelper(manager, value).IsSerializable && (value as IComponent)?.Site is null)
System\ComponentModel\Design\Serialization\ComponentCodeDomSerializer.cs (2)
58if (comp.Site is INestedSite nestedSite && !string.IsNullOrEmpty(nestedSite.FullName)) 161if (value is IComponent { Site: null })
System\ComponentModel\Design\Serialization\DesignerSerializationManager.cs (1)
839ISite? site = component.Site;
System\ComponentModel\Design\SiteNestedContainer.cs (2)
110if (Owner.Site is null || !_safeToCallOwner) 118return Owner.Site.GetService(serviceType);
System\ComponentModel\Design\TypeDescriptorFilterService.cs (1)
26ISite? site = component.Site;
System\ComponentModel\Design\UndoEngine.cs (1)
263ISite? site = comp.Site;
System\ComponentModel\Design\UndoEngine.UndoUnit.AddRemoveUndoEvent.cs (1)
28_componentName = component.Site!.Name;
System\ComponentModel\Design\UndoEngine.UndoUnit.cs (4)
38if (sel is IComponent { Site: ISite site }) 100if (e.Component!.Site?.Container is INestedContainer) 248if (e.Component is IComponent { Site: not null }) 335if (e.Component!.Site is INestedContainer)
System\ComponentModel\Design\UndoEngine.UndoUnit.RenameUndoEvent.cs (1)
33comp.Site!.Name = _before;
System\Windows\Forms\Design\BindingNavigatorDesigner.cs (1)
54IDesignerHost? host = Component?.Site?.GetService<IDesignerHost>();
System\Windows\Forms\Design\ChangeToolStripParentVerb.cs (1)
25_provider = designer.Component.Site;
System\Windows\Forms\Design\CollectionEditVerbManager.cs (4)
72if (_designer.Component.Site is not null) 74return _designer.Component.Site.Container; 139if (_designer.Component.Site is not null) 141return _designer.Component.Site.GetService(serviceType);
System\Windows\Forms\Design\CommandSet.cs (11)
524if (childComp.Site is not null) 785: host.CreateTransaction(string.Format(SR.DragDropMoveComponent, comp.Site?.Name)); 805if (invertSnap && useSnapLines && primaryControl is not null && comp.Site is not null) 810dragManager = new DragAssistanceManager(comp.Site, selComps); 1609if (obj is not IComponent comp || comp.Site is null) 1636if (obj is not IComponent c || c.Site is null) 1776if (component.Site is not null) 3007if (obj is IComponent { Site: { } objSite } && objSite.Container == host.Container) 3056if (obj is IComponent comp && (comp.Site is null || comp.Site.Container != host.Container)) 3164string? name = comp.Site?.Name;
System\Windows\Forms\Design\ComponentTray.cs (3)
1933ISite site = component.Site; 2026ISite site = _component.Site; 2054if (component.Site.TryGetService(out IDictionaryService ds))
System\Windows\Forms\Design\ControlCodeDomSerializer.cs (1)
267Debug.Assert(value is not IComponent { Site: not null }, "Unnamed, sited control in hierarchy");
System\Windows\Forms\Design\ControlCommandSet.cs (4)
370IContainer container = component.Site.Container; 604trans = host.CreateTransaction(string.Format(SR.DragDropSizeComponent, comp.Site.Name)); 629dragManager = new DragAssistanceManager(des.Component.Site, selComps); 1022INestedSite nestedSite = selComp.Site as INestedSite;
System\Windows\Forms\Design\ControlDesigner.cs (7)
160get => Component.Site?.Name; 165&& Component.Site is not null) 167Component.Site.Name = value; 669=> _moveBehavior ??= new ContainerSelectorBehavior(Control, Component.Site); 845internal virtual Behavior.Behavior StandardBehavior => _resizeBehavior ??= new ResizeBehavior(Component.Site); 1138ISite? site = Component.Site; 1198ISite? site = Component.Site;
System\Windows\Forms\Design\ControlDesigner.DesignerControlCollectionCodeDomSerializer.cs (1)
29if (val is IComponent { Site: not null and not INestedSite } comp)
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (1)
1185ISite? s = components[i]?.Site;
System\Windows\Forms\Design\DataGridViewColumnDesigner.cs (4)
83if ((host is null || (host is not null && !host.Loading)) && Component.Site is not null) 85Component.Site.Name = value; 141if (component.Site is not null) 244if (Component.Site is null)
System\Windows\Forms\Design\DataGridViewDesigner.cs (4)
119if (component.Site.TryGetService(out IComponentChangeService? componentChangeService)) 742IDesignerHost? host = Component.Site?.GetService<IDesignerHost>(); 770IDesignerHost? host = Component.Site?.GetService<IDesignerHost>(); 798if (Component.Site.TryGetService(out IUIService? service))
System\Windows\Forms\Design\DesignBindingPicker.cs (4)
529if (_designerHost is not null && _designerHost.RootComponent is not null && _designerHost.RootComponent.Site is not null) 531_instancesNode = new InstancesNode(_designerHost?.RootComponent.Site.Name); 683DataSourceNode dataSourceNode = new(this, dataSource, dataSource.Site?.Name); 1375ISite? site = component.Site;
System\Windows\Forms\Design\DesignBindingValueUIHandler.LocalUIItem.cs (1)
26if (binding.DataSource is IComponent comp && comp.Site is { } site)
System\Windows\Forms\Design\DesignerExtenders.NameExtenderProvider.cs (3)
31ISite? site = ((IComponent)o).Site; 78ISite? site = comp.Site; 93ISite? site = comp.Site;
System\Windows\Forms\Design\DesignerUtils.cs (2)
726container is NestedContainer nestedContainer ? (nestedContainer.Owner.Site?.Container) : container; 811if (childComp.Site is not null)
System\Windows\Forms\Design\DocumentDesigner.cs (9)
702_frame = new DesignerFrame(component.Site); 708_behaviorService = new BehaviorService(Component.Site, _frame); 740isvc.AddInheritedComponents(component, component.Site.Container); 749IPropertyValueUIService pvUISvc = (IPropertyValueUIService)component.Site.GetService(typeof(IPropertyValueUIService)); 774Debug.Assert(component.Site is not null, "Designer host should have given us a site by now."); 775_commandSet = new ControlCommandSet(component.Site); 781_pbrsFwd = new PbrsForward(_frame, component.Site); 903_componentTray = new ComponentTray(this, Component.Site); 1032return new ToolStripAdornerWindowService(Component.Site, _frame);
System\Windows\Forms\Design\EditorServiceContext.cs (2)
76IContainer? ITypeDescriptorContext.Container => _designer.Component.Site?.Container; 107return _designer.Component?.Site?.GetService(serviceType);
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (1)
629List<IComponent> tempList = DesignerUtils.CopyDragObjects(_dragControls, Component.Site);
System\Windows\Forms\Design\ListViewDesigner.cs (1)
157ShowErrorDialog(Component.Site.GetService<IUIService>(), ex, (ListView)Component);
System\Windows\Forms\Design\OleDragDropHandler.ComponentDataObject.cs (1)
229if (host is null && removeComp.Site.TryGetService(out host))
System\Windows\Forms\Design\OleDragDropHandler.cs (4)
668IContainer? container = host.RootComponent.Site!.Container; 682bool newContainer = dragOwner is null || Destination.Component is null || dragOwner.Site!.Container != Destination.Component.Site!.Container; 749name = comp.Site?.Name;
System\Windows\Forms\Design\ParentControlDesigner.cs (13)
120_defaultUseSnapLines = DesignerUtils.UseSnapLines(Component.Site); 348private IServiceProvider ServiceProvider => Component is not null ? Component.Site : (IServiceProvider)null; 616childSite = ((IComponent)children[i]).Site; 866IContainer container = Component.Site.Container; 1052ContainerSelectorBehavior behavior = new((Control)Component, Component.Site, true); 1221_statusCommandUI = new StatusCommandUI(component.Site); 1404if (target is not null && target.Component is not null && target.Component.Site is not null) 1406IContainer container = target.Component.Site.Container; 1590_toolboxItemSnapLineBehavior ??= new ToolboxItemSnapLineBehavior(Component.Site, BehaviorService, this, AllowGenericDragBox); 1931_dragManager = new DragAssistanceManager(Component.Site); 2309IContainer container = DesignerUtils.CheckForNestedContainer(Component.Site.Container); // ...necessary to support SplitterPanel components 2318if (component.Site is not null) 2320oldContainer = component.Site.Container;
System\Windows\Forms\Design\SelectionUIService.cs (4)
267if (objects[0] is IComponent { Site: { } site }) 291if (objects[0] is IComponent { Site: { } site }) 1124if (components.Length > 1 || (components.Length == 1 && comp is not null && comp.Site is null)) 1132trans = _host.CreateTransaction(string.Format(SR.DragDropMoveComponent, comp.Site!.Name));
System\Windows\Forms\Design\SplitContainerDesigner.cs (2)
239_designerHost = (IDesignerHost?)component.Site?.GetService(typeof(IDesignerHost)); 326var uiService = (IUIService?)Component?.Site?.GetService(typeof(IUIService));
System\Windows\Forms\Design\SplitterPanelDesigner.cs (1)
110_designerHost = (IDesignerHost?)component.Site?.GetService(typeof(IDesignerHost));
System\Windows\Forms\Design\StandardMenuStripVerb.cs (2)
32_provider = designer.Component.Site; 483string nameOfRandomItem = ToolStripDesigner.NameFromText(null, typeof(ToolStripMenuItem), _designer.Component.Site);
System\Windows\Forms\Design\TabControlDesigner.cs (3)
250t = host.CreateTransaction(string.Format(SR.TabControlAddTab, Component.Site.Name)); 345t = host.CreateTransaction(string.Format(SR.TabControlRemoveTab, ((IComponent)tp).Site.Name, Component.Site.Name));
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (4)
53private TableLayoutPanelBehavior Behavior => _tlpBehavior ??= new TableLayoutPanelBehavior(Table, this, Component.Site); 126_designerContextMenuStrip = new BaseContextMenuStrip(Component.Site); 564temp = DesignerUtils.CopyDragObjects(temp, Component.Site); 2232if (val is IComponent { Site: not null and not INestedSite } comp)
System\Windows\Forms\Design\ToolStripContentPanelDesigner.cs (1)
18if (_contextMenu is null && Component.Site is { } site)
System\Windows\Forms\Design\ToolStripDesigner.cs (6)
425_keyboardHandlingService ??= new ToolStripKeyboardHandlingService(Component.Site); 574IComponent component = _host.CreateComponent(t, NameFromText(text, t, Component.Site)); 1377ContainerSelectorBehavior behavior = new(ToolStrip, Component.Site, true); 1445new ToolStripKeyboardHandlingService(Component.Site); 1451new ToolStripInSituService(Component.Site); 1877components = DesignerUtils.CopyDragObjects(dragComponents, Component.Site);
System\Windows\Forms\Design\ToolStripDropDownDesigner.cs (6)
171ShadowProperties[SettingsKeyName] = $"{rootComponent.Site.Name}.{Component.Site.Name}"; 175ShadowProperties[SettingsKeyName] = Component.Site.Name; 354keyboardHandlingService ??= new ToolStripKeyboardHandlingService(component.Site); 358inSituService ??= new ToolStripInSituService(Component.Site); 394Name = Component.Site.Name
System\Windows\Forms\Design\ToolStripEditorManager.cs (2)
39_behaviorService = (BehaviorService)comp.Site.GetService(typeof(BehaviorService)); 40_designerHost = (IDesignerHost)comp.Site.GetService(typeof(IDesignerHost));
System\Windows\Forms\Design\ToolStripItemDesigner.cs (4)
81BaseContextMenuStrip toolStripContextMenu = new(Component.Site); 93_toolStripItemCustomMenuItemCollection ??= new ToolStripItemCustomMenuItemCollection(Component.Site, ToolStripItem); 677ISite site = Component.Site; 1216IDesignerHost designerHost = (IDesignerHost)Component.Site.GetService(typeof(IDesignerHost));
System\Windows\Forms\Design\ToolStripPanelDesigner.cs (8)
66ISite? site = Component.Site; 255if (_containerSelectorGlyph is null && Component.Site is not null) 258_behavior = new ToolStripPanelSelectionBehavior(Control, Component.Site); 259_containerSelectorGlyph = new ToolStripPanelSelectionGlyph(Rectangle.Empty, Cursors.Default, Control, Component.Site, _behavior); 286if (_containerSelectorGlyph is null && Component.Site is not null) 289_behavior = new ToolStripPanelSelectionBehavior(Control, Component.Site); 290_containerSelectorGlyph = new ToolStripPanelSelectionGlyph(Rectangle.Empty, Cursors.Default, Control, Component.Site, _behavior); 324_designerHost = component.Site?.GetService<IDesignerHost>();
System\Windows\Forms\Design\ToolStripTemplateNode.cs (17)
123_designerHost = component.Site.GetService<IDesignerHost>(); 125_designSurface = component.Site.GetService<DesignSurface>(); 177IMenuCommandService menuService = (IMenuCommandService)_component.Site.GetService(typeof(IMenuCommandService)); 201IEventHandlerService ehs = (IEventHandlerService)_component.Site.GetService(typeof(IEventHandlerService)); 212IMenuCommandService menuService = (IMenuCommandService)_component.Site.GetService(typeof(IMenuCommandService)); 232IEventHandlerService ehs = (IEventHandlerService)_component.Site.GetService(typeof(IEventHandlerService)); 274BaseContextMenuStrip templateNodeContextMenu = new(_component.Site) 282TemplateNodeCustomMenuItemCollection templateNodeCustomMenuItemCollection = new(_component.Site, _controlHost); 345_toolStripKeyBoardService ??= (ToolStripKeyboardHandlingService)_component.Site.GetService(typeof(ToolStripKeyboardHandlingService)); 358_selectionService ??= (ISelectionService)_component.Site.GetService(typeof(ISelectionService)); 368_behaviorService ??= (BehaviorService)_component.Site.GetService(typeof(BehaviorService)); 533IServiceProvider svcProvider = _component.Site; 992if (_component.Site.GetService(typeof(ISplitWindowService)) is DesignerFrame designerFrame 1296ToolStripDesignerUtils.GetCustomNewItemDropDown(_contextMenu, _component, null, new EventHandler(AddNewItemClick), false, _component.Site); 1318_component.Site, 1335_component.Site); 1425component.Site,
System.Windows.Forms.Design.Tests (48)
System\ComponentModel\Design\ComponentDesignerTests.cs (2)
543.Setup(c => c.Site) 635.Setup(c => c.Site)
System\ComponentModel\Design\DesignerHostTests.cs (2)
2792Assert.NotNull(e.Component.Site); 2802Assert.NotNull(e.Component.Site);
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationServiceTests.cs (36)
749.Setup(c => c.Site) 754mockComponent.Verify(c => c.Site, Times.Once()); 767mockComponent.Verify(c => c.Site, Times.Once()); 796.Setup(c => c.Site) 801mockComponent.Verify(c => c.Site, Times.Once()); 815mockComponent.Verify(c => c.Site, Times.Once()); 855.Setup(c => c.Site) 860mockComponent.Verify(c => c.Site, Times.Once()); 957.Setup(c => c.Site) 962mockComponent.Verify(c => c.Site, Times.Once()); 975mockComponent.Verify(c => c.Site, Times.Once()); 1004.Setup(c => c.Site) 1009mockComponent.Verify(c => c.Site, Times.Once()); 1023mockComponent.Verify(c => c.Site, Times.Once()); 1063.Setup(c => c.Site) 1068mockComponent.Verify(c => c.Site, Times.Once()); 1180.Setup(c => c.Site) 1185mockComponent.Verify(c => c.Site, Times.Once()); 1198mockComponent.Verify(c => c.Site, Times.Once()); 1211mockComponent.Verify(c => c.Site, Times.Once()); 1242.Setup(c => c.Site) 1247mockComponent.Verify(c => c.Site, Times.Once()); 1261mockComponent.Verify(c => c.Site, Times.Once()); 1275mockComponent.Verify(c => c.Site, Times.Once()); 1317.Setup(c => c.Site) 1322mockComponent.Verify(c => c.Site, Times.Once()); 1459.Setup(c => c.Site) 1464mockComponent.Verify(c => c.Site, Times.Once()); 1477mockComponent.Verify(c => c.Site, Times.Once()); 1490mockComponent.Verify(c => c.Site, Times.Once()); 1521.Setup(c => c.Site) 1526mockComponent.Verify(c => c.Site, Times.Once()); 1540mockComponent.Verify(c => c.Site, Times.Once()); 1554mockComponent.Verify(c => c.Site, Times.Once()); 1596.Setup(c => c.Site) 1601mockComponent.Verify(c => c.Site, Times.Once());
System\ComponentModel\Design\Serialization\DesignerSerializationManagerTests.cs (5)
878.Setup(c => c.Site) 892.Setup(c => c.Site) 904.Setup(c => c.Site) 946.Setup(i => i.Site) 950mockInstance.Verify(i => i.Site, Times.Never());
System\ComponentModel\Design\SiteNestedContainerTests.cs (2)
924Assert.NotNull(e.Component.Site); 934Assert.NotNull(e.Component.Site);
System\Windows\Forms\Design\BindingSourceDesignerTests.cs (1)
37componentMock.Setup(c => c.Site).Returns(siteMock.Object);