1 interface inheriting from IDesignerHost
System.ComponentModel.TypeConverter (1)
System\ComponentModel\Design\Serialization\IDesignerLoaderHost.cs (1)
16
public interface IDesignerLoaderHost :
IDesignerHost
1024 references to IDesignerHost
DesignSurface (3)
CustomControls\CustomButtonDesignerActionList.cs (3)
12
private readonly
IDesignerHost
_host;
20
_host = GetService(typeof(
IDesignerHost
)) as
IDesignerHost
;
DesignSurfaceExt (11)
DesignSurfaceExt.cs (7)
97
IDesignerHost
host = GetIDesignerHost();
118
IDesignerHost
ihost = GetIDesignerHost();
167
IComponent newComp = CreateComponent<TControl>(out
IDesignerHost
host);
203
private TComponent CreateComponent<TComponent>(out
IDesignerHost
host)
232
public
IDesignerHost
GetIDesignerHost() => (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
IDesignSurfaceExt.cs (1)
36
IDesignerHost
GetIDesignerHost();
PropertyGridExt.cs (2)
12
private
IDesignerHost
_host;
40
public
IDesignerHost
DesignerHost
TabOrderHooker.cs (1)
17
public void HookTabOrder(
IDesignerHost
host)
netstandard (1)
netstandard.cs (1)
255
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.Design.
IDesignerHost
))]
System (1)
src\libraries\shims\System\ref\System.cs (1)
241
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.Design.
IDesignerHost
))]
System.ComponentModel.TypeConverter (31)
System\ComponentModel\AmbientValueAttribute.cs (4)
21
private static readonly object? s_throwSentinel =
IDesignerHost
.IsSupported ? null : new();
33
Debug.Assert(
IDesignerHost
.IsSupported, "Runtime instantiation of this attribute is not allowed with trimming.");
34
if (!
IDesignerHost
.IsSupported)
147
if (!
IDesignerHost
.IsSupported && ReferenceEquals(_value, s_throwSentinel))
System\ComponentModel\Design\ActiveDesignerEventArgs.cs (4)
16
public ActiveDesignerEventArgs(
IDesignerHost
? oldDesigner,
IDesignerHost
? newDesigner)
25
public
IDesignerHost
? OldDesigner { get; }
30
public
IDesignerHost
? NewDesigner { get; }
System\ComponentModel\Design\DesignerCollection.cs (5)
17
/// that stores an array with a pointer to each <see cref='System.ComponentModel.Design.
IDesignerHost
'/>
20
public DesignerCollection(
IDesignerHost
[]? designers)
34
/// that stores an array with a pointer to each <see cref='System.ComponentModel.Design.
IDesignerHost
'/>
50
public virtual
IDesignerHost
? this[int index] => (
IDesignerHost
?)_designers[index];
System\ComponentModel\Design\DesignerEventArgs.cs (2)
16
public DesignerEventArgs(
IDesignerHost
? host)
24
public
IDesignerHost
? Designer { get; }
System\ComponentModel\Design\IComponentDiscoveryService.cs (1)
19
ICollection GetComponentTypes(
IDesignerHost
? designerHost, Type? baseType);
System\ComponentModel\Design\IDesignerEventService.cs (1)
14
IDesignerHost
? ActiveDesigner { get; }
System\ComponentModel\Design\IDesignerHost.cs (7)
52
/// Adds an event handler for the <see cref='System.ComponentModel.Design.
IDesignerHost
.Activated'/> event.
57
/// Adds an event handler for the <see cref='System.ComponentModel.Design.
IDesignerHost
.Deactivated'/> event.
62
/// Adds an event handler for the <see cref='System.ComponentModel.Design.
IDesignerHost
.LoadComplete'/> event.
67
/// Adds an event handler for the <see cref='System.ComponentModel.Design.
IDesignerHost
.TransactionClosed'/> event.
72
/// Adds an event handler for the <see cref='System.ComponentModel.Design.
IDesignerHost
.TransactionClosing'/> event.
77
/// Adds an event handler for the <see cref='System.ComponentModel.Design.
IDesignerHost
.TransactionOpened'/> event.
82
/// Adds an event handler for the <see cref='System.ComponentModel.Design.
IDesignerHost
.TransactionOpening'/> event.
System\ComponentModel\ToolboxItemAttribute.cs (1)
45
if (!
IDesignerHost
.IsSupported)
System\ComponentModel\TypeDescriptor.cs (3)
652
IDesignerHost
? host = site.GetService(typeof(
IDesignerHost
)) as
IDesignerHost
;
System\Timers\Timer.cs (3)
222
IDesignerHost
? host = (
IDesignerHost
?)GetService(typeof(
IDesignerHost
));
System.Windows.Forms (28)
System\Windows\Forms\ActiveX\AxHost.cs (2)
1989
if (Site.TryGetService(out
IDesignerHost
? host) && host.RootComponent is ContainerControl rootControl)
3018
Site.TryGetService(out
IDesignerHost
? host);
System\Windows\Forms\Control.cs (1)
5249
&& site.TryGetService(out
IDesignerHost
? host)
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (9)
62
private
IDesignerHost
? _designerHost;
243
internal
IDesignerHost
? ActiveDesigner
245
get => _designerHost ??= GetService<
IDesignerHost
>();
1160
ActiveDesigner = value?.GetService<
IDesignerHost
>();
1483
IDesignerHost
? host = null;
1486
host = site.GetService<
IDesignerHost
>();
1641
private PropertyTab? CreateTab(Type tabType,
IDesignerHost
? host)
1662
constructor = tabType.GetConstructor([typeof(
IDesignerHost
)]);
1768
if (_selectedObjects.Length == 1 && site.TryGetService(out
IDesignerHost
? designerHost))
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CommandsPane.cs (1)
20
/// <see cref="IDesigner.Verbs"/> from any associated <see cref="
IDesignerHost
"/>. Note that
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (3)
238
/// The currently active <see cref="
IDesignerHost
"/>, if any.
246
internal virtual
IDesignerHost
? DesignerHost
890
IDesignerHost
? currentHost,
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\MultiPropertyDescriptorGridEntry.cs (1)
274
IDesignerHost
? host = DesignerHost;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\MultiSelectRootGridEntry.cs (1)
22
IDesignerHost
? host,
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyDescriptorGridEntry.cs (2)
568
IDesignerHost
? host = DesignerHost;
827
IDesignerHost
? host = DesignerHost;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\SingleSelectRootGridEntry.cs (3)
18
private
IDesignerHost
? _host;
30
IDesignerHost
? host,
114
internal sealed override
IDesignerHost
? DesignerHost
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (1)
1140
if (Site.TryGetService(out
IDesignerHost
? host) && host.RootComponent is ContainerControl rootContainerControl)
System\Windows\Forms\Design\EventsTab.cs (2)
16
private
IDesignerHost
? _currentHost;
52
/// This looks first at the current <see cref="
IDesignerHost
"/>, then the <paramref name="object"/>'s
System\Windows\Forms\ErrorProvider\ErrorProvider.cs (2)
98
if (value.GetService(typeof(
IDesignerHost
)) is
IDesignerHost
host)
System.Windows.Forms.Design (625)
System\ComponentModel\Design\BinaryEditor.cs (1)
27
return _context.TryGetService(out
IDesignerHost
? designerhost)
System\ComponentModel\Design\CollectionEditor.cs (5)
95
if (Context.TryGetService(out
IDesignerHost
? host) && typeof(IComponent).IsAssignableFrom(itemType))
124
nameof(
IDesignerHost
),
201
if (Context.TryGetService(out
IDesignerHost
? host))
238
IDesignerHost
? host = Context?.GetService<
IDesignerHost
>();
System\ComponentModel\Design\ComponentDesigner.cs (9)
82
IComponent? root = GetService<
IDesignerHost
>()?.RootComponent;
196
if (comps is not null && comps.Count > 0 && TryGetService(out
IDesignerHost
? host))
225
if (parent is not null && TryGetService(out
IDesignerHost
? host))
259
IDesignerHost
? host = GetService<
IDesignerHost
>();
368
return TryGetService(out
IDesignerHost
? host) && _component == host.RootComponent;
383
bool isRoot = TryGetService(out
IDesignerHost
? host) && component == host.RootComponent;
473
IComponent? rootComponent = GetService<
IDesignerHost
>()?.RootComponent;
497
IComponent? rootComponent = GetService<
IDesignerHost
>()?.RootComponent;
System\ComponentModel\Design\DataSourceProviderService.cs (1)
22
public abstract object AddDataSourceInstance(
IDesignerHost
host, DataSourceDescriptor dataSourceDescriptor);
System\ComponentModel\Design\DesignerActionPanel.cs (2)
621
IDesignerHost
? host = serviceProvider.GetService<
IDesignerHost
>();
System\ComponentModel\Design\DesignerActionService.cs (4)
36
IDesignerHost
? host = serviceProvider.GetService<
IDesignerHost
>();
133
IDesignerHost
? host = _serviceProvider.GetService<
IDesignerHost
>();
System\ComponentModel\Design\DesignerActionUI.cs (6)
279
IDesignerHost
? host = _serviceProvider.GetService<
IDesignerHost
>();
302
IDesignerHost
host = _serviceProvider.GetRequiredService<
IDesignerHost
>();
538
if (_serviceProvider.TryGetService(out
IDesignerHost
? host) && host.InTransaction)
549
if (_serviceProvider.TryGetService(out
IDesignerHost
? host))
System\ComponentModel\Design\DesignerActionUIService.cs (4)
20
IDesignerHost
host = serviceProvider.GetRequiredService<
IDesignerHost
>();
34
IDesignerHost
? host = _serviceProvider.GetService<
IDesignerHost
>();
System\ComponentModel\Design\DesignerEventService.cs (14)
19
private List<
IDesignerHost
>? _designerList; // read write list used as data for the collection
21
private
IDesignerHost
? _activeDesigner; // the currently active designer. Can be null
40
IDesignerHost
? host = null;
43
host = surface.GetService(typeof(
IDesignerHost
)) as
IDesignerHost
;
58
IDesignerHost
? oldDesigner = _activeDesigner;
84
if (ce.Component?.Site?.Container is
IDesignerHost
{ Loading: true })
120
IDesignerHost
? host = surface.GetService<
IDesignerHost
>();
146
IDesignerHost
? host = surface.GetService<
IDesignerHost
>();
239
IDesignerHost
? host = provider.GetService<
IDesignerHost
>();
300
IDesignerHost
? IDesignerEventService.ActiveDesigner => _activeDesigner;
System\ComponentModel\Design\DesignerHost.cs (42)
27
private static readonly Type[] s_defaultServices = [typeof(
IDesignerHost
), typeof(IContainer), typeof(IComponentChangeService), typeof(IDesignerLoaderHost2)];
715
DesignerTransaction t = ((
IDesignerHost
)this).CreateTransaction();
850
if (!((
IDesignerHost
)this).Loading)
860
if (!((
IDesignerHost
)this).Loading)
866
bool
IDesignerHost
.Loading =>
869
bool
IDesignerHost
.InTransaction => (_transactions is not null && _transactions.Count > 0) || IsClosingTransaction;
871
IContainer
IDesignerHost
.Container => this;
873
IComponent
IDesignerHost
.RootComponent => _rootComponent!;
875
string
IDesignerHost
.RootComponentClassName => _rootComponentClassName!;
877
string
IDesignerHost
.TransactionDescription =>
882
event EventHandler
IDesignerHost
.Activated
888
event EventHandler
IDesignerHost
.Deactivated
894
event EventHandler
IDesignerHost
.LoadComplete
900
event DesignerTransactionCloseEventHandler
IDesignerHost
.TransactionClosed
906
event DesignerTransactionCloseEventHandler
IDesignerHost
.TransactionClosing
912
event EventHandler
IDesignerHost
.TransactionOpened
918
event EventHandler
IDesignerHost
.TransactionOpening
924
void
IDesignerHost
.Activate() => _surface?.OnViewActivate();
928
IComponent
IDesignerHost
.CreateComponent(Type componentType) =>
929
((
IDesignerHost
)this).CreateComponent(componentType, null!);
931
IComponent
IDesignerHost
.CreateComponent(Type componentType, string name)
991
DesignerTransaction
IDesignerHost
.CreateTransaction() =>
992
((
IDesignerHost
)this).CreateTransaction(SR.DesignerHostGenericTransactionName);
994
DesignerTransaction
IDesignerHost
.CreateTransaction(string description) =>
997
void
IDesignerHost
.DestroyComponent(IComponent component)
1012
if (((
IDesignerHost
)this).InTransaction)
1020
using (t = ((
IDesignerHost
)this).CreateTransaction(string.Format(SR.DesignerHostDestroyComponentTransaction, name)))
1032
IDesigner?
IDesignerHost
.GetDesigner(IComponent component)
1039
Type?
IDesignerHost
.GetType(string typeName)
1100
IRootDesigner rootDesigner = (((
IDesignerHost
)this).GetDesigner(_rootComponent!) as IRootDesigner)
1208
typeof(
IDesignerHost
).GetMethod(name, bindingAttr, binder, types, modifiers);
1211
MethodInfo? IReflect.GetMethod(string name, BindingFlags bindingAttr) => typeof(
IDesignerHost
).GetMethod(name, bindingAttr);
1214
MethodInfo[] IReflect.GetMethods(BindingFlags bindingAttr) => typeof(
IDesignerHost
).GetMethods(bindingAttr);
1217
FieldInfo? IReflect.GetField(string name, BindingFlags bindingAttr) => typeof(
IDesignerHost
).GetField(name, bindingAttr);
1220
FieldInfo[] IReflect.GetFields(BindingFlags bindingAttr) => typeof(
IDesignerHost
).GetFields(bindingAttr);
1223
PropertyInfo? IReflect.GetProperty(string name, BindingFlags bindingAttr) => typeof(
IDesignerHost
).GetProperty(name, bindingAttr);
1227
typeof(
IDesignerHost
).GetProperty(name, bindingAttr, binder, returnType, types, modifiers);
1230
PropertyInfo[] IReflect.GetProperties(BindingFlags bindingAttr) => typeof(
IDesignerHost
).GetProperties(bindingAttr);
1246
MemberInfo[] IReflect.GetMember(string name, BindingFlags bindingAttr) => typeof(
IDesignerHost
).GetMember(name, bindingAttr);
1249
MemberInfo[] IReflect.GetMembers(BindingFlags bindingAttr) => typeof(
IDesignerHost
).GetMembers(bindingAttr);
1261
typeof(
IDesignerHost
).InvokeMember(name, invokeAttr, binder, target, args, modifiers, culture, namedParameters);
1263
Type IReflect.UnderlyingSystemType => typeof(
IDesignerHost
).UnderlyingSystemType;
System\ComponentModel\Design\DesignSurface.cs (4)
76
return ((
IDesignerHost
)_host).Container;
130
IComponent? rootComponent = ((
IDesignerHost
)_host).RootComponent;
156
if (((
IDesignerHost
)_host).GetDesigner(rootComponent) is not IRootDesigner rootDesigner)
443
IComponent? rootComponent = ((
IDesignerHost
)_host).RootComponent;
System\ComponentModel\Design\DesignSurfaceCollection.cs (3)
35
IDesignerHost
host = _designers[index]!;
85
IDesignerHost
host = (
IDesignerHost
)_designerEnumerator.Current!;
System\ComponentModel\Design\EventBindingService.EventPropertyDescriptor.cs (1)
213
if (site.TryGetService(out
IDesignerHost
? host))
System\ComponentModel\Design\MenuCommandService.cs (1)
197
if (_selectionService?.SelectionCount == 1 && TryGetService(out
IDesignerHost
? designerHost))
System\ComponentModel\Design\SelectionService.cs (6)
69
if (GetService(typeof(
IDesignerHost
)) is
IDesignerHost
host)
223
if (GetService(typeof(
IDesignerHost
)) is
IDesignerHost
host && _selection.Contains(host.RootComponent))
273
if (GetService(typeof(
IDesignerHost
)) is
IDesignerHost
host)
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.cs (1)
97
if (TryGetService(out
IDesignerHost
? host))
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.ModifiersExtenderProvider.cs (2)
18
private
IDesignerHost
? _host;
51
_host ??= component.Site?.GetService<
IDesignerHost
>();
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.ModifiersInheritedExtenderProvider.cs (2)
19
private
IDesignerHost
? _host;
58
_host ??= component.Site?.GetService<
IDesignerHost
>();
System\ComponentModel\Design\Serialization\CodeDomLocalizationProvider.LanguageExtenders.cs (2)
21
private readonly
IDesignerHost
? _host;
30
_host = serviceProvider.GetService<
IDesignerHost
>();
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (1)
684
if (manager.GetService<
IDesignerHost
>() is { } host)
System\ComponentModel\Design\Serialization\DesignerSerializationManager.cs (5)
60
/// for <see cref="
IDesignerHost
"/> in the service provider and uses its container if it exists.
68
if (GetService(typeof(
IDesignerHost
)) is
IDesignerHost
host)
261
if (GetService(typeof(
IDesignerHost
)) is
IDesignerHost
host && host.Container == Container)
System\ComponentModel\Design\ToolStripContainerActionList.cs (2)
16
private readonly
IDesignerHost
? _designerHost;
26
_designerHost = _serviceProvider?.GetService<
IDesignerHost
>();
System\ComponentModel\Design\TypeDescriptorFilterService.cs (1)
27
if (site.TryGetService(out
IDesignerHost
? host))
System\ComponentModel\Design\UndoEngine.cs (2)
23
private readonly
IDesignerHost
_host;
44
_host = GetRequiredService<
IDesignerHost
>();
System\ComponentModel\Design\UndoEngine.UndoUnit.AddRemoveUndoEvent.cs (4)
76
IDesignerHost
host = engine.GetRequiredService<
IDesignerHost
>();
84
IDesignerHost
host = engine.GetRequiredService<
IDesignerHost
>();
System\ComponentModel\Design\UndoEngine.UndoUnit.ChangeUndoEvent.cs (2)
117
else if (engine.TryGetService(out
IDesignerHost
? host))
158
if (engine.TryGetService(out
IDesignerHost
? host))
System\Drawing\Design\IToolboxService.cs (10)
38
void AddCreator(ToolboxItemCreatorCallback creator, string format,
IDesignerHost
host);
43
void AddLinkedToolboxItem(ToolboxItem toolboxItem,
IDesignerHost
host);
48
void AddLinkedToolboxItem(ToolboxItem toolboxItem, string category,
IDesignerHost
host);
68
ToolboxItem DeserializeToolboxItem(object serializedObject,
IDesignerHost
host);
78
ToolboxItem GetSelectedToolboxItem(
IDesignerHost
host);
88
ToolboxItemCollection GetToolboxItems(
IDesignerHost
host);
98
ToolboxItemCollection GetToolboxItems(string category,
IDesignerHost
host);
105
bool IsSupported(object serializedObject,
IDesignerHost
host);
122
bool IsToolboxItem(object serializedObject,
IDesignerHost
host);
137
void RemoveCreator(string format,
IDesignerHost
host);
System\Drawing\Design\ToolboxComponentsCreatingEventArgs.cs (2)
17
public ToolboxComponentsCreatingEventArgs(
IDesignerHost
? host)
26
public
IDesignerHost
? DesignerHost { get; }
System\Drawing\Design\ToolboxItem.cs (6)
222
public IComponent[]? CreateComponents(
IDesignerHost
? host)
239
public IComponent[]? CreateComponents(
IDesignerHost
? host, IDictionary? defaultValues)
255
protected virtual IComponent[]? CreateComponentsCore(
IDesignerHost
? host)
278
protected virtual IComponent[]? CreateComponentsCore(
IDesignerHost
? host, IDictionary? defaultValues)
437
public Type? GetType(
IDesignerHost
? host) => GetType(host, AssemblyName, TypeName, false);
446
protected virtual Type? GetType(
IDesignerHost
? host, AssemblyName? assemblyName, string typeName, bool reference)
System\Windows\Forms\Design\BaseContextMenuStrip.cs (2)
83
if (_serviceProvider.GetService(typeof(ISelectionService)) is ISelectionService selectionService && _serviceProvider.GetService(typeof(
IDesignerHost
)) is
IDesignerHost
host)
System\Windows\Forms\Design\Behavior\BehaviorService.cs (6)
82
IDesignerHost
? host = serviceProvider.GetService<
IDesignerHost
>();
171
_serviceProvider.GetService(typeof(
IDesignerHost
)) is
IDesignerHost
host)
789
IDesignerHost
? host = _serviceProvider.GetService<
IDesignerHost
>();
System\Windows\Forms\Design\Behavior\ContainerSelectorBehavior.cs (3)
207
IDesignerHost
host = (
IDesignerHost
)_serviceProvider.GetService(typeof(
IDesignerHost
));
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (5)
149
if (!(serviceProvider.GetService(typeof(
IDesignerHost
)) is
IDesignerHost
host) || _behaviorService is null)
487
if (_serviceProvider.GetService(typeof(
IDesignerHost
)) is
IDesignerHost
host)
522
private void Initialize(List<IComponent>? dragComponents,
IDesignerHost
host)
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (9)
68
private readonly
IDesignerHost
_srcHost;
69
private
IDesignerHost
_destHost;
100
_srcHost = (
IDesignerHost
)_serviceProviderSource.GetService(typeof(
IDesignerHost
));
316
_destHost = (
IDesignerHost
)_serviceProviderTarget.GetService(typeof(
IDesignerHost
));
649
IDesignerHost
newDestHost = (
IDesignerHost
)_serviceProviderTarget.GetService(typeof(
IDesignerHost
));
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (5)
216
if (_serviceProvider.GetService(typeof(
IDesignerHost
)) is
IDesignerHost
designerHost)
233
IDesignerHost
host = (
IDesignerHost
)_serviceProvider.GetService(typeof(
IDesignerHost
));
System\Windows\Forms\Design\Behavior\SelectionManager.cs (2)
25
private
IDesignerHost
_designerHost;
50
_designerHost = serviceProvider.GetRequiredService<
IDesignerHost
>();
System\Windows\Forms\Design\Behavior\TableLayoutPanelBehavior.cs (3)
116
IDesignerHost
host = _serviceProvider.GetService(typeof(
IDesignerHost
)) as
IDesignerHost
;
System\Windows\Forms\Design\Behavior\ToolboxItemSnapLineBehavior.cs (3)
344
IDesignerHost
host = (
IDesignerHost
)_serviceProvider.GetService(typeof(
IDesignerHost
));
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionBehavior.cs (3)
136
var host = _serviceProvider.GetRequiredService<
IDesignerHost
>();
265
IDesignerHost
host = _serviceProvider.GetRequiredService<
IDesignerHost
>();
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionGlyph.cs (2)
34
IDesignerHost
? host = _provider?.GetService<
IDesignerHost
>();
System\Windows\Forms\Design\BindingNavigatorDesigner.cs (4)
54
IDesignerHost
? host = Component?.Site?.GetService<
IDesignerHost
>();
95
private void SiteItem(
IDesignerHost
? host, ToolStripItem item)
117
private void SiteItems(
IDesignerHost
? host, ToolStripItemCollection items)
System\Windows\Forms\Design\ChangeToolStripParentVerb.cs (2)
18
private readonly
IDesignerHost
_host;
26
_host = _provider.GetService<
IDesignerHost
>();
System\Windows\Forms\Design\CommandSet.cs (37)
66
if (site.TryGetService(out
IDesignerHost
? host))
376
if (site.TryGetService(out
IDesignerHost
? host))
456
if (TryGetService(out
IDesignerHost
? host))
499
IDesignerHost
? host = site.GetService<
IDesignerHost
>();
515
private static void GetAssociatedComponents(IComponent component,
IDesignerHost
host, List<IComponent> list)
599
protected virtual void GetSnapInformation(
IDesignerHost
host, IComponent component, out Size snapSize, out IComponent snapComponent, out PropertyDescriptor? snapProperty)
685
if (TryGetService(out IToolboxService? tbx) && tbx.GetSelectedToolboxItem(GetService<
IDesignerHost
>()) is not null)
717
if (TryGetService(out
IDesignerHost
? host))
734
if (SelectionService?.PrimarySelection is IComponent comp && TryGetService(out
IDesignerHost
? host) &&
986
IDesignerHost
? host = GetService<
IDesignerHost
>();
1131
IDesignerHost
? host = GetService<
IDesignerHost
>();
1254
IDesignerHost
? host = GetService<
IDesignerHost
>();
1466
if (TryGetService(out
IDesignerHost
? host))
1583
if (site is null || SelectionService is null || !TryGetService(out
IDesignerHost
? host))
1841
if (!TryGetService(out
IDesignerHost
? host))
2195
if (site is null || SelectionService is null || !TryGetService(out
IDesignerHost
? host))
2241
if (site is null || !TryGetService(out
IDesignerHost
? host))
2315
IDesignerHost
? host = GetService<
IDesignerHost
>();
2382
IDesignerHost
? host = GetService<
IDesignerHost
>();
2477
if (site.TryGetService(out
IDesignerHost
? host))
2520
IDesignerHost
? host = GetService<
IDesignerHost
>();
2899
IDesignerHost
? designerHost = GetService<
IDesignerHost
>();
2993
&& TryGetService(out
IDesignerHost
? host)
3047
if (TryGetService(out
IDesignerHost
? host))
3079
if (TryGetService(out
IDesignerHost
? host)
3128
IDesignerHost
host = GetService<
IDesignerHost
>()!;
3342
IDesignerHost
? host = GetService<
IDesignerHost
>();
System\Windows\Forms\Design\ComponentTray.cs (46)
85
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
278
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
301
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
317
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
405
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
515
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
682
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
751
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
860
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
1078
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
1124
_mouseDragTool = _toolboxService.DeserializeToolboxItem(de.Data, (
IDesignerHost
)GetService(typeof(
IDesignerHost
)));
1234
ToolboxItem tool = _toolboxService.GetSelectedToolboxItem((
IDesignerHost
)GetService(typeof(
IDesignerHost
)));
1532
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
1695
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
2092
IDesignerHost
host = (
IDesignerHost
)_tray.GetService(typeof(
IDesignerHost
));
2495
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
System\Windows\Forms\Design\ControlCodeDomSerializer.cs (3)
177
IDesignerHost
? host = manager.GetService<
IDesignerHost
>();
220
private void SerializeControlHierarchy(IDesignerSerializationManager manager,
IDesignerHost
host, object? value)
System\Windows\Forms\Design\ControlCommandSet.cs (32)
278
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
367
protected override void GetSnapInformation(
IDesignerHost
host, IComponent component, out Size snapSize, out IComponent snapComponent, out PropertyDescriptor snapProperty)
522
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
850
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
942
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
954
_tabOrder = new TabOrder((
IDesignerHost
)GetService(typeof(
IDesignerHost
)));
984
IDesignerHost
designerHost = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
1194
IDesignerHost
host = (
IDesignerHost
)site.GetService(typeof(
IDesignerHost
));
1254
if (site.TryGetService(out
IDesignerHost
host)
1271
if (site.TryGetService(out
IDesignerHost
host)
1293
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
1368
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
1436
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
System\Windows\Forms\Design\ControlDesigner.ControlDesignerAccessibleObject.cs (3)
15
private
IDesignerHost
? _host;
28
private
IDesignerHost
DesignerHost => _host ??= _designer.GetRequiredService<
IDesignerHost
>();
System\Windows\Forms\Design\ControlDesigner.cs (7)
23
private
IDesignerHost
? _host; // the host for our designer
164
if ((!TryGetService(out
IDesignerHost
? host) || (host is not null && !host.Loading))
375
return TryGetService(out
IDesignerHost
? host) && Component == host.RootComponent;
931
_host = GetService<
IDesignerHost
>();
1149
&& TryGetService(out
IDesignerHost
? host))
1673
_host ??= GetService<
IDesignerHost
>();
1896
if (_toolboxService?.GetSelectedToolboxItem(GetService<
IDesignerHost
>()) is not null)
System\Windows\Forms\Design\ControlDesigner.DockingActionList.cs (3)
13
private readonly
IDesignerHost
? _host;
18
_host = GetService(typeof(
IDesignerHost
)) as
IDesignerHost
;
System\Windows\Forms\Design\DataGridViewAddColumnDialog.cs (6)
155
IDesignerHost
? host = _liveDataGridView.Site?.GetService<
IDesignerHost
>();
635
if (_liveDataGridView.Site.TryGetService(out
IDesignerHost
? host))
660
if (!_liveDataGridView.Site.TryGetService(out
IDesignerHost
? host))
770
IDesignerHost
? host = _liveDataGridView.Site?.GetService<
IDesignerHost
>();
System\Windows\Forms\Design\DataGridViewColumnDesigner.cs (3)
49
IDesignerHost
? host = null;
54
host = dataGridView.Site.GetService<
IDesignerHost
>();
281
if (!TryGetService(out
IDesignerHost
? host))
System\Windows\Forms\Design\DataGridViewColumnTypeEditor.cs (3)
29
IDesignerHost
? host = provider.GetService(typeof(
IDesignerHost
)) as
IDesignerHost
;
System\Windows\Forms\Design\DataGridViewDesigner.cs (16)
533
IDesignerHost
? host = site?.GetService<
IDesignerHost
>();
742
IDesignerHost
? host = Component.Site?.GetService<
IDesignerHost
>();
770
IDesignerHost
? host = Component.Site?.GetService<
IDesignerHost
>();
842
IDesignerHost
? host = dataGridView.Site?.GetService<
IDesignerHost
>();
921
IDesignerHost
? host = dataGridView.Site?.GetService<
IDesignerHost
>();
964
IDesignerHost
? host = dataGridView.Site?.GetService<
IDesignerHost
>();
1007
IDesignerHost
? host = dataGridView.Site?.GetService<
IDesignerHost
>();
1050
IDesignerHost
? host = dataGridView.Site?.GetService<
IDesignerHost
>();
System\Windows\Forms\Design\DataSourceProviderService.cs (1)
20
public abstract object AddDataSourceInstance(
IDesignerHost
? host, DataSourceDescriptor dataSourceDescriptor);
System\Windows\Forms\Design\DesignBindingPicker.cs (2)
101
private
IDesignerHost
? _designerHost; // Service that provides access to current WinForms designer session
388
_designerHost = _serviceProvider.GetService<
IDesignerHost
>();
System\Windows\Forms\Design\DesignerExtenders.NameExtenderProvider.cs (3)
34
IDesignerHost
? host = (
IDesignerHost
?)site.GetService(typeof(
IDesignerHost
));
System\Windows\Forms\Design\DesignerUtils.cs (5)
617
public static string? GetUniqueSiteName(
IDesignerHost
host, string? name)
744
IDesignerHost
? host = svcProvider.GetService<
IDesignerHost
>();
790
private static List<IComponent> GetCopySelection(IReadOnlyList<IComponent> objects,
IDesignerHost
host)
802
internal static void GetAssociatedComponents(IComponent component,
IDesignerHost
? host, List<IComponent> list)
System\Windows\Forms\Design\DocumentDesigner.AxToolboxItem.cs (3)
61
protected override IComponent[] CreateComponentsCore(
IDesignerHost
? host)
161
private Type? GetAxTypeFromReference(object reference,
IDesignerHost
host)
220
private static object? GetReferences(
IDesignerHost
host)
System\Windows\Forms\Design\DocumentDesigner.cs (28)
115
IDesignerHost
host = GetService(typeof(
IDesignerHost
)) as
IDesignerHost
;
266
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
341
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
625
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
682
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
840
if (GetService(typeof(
IDesignerHost
)) is
IDesignerHost
host)
879
if (!TryGetService(out
IDesignerHost
host))
953
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
989
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
1104
((
IDesignerHost
)sender).LoadComplete -= OnLoadComplete;
1376
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (1)
567
DesignerTransaction designerTransaction = TryGetService(out
IDesignerHost
host)
System\Windows\Forms\Design\FormDocumentDesigner.cs (7)
130
GetService<
IDesignerHost
>();
289
IDesignerHost
host = GetService<
IDesignerHost
>();
335
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
363
if (ce.Component is ToolStrip && _toolStripAdornerWindowService is null && TryGetService(out
IDesignerHost
_))
System\Windows\Forms\Design\OleDragDropHandler.CfCodeToolboxItem.cs (2)
75
protected override IComponent[]? CreateComponentsCore(
IDesignerHost
? host, IDictionary? defaultValues)
147
protected override IComponent[]? CreateComponentsCore(
IDesignerHost
? host) => CreateComponentsCore(host, null);
System\Windows\Forms\Design\OleDragDropHandler.ComponentDataObject.cs (4)
99
IDesignerHost
? host = _serviceProvider.GetService<
IDesignerHost
>();
117
private static void GetAssociatedComponents(IComponent component,
IDesignerHost
host, List<IComponent> list)
212
IDesignerHost
? host = null;
System\Windows\Forms\Design\OleDragDropHandler.cs (5)
144
IDesignerHost
? host = GetService<
IDesignerHost
>();
522
if (TryGetService(out
IDesignerHost
? host))
667
IDesignerHost
host = GetService<
IDesignerHost
>()!;
System\Windows\Forms\Design\ParentControlDesigner.cs (50)
188
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
267
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
405
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
454
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
598
private void AddChildComponents(IComponent component, IContainer container,
IDesignerHost
host)
690
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
896
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
999
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
1063
_oleDragDropHandler ??= new OleDragDropHandler(null, (IServiceProvider)GetService(typeof(
IDesignerHost
)), this);
1076
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
1209
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
1247
if (GetService(typeof(
IDesignerHost
)) is not
IDesignerHost
host)
1422
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
1491
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
1611
private void PerformDragEnter(DragEventArgs de,
IDesignerHost
host)
1676
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
1719
_mouseDragTool = _toolboxService.GetSelectedToolboxItem((
IDesignerHost
)GetService(typeof(
IDesignerHost
)));
2132
private void ReParentControls(Control newParent, List<Control> controls, string transactionName,
IDesignerHost
host)
2313
IDesignerHost
localDesignerHost = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
2473
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
System\Windows\Forms\Design\SelectionUIHandler.cs (2)
336
IDesignerHost
? host = GetService<
IDesignerHost
>();
System\Windows\Forms\Design\SelectionUIService.cs (2)
53
private readonly
IDesignerHost
_host;
60
public SelectionUIService(
IDesignerHost
host) : base()
System\Windows\Forms\Design\SplitContainerDesigner.cs (3)
22
private
IDesignerHost
? _designerHost;
239
_designerHost = (
IDesignerHost
?)component.Site?.GetService(typeof(
IDesignerHost
));
System\Windows\Forms\Design\SplitterPanelDesigner.cs (3)
19
private
IDesignerHost
? _designerHost;
110
_designerHost = (
IDesignerHost
?)component.Site?.GetService(typeof(
IDesignerHost
));
System\Windows\Forms\Design\StandardMenuStripVerb.cs (5)
21
private readonly
IDesignerHost
_host;
33
_host = (
IDesignerHost
)_provider.GetService(typeof(
IDesignerHost
));
67
private void CreateStandardMenuStrip(
IDesignerHost
host, MenuStrip tool)
261
private void CreateStandardToolStrip(
IDesignerHost
host, ToolStrip tool)
System\Windows\Forms\Design\StyleEditorForm.cs (4)
102
var
host = _tableLayoutPanel.Site.GetService<
IDesignerHost
>();
1061
var
host = _tableLayoutPanel.Site.GetService<
IDesignerHost
>();
System\Windows\Forms\Design\TabControlDesigner.cs (12)
131
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
242
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
337
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
488
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
System\Windows\Forms\Design\TableLayoutPanelCodeDomSerializer.cs (3)
48
IDesignerHost
? host = manager.GetService<
IDesignerHost
>();
67
private static bool IsLocalizable([NotNullWhen(true)]
IDesignerHost
? host)
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (35)
93
IDesignerHost
host = GetService(typeof(
IDesignerHost
)) as
IDesignerHost
;
197
IDesignerHost
host = GetService(typeof(
IDesignerHost
)) as
IDesignerHost
;
502
IDesignerHost
host = GetService(typeof(
IDesignerHost
)) as
IDesignerHost
;
521
IDesignerHost
host = GetService(typeof(
IDesignerHost
)) as
IDesignerHost
;
549
IDesignerHost
host = GetService(typeof(
IDesignerHost
)) as
IDesignerHost
;
799
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
1159
IDesignerHost
host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
1537
if (tbx is not null && tbx.GetSelectedToolboxItem((
IDesignerHost
)GetService(typeof(
IDesignerHost
))) is not null)
1636
IDesignerHost
host = GetService(typeof(
IDesignerHost
)) as
IDesignerHost
;
1751
IDesignerHost
host = GetService(typeof(
IDesignerHost
)) as
IDesignerHost
;
1875
IDesignerHost
host = GetService(typeof(
IDesignerHost
)) as
IDesignerHost
;
1972
IDesignerHost
host = GetService(typeof(
IDesignerHost
)) as
IDesignerHost
;
System\Windows\Forms\Design\TabOrder.cs (2)
20
private
IDesignerHost
_host;
42
public TabOrder(
IDesignerHost
host)
System\Windows\Forms\Design\TemplateNodeCustomMenuItemCollection.cs (3)
65
IDesignerHost
designerHost = (
IDesignerHost
)_serviceProvider.GetService(typeof(
IDesignerHost
));
System\Windows\Forms\Design\ToolStripContainerDesigner.cs (3)
33
/// The <see cref="
IDesignerHost
"/> that owns this designer.
35
private
IDesignerHost
_designerHost => GetRequiredService<
IDesignerHost
>();
System\Windows\Forms\Design\ToolStripDesigner.cs (2)
45
private
IDesignerHost
_host; // get private copy of the DesignerHost
1423
_host = GetRequiredService<
IDesignerHost
>();
System\Windows\Forms\Design\ToolStripDesignerUtils.cs (3)
440
IDesignerHost
designerHost = (
IDesignerHost
)provider.GetService(typeof(
IDesignerHost
));
System\Windows\Forms\Design\ToolStripDropDownDesigner.cs (3)
23
private
IDesignerHost
_host;
350
_host = (
IDesignerHost
)GetService(typeof(
IDesignerHost
));
System\Windows\Forms\Design\ToolStripEditorManager.cs (3)
24
private readonly
IDesignerHost
_designerHost;
40
_designerHost = (
IDesignerHost
)comp.Site.GetService(typeof(
IDesignerHost
));
System\Windows\Forms\Design\ToolStripInSituService.cs (6)
18
private readonly
IDesignerHost
_designerHost;
31
_designerHost = (
IDesignerHost
)provider.GetService(typeof(
IDesignerHost
));
85
IDesignerHost
host = (
IDesignerHost
)_sp.GetService(typeof(
IDesignerHost
));
System\Windows\Forms\Design\ToolStripItemBehavior.cs (19)
77
IDesignerHost
designerHost = (
IDesignerHost
)item.Site.GetService(typeof(
IDesignerHost
));
153
private static Rectangle GetPaintingBounds(
IDesignerHost
designerHost, ToolStripItem item)
293
IDesignerHost
designerHost = (
IDesignerHost
)glyphItem.Site.GetService(typeof(
IDesignerHost
));
547
IDesignerHost
designerHost = (
IDesignerHost
)glyphItem.Site.GetService(typeof(
IDesignerHost
));
651
IDesignerHost
designerHost = (
IDesignerHost
)currentDropItem.Site.GetService(typeof(
IDesignerHost
));
916
IDesignerHost
designerHost = (
IDesignerHost
)item.Site.GetService(typeof(
IDesignerHost
));
974
IDesignerHost
designerHost = (
IDesignerHost
)glyphItem.Site.GetService(typeof(
IDesignerHost
));
System\Windows\Forms\Design\ToolStripItemCustomMenuItemCollection.cs (21)
207
IDesignerHost
_designerHost = (
IDesignerHost
)_serviceProvider.GetService(typeof(
IDesignerHost
));
233
IDesignerHost
_designerHost = (
IDesignerHost
)_serviceProvider.GetService(typeof(
IDesignerHost
));
304
IDesignerHost
_designerHost = (
IDesignerHost
)_serviceProvider.GetService(typeof(
IDesignerHost
));
372
IDesignerHost
designerHost = (
IDesignerHost
)_serviceProvider.GetService(typeof(
IDesignerHost
));
434
IDesignerHost
designerHost = (
IDesignerHost
)_serviceProvider.GetService(typeof(
IDesignerHost
));
473
IDesignerHost
designerHost = (
IDesignerHost
)_serviceProvider.GetService(typeof(
IDesignerHost
));
512
IDesignerHost
designerHost = (
IDesignerHost
)_serviceProvider.GetService(typeof(
IDesignerHost
));
System\Windows\Forms\Design\ToolStripItemDesigner.cs (9)
247
if (!TryGetService(out
IDesignerHost
designerHost))
333
IDesignerHost
designerHost = GetService<
IDesignerHost
>();
716
if (!TryGetService(out
IDesignerHost
host))
988
if (TryGetService(out
IDesignerHost
designerHost) && currentSelection.Owner is ToolStripDropDown parentDropDown)
1058
if (!TryGetService(out
IDesignerHost
host))
1216
IDesignerHost
designerHost = (
IDesignerHost
)Component.Site.GetService(typeof(
IDesignerHost
));
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (9)
20
private readonly
IDesignerHost
_designerHost;
62
_designerHost = (
IDesignerHost
)_provider.GetService(typeof(
IDesignerHost
));
129
private
IDesignerHost
Host
597
IDesignerHost
host = Host;
839
IDesignerHost
host = Host;
914
IDesignerHost
host = Host;
1672
IDesignerHost
host = Host;
1763
IDesignerHost
host = Host;
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (5)
32
private
IDesignerHost
_designerHost;
1519
_designerHost = GetService<
IDesignerHost
>();
2682
IDesignerHost
host = (
IDesignerHost
)primaryItem.Site.GetService(typeof(
IDesignerHost
));
System\Windows\Forms\Design\ToolStripPanelDesigner.cs (2)
22
private
IDesignerHost
? _designerHost;
324
_designerHost = component.Site?.GetService<
IDesignerHost
>();
System\Windows\Forms\Design\ToolStripTemplateNode.cs (2)
50
private readonly
IDesignerHost
_designerHost;
123
_designerHost = component.Site.GetService<
IDesignerHost
>();
System.Windows.Forms.Design.Tests (255)
Mocks\MockSite.cs (1)
16
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
SplitContainerDesignerTests.cs (1)
15
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
System\ComponentModel\Design\CollectionEditorTests.cs (24)
163
.Setup(c => c.GetService(typeof(
IDesignerHost
)))
205
Mock<
IDesignerHost
> mockHost = new(MockBehavior.Strict);
221
.Setup(c => c.GetService(typeof(
IDesignerHost
)))
252
Mock<
IDesignerHost
> mockHost = new(MockBehavior.Strict);
272
.Setup(c => c.GetService(typeof(
IDesignerHost
)))
309
Mock<
IDesignerHost
> mockHost = new(MockBehavior.Strict);
325
.Setup(c => c.GetService(typeof(
IDesignerHost
)))
419
.Setup(c => c.GetService(typeof(
IDesignerHost
)))
459
Mock<
IDesignerHost
> mockHost = new(MockBehavior.Strict);
472
.Setup(c => c.GetService(typeof(
IDesignerHost
)))
533
.Setup(c => c.GetService(typeof(
IDesignerHost
)))
564
Mock<
IDesignerHost
> mockHost = new(MockBehavior.Strict);
574
.Setup(c => c.GetService(typeof(
IDesignerHost
)))
610
Mock<
IDesignerHost
> mockHost = new(MockBehavior.Strict);
620
.Setup(c => c.GetService(typeof(
IDesignerHost
)))
657
Mock<
IDesignerHost
> mockHost = new(MockBehavior.Strict);
667
.Setup(c => c.GetService(typeof(
IDesignerHost
)))
700
Mock<
IDesignerHost
> mockHost = new(MockBehavior.Strict);
710
.Setup(c => c.GetService(typeof(
IDesignerHost
)))
737
.Setup(c => c.GetService(typeof(
IDesignerHost
)))
738
.Returns((
IDesignerHost
)null);
852
.Setup(c => c.GetService(typeof(
IDesignerHost
)))
960
.Setup(c => c.GetService(typeof(
IDesignerHost
)))
998
.Setup(c => c.GetService(typeof(
IDesignerHost
)))
System\ComponentModel\Design\CollectionFormTests.cs (15)
120
.Setup(c => c.GetService(typeof(
IDesignerHost
)))
176
.Setup(c => c.GetService(typeof(
IDesignerHost
)))
235
.Setup(c => c.GetService(typeof(
IDesignerHost
)))
294
.Setup(c => c.GetService(typeof(
IDesignerHost
)))
353
.Setup(c => c.GetService(typeof(
IDesignerHost
)))
407
.Setup(c => c.GetService(typeof(
IDesignerHost
)))
513
.Setup(c => c.GetService(typeof(
IDesignerHost
)))
556
Mock<
IDesignerHost
> mockHost = new(MockBehavior.Strict);
572
.Setup(c => c.GetService(typeof(
IDesignerHost
)))
604
Mock<
IDesignerHost
> mockHost = new(MockBehavior.Strict);
624
.Setup(c => c.GetService(typeof(
IDesignerHost
)))
662
Mock<
IDesignerHost
> mockHost = new(MockBehavior.Strict);
678
.Setup(c => c.GetService(typeof(
IDesignerHost
)))
734
.Setup(c => c.GetService(typeof(
IDesignerHost
)))
773
.Setup(c => c.GetService(typeof(
IDesignerHost
)))
System\ComponentModel\Design\ComponentDesignerTests.cs (98)
46
var
service = designer.GetService<
IDesignerHost
>();
52
service = designer.GetService<
IDesignerHost
>();
55
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
63
service = designer.GetService<
IDesignerHost
>();
82
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
105
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
143
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
207
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
308
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
320
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Once());
324
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Exactly(2));
329
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Exactly(3));
338
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
345
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Once());
349
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Exactly(2));
354
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Exactly(3));
377
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Once());
380
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Exactly(2));
384
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Exactly(3));
393
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
409
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Once());
414
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Exactly(rootComponent is null ? 2 : 3));
420
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Exactly(rootComponent is null ? 3 : 5));
431
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
438
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Once());
442
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Exactly(2));
447
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Exactly(3));
465
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Once());
468
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Exactly(2));
472
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Exactly(3));
481
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
488
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
527
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Once());
530
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Exactly(3));
534
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Exactly(4));
572
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
793
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
803
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
908
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
918
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
956
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Exactly(2));
969
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Exactly(3));
1017
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
1027
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
1069
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Exactly(2));
1093
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Exactly(3));
1125
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
1135
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
1175
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Exactly(2));
1186
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Exactly(3));
1218
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
1228
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
1268
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Exactly(2));
1279
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Exactly(3));
1309
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
1319
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
1358
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Exactly(2));
1369
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Exactly(3));
1403
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
1413
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
1453
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Exactly(2));
1466
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Exactly(3));
1510
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
1520
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
1560
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Exactly(2));
1573
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Exactly(3));
1608
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
1618
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
1657
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Exactly(2));
1667
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Exactly(3));
1691
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
1697
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
1735
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Exactly(2));
1742
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Exactly(3));
1759
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
1793
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Once());
1798
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Once());
1815
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
1852
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Once());
1858
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Once());
1891
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
1929
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Exactly(2));
1941
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Exactly(3));
1961
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
2022
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
2028
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
2057
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Once());
2070
Mock<
IDesignerHost
> mockNullDesignerHost = new(MockBehavior.Strict);
2076
Mock<
IDesignerHost
> mockNonNullDesignerHost = new(MockBehavior.Strict);
2090
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
2120
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Once());
2141
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
2177
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Once());
2201
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
2235
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Once());
2613
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
2651
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
System\ComponentModel\Design\DesignerActionServiceTests.cs (10)
16
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
24
.Setup(p => p.GetService(typeof(
IDesignerHost
)))
36
mockServiceProvider.Verify(p => p.GetService(typeof(
IDesignerHost
)), Times.Once());
252
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
261
.Setup(p => p.GetService(typeof(
IDesignerHost
)))
283
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
292
.Setup(p => p.GetService(typeof(
IDesignerHost
)))
315
.Setup(p => p.GetService(typeof(
IDesignerHost
)))
316
.Returns((
IDesignerHost
)null);
327
.Setup(p => p.GetService(typeof(
IDesignerHost
)))
System\ComponentModel\Design\DesignerHostTests.cs (34)
2251
IDesignerHost
host = surface.Host;
2263
IDesignerHost
host = surface.Host;
2272
IDesignerHost
host = surface.Host;
2396
IDesignerHost
host = surface.Host;
2418
IDesignerHost
host = surface.Host;
2427
IDesignerHost
host = surface.Host;
2431
private static readonly
IDesignerHost
s_placeholderHost = new Mock<
IDesignerHost
>(MockBehavior.Strict).Object;
2503
IDesignerHost
newDesigner = eventArgs.NewDesigner == s_placeholderHost ? host : eventArgs.NewDesigner;
2504
IDesignerHost
oldDesigner = eventArgs.OldDesigner == s_placeholderHost ? host : eventArgs.OldDesigner;
3068
Assert.Equal(typeof(
IDesignerHost
), reflect.UnderlyingSystemType);
3076
Assert.Equal(typeof(
IDesignerHost
).GetField(nameof(
IDesignerHost
.Activate)), reflect.GetField(nameof(
IDesignerHost
.Activate), BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public));
3084
Assert.Equal(typeof(
IDesignerHost
).GetFields(), reflect.GetFields(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public));
3092
Assert.Equal(typeof(
IDesignerHost
).GetMember(nameof(
IDesignerHost
.Container)), reflect.GetMember(nameof(
IDesignerHost
.Container), BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public));
3100
Assert.Equal(typeof(
IDesignerHost
).GetMembers(), reflect.GetMembers(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public));
3108
Assert.Equal(typeof(
IDesignerHost
).GetMethod(nameof(
IDesignerHost
.Activate)), reflect.GetMethod(nameof(
IDesignerHost
.Activate), BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public));
3109
Assert.Equal(typeof(
IDesignerHost
).GetMethod(nameof(
IDesignerHost
.Activate)), reflect.GetMethod(nameof(
IDesignerHost
.Activate), BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public, null, Array.Empty<Type>(), Array.Empty<ParameterModifier>()));
3117
Assert.Equal(typeof(
IDesignerHost
).GetMethods(), reflect.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public));
3125
Assert.Equal(typeof(
IDesignerHost
).GetProperty(nameof(
IDesignerHost
.Container)), reflect.GetProperty(nameof(
IDesignerHost
.Container), BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public));
3126
Assert.Equal(typeof(
IDesignerHost
).GetProperty(nameof(
IDesignerHost
.Container)), reflect.GetProperty(nameof(
IDesignerHost
.Container), BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public, null, typeof(IContainer), Array.Empty<Type>(), Array.Empty<ParameterModifier>()));
3134
Assert.Equal(typeof(
IDesignerHost
).GetProperties(), reflect.GetProperties(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public));
3142
Assert.Equal(surface.Host.Container, reflect.InvokeMember(nameof(
IDesignerHost
.Container), BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.GetProperty, null, surface.Host, Array.Empty<object>(), Array.Empty<ParameterModifier>(), null, Array.Empty<string>()));
System\ComponentModel\Design\DesignSurfaceTests.cs (1)
270
yield return new object[] { typeof(
IDesignerHost
) };
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationServiceTests.cs (5)
97
.Setup(p => p.GetService(typeof(
IDesignerHost
)))
194
.Setup(p => p.GetService(typeof(
IDesignerHost
)))
233
mockServiceProvider.Verify(p => p.GetService(typeof(
IDesignerHost
)), Times.Exactly(2));
287
.Setup(p => p.GetService(typeof(
IDesignerHost
)))
333
mockServiceProvider.Verify(p => p.GetService(typeof(
IDesignerHost
)), Times.Exactly(2));
System\ComponentModel\Design\Serialization\DesignerSerializationManagerTests.cs (20)
31
.Setup(p => p.GetService(typeof(
IDesignerHost
)))
32
.Returns((
IDesignerHost
)null);
37
.Setup(p => p.GetService(typeof(
IDesignerHost
)))
42
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
48
.Setup(p => p.GetService(typeof(
IDesignerHost
)))
714
.Setup(p => p.GetService(typeof(
IDesignerHost
)))
720
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
726
.Setup(p => p.GetService(typeof(
IDesignerHost
)))
808
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
814
.Setup(p => p.GetService(typeof(
IDesignerHost
)))
1080
.Setup(p => p.GetService(typeof(
IDesignerHost
)))
1081
.Returns((
IDesignerHost
)null);
1101
.Setup(p => p.GetService(typeof(
IDesignerHost
)))
1102
.Returns((
IDesignerHost
)null);
1448
.Setup(p => p.GetService(typeof(
IDesignerHost
)))
1449
.Returns((
IDesignerHost
)null);
1479
.Setup(p => p.GetService(typeof(
IDesignerHost
)))
1480
.Returns((
IDesignerHost
)null);
1576
.Setup(p => p.GetService(typeof(
IDesignerHost
)))
1577
.Returns((
IDesignerHost
)null);
System\ComponentModel\Design\UndoUnitTests.cs (2)
18
Mock<
IDesignerHost
> mockDesignerHost = new();
21
.Setup(p => p.GetService(typeof(
IDesignerHost
)))
System\Drawing\Design\ToolboxComponentsCreatingEventArgsTests.cs (2)
14
yield return new object[] { new Mock<
IDesignerHost
>(MockBehavior.Strict).Object };
19
public void Ctor_IDesignerHost(
IDesignerHost
host)
System\Drawing\Design\ToolboxItemTests.cs (18)
426
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
492
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
560
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
619
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
745
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
811
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
879
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
1189
Mock<
IDesignerHost
> nullServiceDesignerHost = new(MockBehavior.Strict);
1254
Mock<
IDesignerHost
> invalidServiceDesignerHost = new(MockBehavior.Strict);
1262
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
1278
public void ToolboxItem_GetType_InvokeWithoutTypeNameAssemblyName_ReturnsExpected(
IDesignerHost
host, AssemblyName assemblyName, string typeName, bool reference, Type expected)
1295
public void ToolboxItem_GetType_InvokeWithTypeNameAssemblyName_ReturnsExpected(
IDesignerHost
host, AssemblyName assemblyName, string typeName, bool reference, Type expected)
1305
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
1317
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
1641
public new IComponent[] CreateComponentsCore(
IDesignerHost
host)
1646
public new IComponent[] CreateComponentsCore(
IDesignerHost
host, IDictionary defaultValues)
1656
public new Type GetType(
IDesignerHost
host, AssemblyName assemblyName, string typeName, bool reference)
1743
protected override IComponent[] CreateComponentsCore(
IDesignerHost
host)
System\Windows\Forms\Design\ContextMenuStripActionListTests.cs (2)
14
private readonly Mock<
IDesignerHost
> _mockDesignerHost;
38
mockSite.Setup(s => s.GetService(typeof(
IDesignerHost
))).Returns(_mockDesignerHost.Object);
System\Windows\Forms\Design\DataGridViewColumnDesignerTests.cs (2)
20
Mock<
IDesignerHost
> designerHostMock = new();
26
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
System\Windows\Forms\Design\FlowPanelDesignerTests.cs (1)
17
Mock<
IDesignerHost
> mockHost = new();
System\Windows\Forms\Design\SplitterPanelDesignerTests.cs (3)
23
Mock<
IDesignerHost
> mockDesignerHost = new();
27
mockSite.Setup(s => s.GetService(typeof(
IDesignerHost
))).Returns(mockDesignerHost.Object);
52
((
IDesignerHost
)splitterPanelDesigner.TestAccessor().Dynamic._designerHost).Should().Be(mockDesignerHost.Object);
System\Windows\Forms\Design\TabControlDesignerTests.cs (4)
14
private (TabControlDesigner designer, TabControl tabControl) CreateInitializedDesignerWithServiceProvider(out Mock<IServiceProvider> serviceProvider, out Mock<
IDesignerHost
> designerHost)
20
serviceProvider.Setup(s => s.GetService(typeof(
IDesignerHost
))).Returns(designerHost.Object);
31
Mock<
IDesignerHost
> designerHost = new();
32
serviceProvider.Setup(s => s.GetService(typeof(
IDesignerHost
))).Returns(designerHost.Object);
System\Windows\Forms\Design\TextBoxBaseDesignerTests.cs (2)
23
site.Setup(s => s.GetService(typeof(
IDesignerHost
))).Returns(new Mock<
IDesignerHost
>().Object);
System\Windows\Forms\Design\ToolStripContainerDesignerTests.cs (2)
15
private readonly Mock<
IDesignerHost
> _mockDesignerHost;
33
mockSite.Setup(s => s.GetService(typeof(
IDesignerHost
))).Returns(_mockDesignerHost.Object);
System\Windows\Forms\Design\UpDownBaseDesignerTests.cs (2)
23
site.Setup(s => s.GetService(typeof(
IDesignerHost
))).Returns(new Mock<
IDesignerHost
>().Object);
TestControlDesigner.Mocks.cs (2)
15
internal readonly Mock<
IDesignerHost
> _mockDesignerHost = new();
48
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
ToolStripDesignerTests.cs (1)
21
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
ToolStripDropDownDesignerTest.cs (1)
19
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
ToolStripMenuItemDesignerTest.cs (2)
99
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
128
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
System.Windows.Forms.Primitives (2)
System\ServiceExtensions.cs (2)
52
/// <param name="designerHost">The <see cref="
IDesignerHost
"/> to retrieve the service object from.</param>
58
[NotNullWhen(true)] this
IDesignerHost
? designerHost,
System.Windows.Forms.Tests (52)
System\Windows\Forms\AxHostTests.cs (17)
262
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
602
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
635
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
666
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
697
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
730
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
761
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
796
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
844
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
1781
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
1834
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
1891
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
1946
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
2003
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
2065
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
2130
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
2204
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
System\Windows\Forms\ControlTests.Methods.cs (9)
2552
Mock<
IDesignerHost
> mockNullDesignerHost = new(MockBehavior.Strict);
2558
Mock<
IDesignerHost
> mockUnknownDesignerHost = new(MockBehavior.Strict);
2575
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
2589
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Once());
2594
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Exactly(2));
2637
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
2643
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
2661
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Once());
2667
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Exactly(2));
System\Windows\Forms\Design\EventsTabTests.cs (4)
90
Mock<
IDesignerHost
> nullMockDesignerHost = new(MockBehavior.Strict);
94
Mock<
IDesignerHost
> invalidMockDesignerHost = new(MockBehavior.Strict);
104
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
141
public
IDesignerHost
ActiveDesigner { get; set; }
System\Windows\Forms\ErrorProviderTests.cs (8)
651
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
657
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
668
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
692
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
725
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
731
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
738
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Once());
742
mockSite.Verify(s => s.GetService(typeof(
IDesignerHost
)), Times.Once());
System\Windows\Forms\PropertyGridTests.cs (14)
2715
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
2733
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
2767
var
previousActiveDesigner = propertyGrid.ActiveDesigner;
2797
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
2798
.Returns((
IDesignerHost
)null);
2815
Mock<
IDesignerHost
> mockNullDesignerHost = new(MockBehavior.Strict);
2833
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
2839
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
2857
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
2919
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
2935
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
2953
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
2969
Mock<
IDesignerHost
> mockDesignerHost = new(MockBehavior.Strict);
2987
.Setup(s => s.GetService(typeof(
IDesignerHost
)))
System.Windows.Forms.UI.IntegrationTests (15)
DesignBehaviorsTests.cs (15)
62
var
designerHost = (
IDesignerHost
)designSurface.GetService(typeof(
IDesignerHost
))!;
142
private readonly
IDesignerHost
_designerHost;
144
public SampleToolboxService(
IDesignerHost
designerHost)
154
public void AddCreator(ToolboxItemCreatorCallback creator, string format,
IDesignerHost
host)
159
public void AddLinkedToolboxItem(ToolboxItem toolboxItem,
IDesignerHost
host)
164
public void AddLinkedToolboxItem(ToolboxItem toolboxItem, string category,
IDesignerHost
host)
184
public ToolboxItem DeserializeToolboxItem(object serializedObject,
IDesignerHost
? host)
195
public ToolboxItem GetSelectedToolboxItem(
IDesignerHost
host)
205
public ToolboxItemCollection GetToolboxItems(
IDesignerHost
host)
215
public ToolboxItemCollection GetToolboxItems(string category,
IDesignerHost
host)
220
public bool IsSupported(object serializedObject,
IDesignerHost
host)
235
public bool IsToolboxItem(object serializedObject,
IDesignerHost
host)
250
public void RemoveCreator(string format,
IDesignerHost
host)