FeatureConnectorInformation 类

包含描述指定功能连接器的信息。

继承层次结构

System.Object
  Microsoft.Windows.Design.Features.FeatureConnectorInformation

命名空间:  Microsoft.Windows.Design.Features
程序集:  Microsoft.Windows.Design.Extensibility(在 Microsoft.Windows.Design.Extensibility.dll 中)

语法

声明
Public MustInherit Class FeatureConnectorInformation
public abstract class FeatureConnectorInformation
public ref class FeatureConnectorInformation abstract
[<AbstractClass>]
type FeatureConnectorInformation =  class end
public abstract class FeatureConnectorInformation

FeatureConnectorInformation 类型公开以下成员。

构造函数

  名称 说明
受保护的方法 FeatureConnectorInformation 初始化 FeatureConnectorInformation 类的新实例。

页首

属性

  名称 说明
公共属性 FeatureConnectorType 获取此 FeatureConnectorInformation 描述的功能连接器的类型。
公共属性 PendingItems 获取功能连接器所需要的但是在编辑上下文中不可用的上下文列表。
公共属性 PendingServices 获取功能连接器所需要的但是在编辑上下文中不可用的服务。
公共属性 RequiredItems 获取功能连接器所需的上下文列表。
公共属性 RequiredServices 获取功能连接器所需的服务。

页首

方法

  名称 说明
公共方法 Equals 确定指定的 Object 是否等于当前的 Object。 (继承自 Object。)
受保护的方法 Finalize 允许对象在“垃圾回收”回收之前尝试释放资源并执行其他清理操作。 (继承自 Object。)
公共方法 GetHashCode 用作特定类型的哈希函数。 (继承自 Object。)
公共方法 GetType 获取当前实例的 Type。 (继承自 Object。)
受保护的方法 MemberwiseClone 创建当前 Object 的浅表副本。 (继承自 Object。)
公共方法 ToString 返回表示当前对象的字符串。 (继承自 Object。)

页首

备注

功能管理器为其管理的每个功能连接器保存一个 FeatureConnectorInformation 对象。 可从 RunningConnectorsPendingConnectors 属性获取当前运行和挂起的功能连接器。

示例

下面的代码示例演示如何使用 FeatureConnectorInformation 类来访问正在运行和挂起的连接器。 有关完整的代码列表,请参见如何:创建自定义功能连接器

' 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);
    }
}

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。

请参见

参考

Microsoft.Windows.Design.Features 命名空间

FeatureManager

FeatureProvider

FeatureConnector<TFeatureProviderType>

其他资源

如何:创建自定义功能连接器

功能提供程序和功能连接器

了解 WPF 设计器扩展性