FeatureManager.RunningConnectors 属性
获取当前运行的所有连接器的枚举。
命名空间: Microsoft.Windows.Design.Features
程序集: Microsoft.Windows.Design.Extensibility(在 Microsoft.Windows.Design.Extensibility.dll 中)
语法
声明
Public ReadOnly Property RunningConnectors As IEnumerable(Of FeatureConnectorInformation)
Get
public IEnumerable<FeatureConnectorInformation> RunningConnectors { get; }
public:
property IEnumerable<FeatureConnectorInformation^>^ RunningConnectors {
IEnumerable<FeatureConnectorInformation^>^ get ();
}
member RunningConnectors : IEnumerable<FeatureConnectorInformation>
function get RunningConnectors () : IEnumerable<FeatureConnectorInformation>
属性值
类型:System.Collections.Generic.IEnumerable<FeatureConnectorInformation>
当前运行的功能连接器的枚举。
示例
下面的代码示例演示如何使用 FeatureManager 类来访问正在运行和挂起的连接器。 有关完整的代码列表,请参见如何:创建自定义功能连接器。
' Binds the activatedFeatures and pendingFeatures controls
' the FeatureManager's RunningConnectors and PendingConnectors\
' properties.
Private Sub Bind()
activatedFeatures.Items.Clear()
pendingFeatures.Items.Clear()
Dim info As FeatureConnectorInformation
For Each info In featManager.RunningConnectors
activatedFeatures.Items.Add(info)
Next info
For Each info In featManager.PendingConnectors
pendingFeatures.Items.Add(info)
Next info
End Sub
// Binds the activatedFeatures and pendingFeatures controls
// the FeatureManager's RunningConnectors and PendingConnectors\
// properties.
private void Bind()
{
activatedFeatures.Items.Clear();
pendingFeatures.Items.Clear();
foreach (FeatureConnectorInformation info in
featManager.RunningConnectors)
{
activatedFeatures.Items.Add(info);
}
foreach (FeatureConnectorInformation info in
featManager.PendingConnectors)
{
pendingFeatures.Items.Add(info);
}
}
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。
请参见
参考
Microsoft.Windows.Design.Features 命名空间
FeatureConnector<TFeatureProviderType>