1 implementation of ISelectionService
System.Windows.Forms.Design (1)
System\ComponentModel\Design\SelectionService.cs (1)
18
internal sealed class SelectionService :
ISelectionService
, IDisposable
390 references to ISelectionService
DesignSurface (6)
MainForm.cs (6)
8
private
ISelectionService
_selectionService;
46
_selectionService = (
ISelectionService
)(isurf.GetIDesignerHost().GetService(typeof(
ISelectionService
)));
61
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 (256)
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\ToolStripCollectionEditor.cs (2)
42
ISelectionService
? selectionService = provider.GetService<
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 (82)
Mocks\MockSite.cs (2)
66
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
69
.Setup(s => s.GetService(typeof(
ISelectionService
)))
System\ComponentModel\Design\ComponentDesignerTests.cs (47)
791
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
827
.Setup(s => s.GetService(typeof(
ISelectionService
)))
844
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Once());
865
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(2));
906
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
942
.Setup(s => s.GetService(typeof(
ISelectionService
)))
957
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Once());
970
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(2));
1015
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
1051
.Setup(s => s.GetService(typeof(
ISelectionService
)))
1070
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Once());
1094
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(2));
1123
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
1159
.Setup(s => s.GetService(typeof(
ISelectionService
)))
1176
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Once());
1187
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(2));
1216
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
1252
.Setup(s => s.GetService(typeof(
ISelectionService
)))
1269
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Once());
1280
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(2));
1307
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
1343
.Setup(s => s.GetService(typeof(
ISelectionService
)))
1359
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Once());
1370
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(2));
1401
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
1437
.Setup(s => s.GetService(typeof(
ISelectionService
)))
1454
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Once());
1467
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(2));
1508
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
1544
.Setup(s => s.GetService(typeof(
ISelectionService
)))
1561
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Once());
1574
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(2));
1606
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
1642
.Setup(s => s.GetService(typeof(
ISelectionService
)))
1658
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Once());
1668
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(2));
1689
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
1721
.Setup(s => s.GetService(typeof(
ISelectionService
)))
1736
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Once());
1743
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(2));
1839
.Setup(s => s.GetService(typeof(
ISelectionService
)))
1853
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Once());
1859
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(2));
1879
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
1915
.Setup(s => s.GetService(typeof(
ISelectionService
)))
1930
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Once());
1942
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(2));
System\ComponentModel\Design\DesignerActionServiceTests.cs (9)
23
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
34
.Setup(p => p.GetService(typeof(
ISelectionService
)))
40
mockServiceProvider.Verify(p => p.GetService(typeof(
ISelectionService
)), Times.Once());
260
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
269
.Setup(p => p.GetService(typeof(
ISelectionService
)))
291
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
300
.Setup(p => p.GetService(typeof(
ISelectionService
)))
323
.Setup(p => p.GetService(typeof(
ISelectionService
)))
335
.Setup(p => p.GetService(typeof(
ISelectionService
)))
System\ComponentModel\Design\DesignSurfaceTests.cs (7)
216
ISelectionService
service = Assert.IsAssignableFrom<
ISelectionService
>(container.GetService(typeof(
ISelectionService
)));
297
[InlineData(typeof(
ISelectionService
))]
1488
ISelectionService
service = Assert.IsAssignableFrom<
ISelectionService
>(surface.GetService(typeof(
ISelectionService
)));
System\Windows\Forms\Design\CommandSetTests.cs (2)
19
Mock<
ISelectionService
> mockSelectionService = new();
25
mockSite.Setup(s => s.GetService(typeof(
ISelectionService
))).Returns(mockSelectionService.Object);
System\Windows\Forms\Design\ContextMenuStripActionListTests.cs (2)
13
private readonly Mock<
ISelectionService
> _mockSelectionService;
37
mockSite.Setup(s => s.GetService(typeof(
ISelectionService
))).Returns(_mockSelectionService.Object);
System\Windows\Forms\Design\ControlDesignerAccessibleObjectTests.cs (1)
105
accessor._selectionService = Mock.Of<
ISelectionService
>(s =>
System\Windows\Forms\Design\DataGridViewColumnDesignerTests.cs (2)
17
Mock<
ISelectionService
> selectionServiceMock = new();
21
.Setup(s => s.GetService(typeof(
ISelectionService
)))
System\Windows\Forms\Design\ToolStripActionListTests.cs (2)
13
private readonly Mock<
ISelectionService
> _mockSelectionService;
35
mockSite.Setup(s => s.GetService(typeof(
ISelectionService
))).Returns(_mockSelectionService.Object);
System\Windows\Forms\Design\ToolStripContainerDesignerTests.cs (2)
14
private readonly Mock<
ISelectionService
> _mockSelectionService;
32
mockSite.Setup(s => s.GetService(typeof(
ISelectionService
))).Returns(_mockSelectionService.Object);
System\Windows\Forms\Design\ToolStripPanelDesignerTests.cs (2)
17
private readonly Mock<
ISelectionService
> _mockSelectionService = new();
33
_mockSite.Setup(s => s.GetService(typeof(
ISelectionService
))).Returns(_mockSelectionService.Object);
System\Windows\Forms\Design\UserControlDocumentDesignerTests.cs (2)
26
Mock<
ISelectionService
> selectionService = new(MockBehavior.Strict);
28
.Setup(s => s.GetService(typeof(
ISelectionService
)))
TestControlDesigner.Mocks.cs (2)
94
Mock<
ISelectionService
> mockSelectionService = new();
97
.Setup(s => s.GetService(typeof(
ISelectionService
)))
System.Windows.Forms.Tests (31)
System\Windows\Forms\AxHostTests.cs (31)
1765
yield return new object[] { false, new Mock<
ISelectionService
>(MockBehavior.Strict).Object, 1 };
1789
.Setup(s => s.GetService(typeof(
ISelectionService
)))
1801
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(expectedCallCount));
1806
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(expectedCallCount));
1816
yield return new object[] { false, new Mock<
ISelectionService
>(MockBehavior.Strict).Object, 1 };
1842
.Setup(s => s.GetService(typeof(
ISelectionService
)))
1865
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(expectedCallCount));
1869
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(expectedCallCount));
1877
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
1899
.Setup(s => s.GetService(typeof(
ISelectionService
)))
1917
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(2));
1923
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(2));
1932
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
1954
.Setup(s => s.GetService(typeof(
ISelectionService
)))
1973
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(2));
1980
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(2));
1989
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
2011
.Setup(s => s.GetService(typeof(
ISelectionService
)))
2031
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(2));
2038
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(2));
2049
yield return new object[] { false, new Mock<
ISelectionService
>(MockBehavior.Strict).Object, 1 };
2073
.Setup(s => s.GetService(typeof(
ISelectionService
)))
2105
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(expectedCallCount));
2113
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(expectedCallCount));
2138
.Setup(s => s.GetService(typeof(
ISelectionService
)))
2172
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(expectedCallCount));
2181
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(expectedCallCount));
2190
Mock<
ISelectionService
> mockSelectionService = new(MockBehavior.Strict);
2212
.Setup(s => s.GetService(typeof(
ISelectionService
)))
2242
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(3));
2252
mockSite.Verify(s => s.GetService(typeof(
ISelectionService
)), Times.Exactly(3));