-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
IComponentDiscoveryService.xml
137 lines (122 loc) · 9.62 KB
/
IComponentDiscoveryService.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<Type Name="IComponentDiscoveryService" FullName="System.ComponentModel.Design.IComponentDiscoveryService">
<TypeSignature Language="C#" Value="public interface IComponentDiscoveryService" />
<TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract IComponentDiscoveryService" FrameworkAlternate="net-5.0;net-6.0;net-7.0;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;netstandard-2.0;netstandard-2.1" />
<TypeSignature Language="DocId" Value="T:System.ComponentModel.Design.IComponentDiscoveryService" />
<TypeSignature Language="VB.NET" Value="Public Interface IComponentDiscoveryService" />
<TypeSignature Language="F#" Value="type IComponentDiscoveryService = interface" />
<TypeSignature Language="C++ CLI" Value="public interface class IComponentDiscoveryService" />
<TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract beforefieldinit IComponentDiscoveryService" FrameworkAlternate="net-8.0;net-9.0" />
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.TypeConverter</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<AssemblyVersion>4.2.2.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<TypeForwardingChain>
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.ComponentModel.TypeConverter" ToVersion="5.0.0.0" FrameworkAlternate="net-5.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.ComponentModel.TypeConverter" ToVersion="6.0.0.0" FrameworkAlternate="net-6.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.ComponentModel.TypeConverter" ToVersion="7.0.0.0" FrameworkAlternate="net-7.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.ComponentModel.TypeConverter" ToVersion="8.0.0.0" FrameworkAlternate="net-8.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.ComponentModel.TypeConverter" ToVersion="9.0.0.0" FrameworkAlternate="net-9.0" />
</TypeForwardingChain>
<Interfaces />
<Attributes>
<Attribute FrameworkAlternate="net-8.0;net-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.NullableContext(2)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.NullableContext(2)>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Enables enumeration of components at design time.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The default implementation of the <xref:System.ComponentModel.Design.IComponentDiscoveryService> interface enables design-time enumeration of components in the Toolbox.
You could provide a custom implementation that enumerates across other types available at design time. For example, your implementation could enumerate the components that are present in a particular designer.
## Examples
The following code example demonstrates how to use <xref:System.ComponentModel.Design.IComponentDiscoveryService> to find all the types that derive from the <xref:System.Windows.Forms.ScrollableControl> type.
:::code language="csharp" source="~/snippets/csharp/System.ComponentModel/TypeDescriptor/GetProperties/Form1.cs" id="Snippet13":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.ComponentModel.Design.DesignerServices/VB/Form1.vb" id="Snippet13":::
]]></format>
</remarks>
<altmember cref="T:System.ComponentModel.Design.IDesignerHost" />
<altmember cref="T:System.ComponentModel.IComponent" />
</Docs>
<Members>
<Member MemberName="GetComponentTypes">
<MemberSignature Language="C#" Value="public System.Collections.ICollection GetComponentTypes (System.ComponentModel.Design.IDesignerHost designerHost, Type baseType);" FrameworkAlternate="net-5.0;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;netstandard-2.0;netstandard-2.1" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Collections.ICollection GetComponentTypes(class System.ComponentModel.Design.IDesignerHost designerHost, class System.Type baseType) cil managed" />
<MemberSignature Language="DocId" Value="M:System.ComponentModel.Design.IComponentDiscoveryService.GetComponentTypes(System.ComponentModel.Design.IDesignerHost,System.Type)" />
<MemberSignature Language="VB.NET" Value="Public Function GetComponentTypes (designerHost As IDesignerHost, baseType As Type) As ICollection" />
<MemberSignature Language="F#" Value="abstract member GetComponentTypes : System.ComponentModel.Design.IDesignerHost * Type -> System.Collections.ICollection" Usage="iComponentDiscoveryService.GetComponentTypes (designerHost, baseType)" />
<MemberSignature Language="C++ CLI" Value="public:
 System::Collections::ICollection ^ GetComponentTypes(System::ComponentModel::Design::IDesignerHost ^ designerHost, Type ^ baseType);" />
<MemberSignature Language="C#" Value="public System.Collections.ICollection GetComponentTypes (System.ComponentModel.Design.IDesignerHost? designerHost, Type? baseType);" FrameworkAlternate="net-6.0;net-7.0;net-8.0;net-9.0" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.TypeConverter</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<AssemblyVersion>4.2.2.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.ICollection</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="designerHost" Type="System.ComponentModel.Design.IDesignerHost" />
<Parameter Name="baseType" Type="System.Type" />
</Parameters>
<Docs>
<param name="designerHost">The designer host providing design-time services. Can be <see langword="null" />.</param>
<param name="baseType">The base type specifying the components to retrieve. Can be <see langword="null" />.</param>
<summary>Gets the list of available component types.</summary>
<returns>The list of available component types.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.ComponentModel.Design.IComponentDiscoveryService.GetComponentTypes%2A> method retrieves the list of available component types, which are types implementing the <xref:System.ComponentModel.IComponent> interface. If the `baseType` parameter is `null`, all components are retrieved; otherwise, only component types derived from `baseType` are returned.
When you pass in a value for the `designerHost` parameter, type resolution is scoped to `designerHost`. This means that if there is a <xref:System.Drawing.Design.ToolboxItem> whose type is on disk, and not in the global assembly cache, its type will fail to load through `designerHost`.
If you pass in `null` for `designerHost`, it returns all types that can be queried from the global assembly cache or the <xref:System.Reflection.Assembly.LoadFrom%2A?displayProperty=nameWithType> method.
## Examples
The following code example demonstrates how to use the <xref:System.ComponentModel.Design.IComponentDiscoveryService.GetComponentTypes%2A> method to find all the types that derive from the <xref:System.Windows.Forms.ScrollableControl> type.
:::code language="csharp" source="~/snippets/csharp/System.ComponentModel/TypeDescriptor/GetProperties/Form1.cs" id="Snippet13":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.ComponentModel.Design.DesignerServices/VB/Form1.vb" id="Snippet13":::
]]></format>
</remarks>
<altmember cref="T:System.ComponentModel.Design.IDesignerHost" />
<altmember cref="T:System.ComponentModel.IComponent" />
</Docs>
</Member>
</Members>
</Type>