1 implementation of ISelectionService
System.Windows.Forms.Design (1)
System\ComponentModel\Design\SelectionService.cs (1)
18
internal sealed class SelectionService :
ISelectionService
, IDisposable
386 references to ISelectionService
DesignSurface (6)
MainForm.cs (6)
16
private
ISelectionService
_selectionService;
54
_selectionService = (
ISelectionService
)(isurf.GetIDesignerHost().GetService(typeof(
ISelectionService
)));
69
ISelectionService
selectionService = isurf.GetIDesignerHost().GetService(typeof(
ISelectionService
)) as
ISelectionService
;
netstandard (1)
netstandard.cs (1)
268
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.Design.
ISelectionService
))]
System (1)
src\libraries\shims\System\ref\System.cs (1)
254
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.Design.
ISelectionService
))]
System.ComponentModel.TypeConverter (1)
System\ComponentModel\Design\ISelectionService.cs (1)
24
/// Adds a <see cref='System.ComponentModel.Design.
ISelectionService
.SelectionChanged'/> event handler to the selection service.
System.Windows.Forms (12)
System\Windows\Forms\ActiveX\AxHost.AxContainer.cs (1)
296
|| !site.TryGetService(out
ISelectionService
? selectionService)
System\Windows\Forms\ActiveX\AxHost.cs (4)
826
if (Site.TryGetService(out
ISelectionService
? selectionService))
854
if (Site.TryGetService(out
ISelectionService
? selectionService))
969
if (IsUserMode() || !Site.TryGetService(out
ISelectionService
? selectionService))
2392
if (Site.TryGetService(out
ISelectionService
? selectionService) && selectionService.GetComponentSelected(this))
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (4)
729
ISelectionService
? iss = WebBrowserHelper.GetSelectionService(this);
750
ISelectionService
? iss = WebBrowserHelper.GetSelectionService(this);
765
ISelectionService
? iss = WebBrowserHelper.GetSelectionService(this);
1048
ISelectionService
? iss = WebBrowserHelper.GetSelectionService(this);
System\Windows\Forms\Controls\WebBrowser\WebBrowserHelper.cs (3)
92
internal static
ISelectionService
? GetSelectionService(Control ctl)
97
ISelectionService
? selectionService = site.GetService<
ISelectionService
>();
System.Windows.Forms.Design (254)
System\ComponentModel\Design\ComponentDesigner.cs (1)
251
|| !TryGetService(out
ISelectionService
? selectionService))
System\ComponentModel\Design\DesignerActionService.cs (2)
20
private readonly
ISelectionService
? _selectionService; // selection service
44
_selectionService = serviceProvider.GetService<
ISelectionService
>();
System\ComponentModel\Design\DesignerActionUI.cs (2)
26
private
ISelectionService
_selectionService; // used to determine if comps have selection or not
58
!serviceProvider.TryGetService(out
ISelectionService
? selectionService))
System\ComponentModel\Design\DesignerEventService.cs (3)
106
if (comp.Site.TryGetService(out
ISelectionService
? ss) && ss.GetComponentSelected(comp))
237
ISelectionService
? ss = provider.GetService<
ISelectionService
>();
System\ComponentModel\Design\DesignerHost.cs (5)
708
ISelectionService
? selectionService = (
ISelectionService
?)GetService(typeof(
ISelectionService
));
1137
if (successful && _savedSelection is not null && this.TryGetService(out
ISelectionService
? ss))
1171
if (this.TryGetService(out
ISelectionService
? ss))
System\ComponentModel\Design\DesignSurface.cs (2)
38
ServiceContainer.AddService<
ISelectionService
>(callback);
409
if (serviceType == typeof(
ISelectionService
))
System\ComponentModel\Design\MenuCommandService.cs (1)
24
private
ISelectionService
? _selectionService;
System\ComponentModel\Design\SelectionService.cs (10)
300
object?
ISelectionService
.PrimarySelection => PrimarySelection;
305
int
ISelectionService
.SelectionCount => _selection?.Count ?? 0;
308
/// Adds a <see cref="
ISelectionService
.SelectionChanged"/> event handler to the selection service.
310
event EventHandler
ISelectionService
.SelectionChanged
320
event EventHandler
ISelectionService
.SelectionChanging
330
bool
ISelectionService
.GetComponentSelected(object component)
339
ICollection
ISelectionService
.GetSelectedComponents()
350
void
ISelectionService
.SetSelectedComponents(ICollection? components)
351
=> ((
ISelectionService
)this).SetSelectedComponents(components, SelectionTypes.Auto);
357
void
ISelectionService
.SetSelectedComponents(ICollection? components, SelectionTypes selectionType)
System\ComponentModel\Design\ToolStripContainerActionList.cs (2)
214
ISelectionService
? selectionService = _serviceProvider?.GetService<
ISelectionService
>();
System\ComponentModel\Design\UndoEngine.UndoUnit.cs (2)
32
if (UndoEngine.TryGetService(out
ISelectionService
? ss))
470
if (UndoEngine.TryGetService(out
ISelectionService
? ss))
System\Windows\Forms\Design\BaseContextMenuStrip.cs (3)
83
if (_serviceProvider.GetService(typeof(
ISelectionService
)) is
ISelectionService
selectionService && _serviceProvider.GetService(typeof(IDesignerHost)) is IDesignerHost host)
321
if (_comp is not null && _serviceProvider.TryGetService(out
ISelectionService
? selectionService))
System\Windows\Forms\Design\Behavior\ContainerSelectorBehavior.cs (6)
94
ISelectionService
selSvc = (
ISelectionService
)_serviceProvider.GetService(typeof(
ISelectionService
));
206
ISelectionService
selSvc = (
ISelectionService
)_serviceProvider.GetService(typeof(
ISelectionService
));
System\Windows\Forms\Design\Behavior\DesignerActionBehavior.cs (1)
122
if (_serviceProvider.TryGetService(out
ISelectionService
? selectionService) &&
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (3)
350
ISelectionService
selSvc = null;
353
selSvc = (
ISelectionService
)_serviceProviderTarget.GetService(typeof(
ISelectionService
));
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (3)
312
ISelectionService
selSvc = (
ISelectionService
)_serviceProvider.GetService(typeof(
ISelectionService
));
System\Windows\Forms\Design\Behavior\SelectionManager.cs (2)
24
private
ISelectionService
_selectionService;
49
_selectionService = serviceProvider.GetRequiredService<
ISelectionService
>();
System\Windows\Forms\Design\Behavior\TableLayoutPanelBehavior.cs (3)
95
ISelectionService
selSvc = _serviceProvider.GetService(typeof(
ISelectionService
)) as
ISelectionService
;
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionBehavior.cs (6)
65
ISelectionService
selection = _serviceProvider.GetRequiredService<
ISelectionService
>();
101
ISelectionService
selectionService = _serviceProvider.GetRequiredService<
ISelectionService
>();
140
ISelectionService
selectionService = _serviceProvider.GetRequiredService<
ISelectionService
>();
System\Windows\Forms\Design\ChangeToolStripParentVerb.cs (2)
89
if (_provider.GetService(typeof(
ISelectionService
)) is
ISelectionService
selSvc)
System\Windows\Forms\Design\CommandSet.cs (4)
200
SelectionService = site.GetService<
ISelectionService
>();
240
protected
ISelectionService
? SelectionService { get; private set; }
2995
&& TryGetService(out
ISelectionService
? selSvc))
3049
if (TryGetService(out
ISelectionService
? selSvc))
System\Windows\Forms\Design\ComponentTray.cs (29)
160
ISelectionService
selSvc = (
ISelectionService
)GetService(typeof(
ISelectionService
));
240
_selectedObjects = ((
ISelectionService
)sender).GetSelectedComponents();
241
object primary = ((
ISelectionService
)sender).PrimarySelection;
656
ISelectionService
selectionService = (
ISelectionService
)GetService(typeof(
ISelectionService
));
1273
ISelectionService
ss = (
ISelectionService
)GetService(typeof(
ISelectionService
));
1360
ISelectionService
ss = (
ISelectionService
)GetService(typeof(
ISelectionService
));
2122
ISelectionService
sel = (
ISelectionService
)_tray.GetService(typeof(
ISelectionService
));
2168
ISelectionService
sel = (
ISelectionService
)_tray.GetService(typeof(
ISelectionService
));
2212
ISelectionService
sel = (
ISelectionService
)_tray.GetService(typeof(
ISelectionService
));
2246
ISelectionService
s = (
ISelectionService
)_tray.GetService(typeof(
ISelectionService
));
2586
ISelectionService
s = (
ISelectionService
)_tray.GetService(typeof(
ISelectionService
));
System\Windows\Forms\Design\ControlCommandSet.cs (4)
516
ISelectionService
selSvc = SelectionService;
941
ISelectionService
selSvc = SelectionService;
1367
ISelectionService
selSvc = SelectionService;
1435
ISelectionService
selSvc = SelectionService;
System\Windows\Forms\Design\ControlDesigner.ControlDesignerAccessibleObject.cs (4)
16
private
ISelectionService
? _selectionService;
38
private
ISelectionService
? SelectionService => _selectionService ??= _designer.GetService<
ISelectionService
>();
45
ISelectionService
? s = SelectionService;
System\Windows\Forms\Design\ControlDesigner.cs (6)
700
if (TryGetService(out
ISelectionService
? sel) && sel.GetComponentSelected(Control))
1310
if (!_ctrlSelect && TryGetService(out
ISelectionService
? selectionService))
1331
ISelectionService
? selectionService = GetService<
ISelectionService
>();
1401
if (TryGetService(out
ISelectionService
? selectionService) && !Component.Equals(selectionService.PrimarySelection))
1927
GetService<
ISelectionService
>()?.SetSelectedComponents(
System\Windows\Forms\Design\DataGridViewColumnDesigner.cs (2)
17
private
ISelectionService
? _selectionService;
144
_selectionService = GetService<
ISelectionService
>();
System\Windows\Forms\Design\DesignerFrame.cs (2)
118
ISelectionService
? selSvc = _designerSite.GetService<
ISelectionService
>();
System\Windows\Forms\Design\DocumentDesigner.cs (13)
402
ISelectionService
ss = (
ISelectionService
)GetService(typeof(
ISelectionService
));
589
ISelectionService
s = (
ISelectionService
)GetService(typeof(
ISelectionService
));
972
ISelectionService
selSvc = (
ISelectionService
)GetService(typeof(
ISelectionService
));
1111
ISelectionService
ss = (
ISelectionService
)GetService(typeof(
ISelectionService
));
1148
if (!TryGetService(out
ISelectionService
svc))
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (2)
125
internal
ISelectionService
SelectionService => GetService<
ISelectionService
>();
System\Windows\Forms\Design\OleDragDropHandler.ComponentDataObject.cs (1)
88
if (!_serviceProvider.TryGetService(out
ISelectionService
? selectionService))
System\Windows\Forms\Design\OleDragDropHandler.cs (3)
256
if (TryGetService(out
ISelectionService
? selSvc) && comps.Length > 0)
821
ISelectionService
selService = GetService<
ISelectionService
>()!;
System\Windows\Forms\Design\ParentControlDesigner.cs (12)
471
ISelectionService
selSvc = (
ISelectionService
)GetService(typeof(
ISelectionService
));
1633
ISelectionService
sel = (
ISelectionService
)GetService(typeof(
ISelectionService
));
1732
ISelectionService
selsvc = (
ISelectionService
)GetService(typeof(
ISelectionService
));
1883
var
selSvc = (
ISelectionService
)GetService(typeof(
ISelectionService
));
System\Windows\Forms\Design\SelectionUIService.cs (2)
52
private readonly
ISelectionService
? _selSvc;
72
_selSvc = host.GetService<
ISelectionService
>();
System\Windows\Forms\Design\SplitContainerDesigner.cs (5)
173
if (TryGetService(out
ISelectionService
? svc))
250
if (TryGetService(out
ISelectionService
? svc))
283
var
svc = GetRequiredService<
ISelectionService
>();
401
if (!TryGetService(out
ISelectionService
? svc))
System\Windows\Forms\Design\StandardMenuStripVerb.cs (6)
245
ISelectionService
selSvc = (
ISelectionService
)_provider.GetService(typeof(
ISelectionService
));
389
ISelectionService
selSvc = (
ISelectionService
)_provider.GetService(typeof(
ISelectionService
));
System\Windows\Forms\Design\TabControlDesigner.cs (12)
146
ISelectionService
svc = (
ISelectionService
)GetService(typeof(
ISelectionService
));
217
ISelectionService
svc = (
ISelectionService
)GetService(typeof(
ISelectionService
));
400
ISelectionService
svc = (
ISelectionService
)GetService(typeof(
ISelectionService
));
435
ISelectionService
svc = (
ISelectionService
)GetService(typeof(
ISelectionService
));
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (9)
617
ISelectionService
selSvc = GetService(typeof(
ISelectionService
)) as
ISelectionService
;
1472
ISelectionService
selSvc = GetService(typeof(
ISelectionService
)) as
ISelectionService
;
1583
ISelectionService
selSvc = GetService(typeof(
ISelectionService
)) as
ISelectionService
;
System\Windows\Forms\Design\TemplateNodeCustomMenuItemCollection.cs (3)
113
ISelectionService
selSvc = (
ISelectionService
)_serviceProvider.GetService(typeof(
ISelectionService
));
System\Windows\Forms\Design\ToolStripContainerDesigner.cs (2)
29
private
ISelectionService
? _selectionService;
390
_selectionService ??= GetService<
ISelectionService
>();
System\Windows\Forms\Design\ToolStripDesigner.cs (3)
37
private
ISelectionService
_selectionService; // cached selection service.
391
internal
ISelectionService
SelectionService => _selectionService ??= GetService<
ISelectionService
>();
System\Windows\Forms\Design\ToolStripDropDownDesigner.cs (7)
20
private
ISelectionService
_selectionService;
197
private void AddSelectionGlyphs(SelectionManager selectionManager,
ISelectionService
selectionService)
418
private bool IsContextMenuStripItemSelected(
ISelectionService
selectionService)
495
ISelectionService
selectionService = (
ISelectionService
)sender;
514
ISelectionService
selectionService = (
ISelectionService
)sender;
System\Windows\Forms\Design\ToolStripInSituService.cs (6)
84
ISelectionService
selectionService = (
ISelectionService
)_sp.GetService(typeof(
ISelectionService
));
185
ISelectionService
selService = (
ISelectionService
)_sp.GetService(typeof(
ISelectionService
));
System\Windows\Forms\Design\ToolStripItemBehavior.cs (11)
111
private static
ISelectionService
GetSelectionService(ToolStripItem item)
116
ISelectionService
selSvc = (
ISelectionService
)item.Site.GetService(typeof(
ISelectionService
));
232
ISelectionService
selSvc = GetSelectionService(glyphItem);
281
ISelectionService
selSvc = GetSelectionService(glyphItem);
483
ISelectionService
selSvc = GetSelectionService(glyphItem);
509
ISelectionService
selSvc = GetSelectionService(glyphItem);
532
ISelectionService
selSvc = GetSelectionService(glyphItem);
727
ISelectionService
selSvc = GetSelectionService(currentDropItem);
955
ISelectionService
selSvc = GetSelectionService(item);
System\Windows\Forms\Design\ToolStripItemCustomMenuItemCollection.cs (12)
400
ISelectionService
selSvc = (
ISelectionService
)_serviceProvider.GetService(typeof(
ISelectionService
));
451
ISelectionService
selSvc = (
ISelectionService
)_serviceProvider.GetService(typeof(
ISelectionService
));
490
ISelectionService
selSvc = (
ISelectionService
)_serviceProvider.GetService(typeof(
ISelectionService
));
547
ISelectionService
selSvc = (
ISelectionService
)_serviceProvider.GetService(typeof(
ISelectionService
));
System\Windows\Forms\Design\ToolStripItemDesigner.cs (5)
25
private
ISelectionService
_selectionService;
877
ISelectionService
selSvc = (
ISelectionService
)newItem.Site.GetService(typeof(
ISelectionService
));
937
if (sender is not
ISelectionService
sSvc)
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (16)
16
private
ISelectionService
_selectionService;
54
_selectionService = (
ISelectionService
)serviceProvider.GetService(typeof(
ISelectionService
));
216
private
ISelectionService
SelectionService
596
ISelectionService
selSvc = SelectionService;
670
ISelectionService
selSvc = SelectionService;
715
ISelectionService
selSvc = SelectionService;
760
ISelectionService
selSvc = SelectionService;
802
ISelectionService
selSvc = SelectionService;
838
ISelectionService
selSvc = SelectionService;
913
ISelectionService
selSvc = SelectionService;
974
ISelectionService
selSvc = SelectionService;
1045
ISelectionService
selSvc = SelectionService;
1671
ISelectionService
selSvc = SelectionService;
1762
ISelectionService
selSvc = SelectionService;
2042
ISelectionService
selSvc = SelectionService;
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (5)
38
private
ISelectionService
_selectionService;
2135
ISelectionService
selectionSvc = sender as
ISelectionService
;
2199
object selectedObj = ((
ISelectionService
)sender).PrimarySelection;
2534
private void SelectItems(ToolStripDropDownItem oldSelection,
ISelectionService
selSvc)
System\Windows\Forms\Design\ToolStripPanelDesigner.cs (2)
32
private
ISelectionService
? _selectionService;
328
_selectionService = GetRequiredService<
ISelectionService
>();
System\Windows\Forms\Design\ToolStripTemplateNode.cs (7)
90
private
ISelectionService
_selectionService;
354
private
ISelectionService
SelectionService
358
_selectionService ??= (
ISelectionService
)_component.Site.GetService(typeof(
ISelectionService
));
564
ISelectionService
cachedSelSvc = (
ISelectionService
)svcProvider.GetService(typeof(
ISelectionService
));
System.Windows.Forms.Design.Tests (80)
Mocks\MockSite.cs (2)
64
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
67
.Setup(s => s.GetService(typeof(
ISelectionService
)))
System\ComponentModel\Design\ComponentDesignerTests.cs (47)
789
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
825
.Setup(s => s.GetService(typeof(
ISelectionService
)))
842
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Once());
863
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(2));
904
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
940
.Setup(s => s.GetService(typeof(
ISelectionService
)))
955
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Once());
968
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(2));
1013
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
1049
.Setup(s => s.GetService(typeof(
ISelectionService
)))
1068
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Once());
1092
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(2));
1121
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
1157
.Setup(s => s.GetService(typeof(
ISelectionService
)))
1174
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Once());
1185
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(2));
1214
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
1250
.Setup(s => s.GetService(typeof(
ISelectionService
)))
1267
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Once());
1278
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(2));
1305
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
1341
.Setup(s => s.GetService(typeof(
ISelectionService
)))
1357
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Once());
1368
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(2));
1399
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
1435
.Setup(s => s.GetService(typeof(
ISelectionService
)))
1452
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Once());
1465
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(2));
1506
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
1542
.Setup(s => s.GetService(typeof(
ISelectionService
)))
1559
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Once());
1572
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(2));
1604
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
1640
.Setup(s => s.GetService(typeof(
ISelectionService
)))
1656
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Once());
1666
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(2));
1687
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
1719
.Setup(s => s.GetService(typeof(
ISelectionService
)))
1734
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Once());
1741
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(2));
1837
.Setup(s => s.GetService(typeof(
ISelectionService
)))
1851
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Once());
1857
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(2));
1877
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
1913
.Setup(s => s.GetService(typeof(
ISelectionService
)))
1928
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Once());
1940
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(2));
System\ComponentModel\Design\DesignerActionServiceTests.cs (9)
21
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
32
.Setup(p => p.GetService(typeof(
ISelectionService
)))
38
mockServiceProvider.Verify(p => p.GetService(typeof(
ISelectionService
)), Times.Once());
258
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
267
.Setup(p => p.GetService(typeof(
ISelectionService
)))
289
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
298
.Setup(p => p.GetService(typeof(
ISelectionService
)))
321
.Setup(p => p.GetService(typeof(
ISelectionService
)))
333
.Setup(p => p.GetService(typeof(
ISelectionService
)))
System\ComponentModel\Design\DesignSurfaceTests.cs (7)
214
ISelectionService
service = Assert.IsAssignableFrom<
ISelectionService
>(container.GetService(typeof(
ISelectionService
)));
295
[InlineData(typeof(
ISelectionService
))]
1486
ISelectionService
service = Assert.IsAssignableFrom<
ISelectionService
>(surface.GetService(typeof(
ISelectionService
)));
System\Windows\Forms\Design\CommandSetTests.cs (2)
21
Mock<
ISelectionService
> mockSelectionService = new();
27
mockSite.Setup(s => s.GetService(typeof(
ISelectionService
))).Returns(mockSelectionService.Object);
System\Windows\Forms\Design\ContextMenuStripActionListTests.cs (2)
15
private readonly Mock<
ISelectionService
> _mockSelectionService;
39
mockSite.Setup(s => s.GetService(typeof(
ISelectionService
))).Returns(_mockSelectionService.Object);
System\Windows\Forms\Design\ControlDesignerAccessibleObjectTests.cs (1)
107
accessor._selectionService = Mock.Of<
ISelectionService
>(s =>
System\Windows\Forms\Design\DataGridViewColumnDesignerTests.cs (2)
19
Mock<
ISelectionService
> selectionServiceMock = new();
23
.Setup(s => s.GetService(typeof(
ISelectionService
)))
System\Windows\Forms\Design\ToolStripActionListTests.cs (2)
15
private readonly Mock<
ISelectionService
> _mockSelectionService;
37
mockSite.Setup(s => s.GetService(typeof(
ISelectionService
))).Returns(_mockSelectionService.Object);
System\Windows\Forms\Design\ToolStripContainerDesignerTests.cs (2)
16
private readonly Mock<
ISelectionService
> _mockSelectionService;
34
mockSite.Setup(s => s.GetService(typeof(
ISelectionService
))).Returns(_mockSelectionService.Object);
System\Windows\Forms\Design\UserControlDocumentDesignerTests.cs (2)
28
Mock<
ISelectionService
> selectionService = new(MockBehavior.Strict);
30
.Setup(s => s.GetService(typeof(
ISelectionService
)))
TestControlDesigner.Mocks.cs (2)
96
Mock<
ISelectionService
> mockSelectionService = new();
99
.Setup(s => s.GetService(typeof(
ISelectionService
)))
System.Windows.Forms.Tests (31)
System\Windows\Forms\AxHostTests.cs (31)
1763
yield return new object[] { false, new Mock<
ISelectionService
>(MockBehavior.Strict).Object, 1 };
1787
.Setup(s => s.GetService(typeof(
ISelectionService
)))
1799
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(expectedCallCount));
1804
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(expectedCallCount));
1814
yield return new object[] { false, new Mock<
ISelectionService
>(MockBehavior.Strict).Object, 1 };
1840
.Setup(s => s.GetService(typeof(
ISelectionService
)))
1863
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(expectedCallCount));
1867
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(expectedCallCount));
1875
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
1897
.Setup(s => s.GetService(typeof(
ISelectionService
)))
1915
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(2));
1921
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(2));
1930
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
1952
.Setup(s => s.GetService(typeof(
ISelectionService
)))
1971
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(2));
1978
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(2));
1987
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
2009
.Setup(s => s.GetService(typeof(
ISelectionService
)))
2029
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(2));
2036
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(2));
2047
yield return new object[] { false, new Mock<
ISelectionService
>(MockBehavior.Strict).Object, 1 };
2071
.Setup(s => s.GetService(typeof(
ISelectionService
)))
2103
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(expectedCallCount));
2111
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(expectedCallCount));
2136
.Setup(s => s.GetService(typeof(
ISelectionService
)))
2170
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(expectedCallCount));
2179
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(expectedCallCount));
2188
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
2210
.Setup(s => s.GetService(typeof(
ISelectionService
)))
2240
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(3));
2250
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(3));