windows communication foundation (WCF) 服务协定的枚举数。
命名空间: Microsoft.VisualStudio.WCFReference.Interop
程序集: Microsoft.VisualStudio.WCFReference.Interop(在 Microsoft.VisualStudio.WCFReference.Interop.dll 中)
语法
声明
<GuidAttribute("A8F120C5-E7DF-465A-A7FB-711805281A3B")> _
Public Interface IEnumWCFReferenceContracts _
Inherits IEnumerable
[GuidAttribute("A8F120C5-E7DF-465A-A7FB-711805281A3B")]
public interface IEnumWCFReferenceContracts : IEnumerable
[GuidAttribute(L"A8F120C5-E7DF-465A-A7FB-711805281A3B")]
public interface class IEnumWCFReferenceContracts : IEnumerable
[<GuidAttribute("A8F120C5-E7DF-465A-A7FB-711805281A3B")>]
type IEnumWCFReferenceContracts =
interface
interface IEnumerable
end
public interface IEnumWCFReferenceContracts extends IEnumerable
IEnumWCFReferenceContracts 类型公开以下成员。
方法
名称 | 说明 | |
---|---|---|
![]() |
Clone | 通过创建另一个实例克隆此 IEnumWCFReferenceContracts 接口。 |
![]() |
GetEnumerator | 返回循环访问集合的枚举数。 (继承自 IEnumerable。) |
![]() |
Next | 检索下 IVsWCFReferenceContract。 |
![]() |
Reset | 返回枚举数到其原始状态。 |
![]() |
Skip | 跳过 IVsWCFReferenceContract 接口指定数目的。 |
页首
备注
使用 IVsWCFReferenceGroup 接口的 GetContractsEnumerator 方法,您可以获取接口的实例。
示例
使用 IEnumWCFReferenceContracts 枚举数,下面的示例演示如何填充协定的 TreeNode 。
/// Enumerates and creates a top level contract node.
private TreeNode EnumerateContracts(IVsWCFReferenceGroup group, bool
createDummy)
{
TreeNode contractsNode = CreateExplorerTreeNode(Resources.EnumContracts,
ExplorerNodeType.Group,
group,
ExplorerNodeType.Contract);
if (createDummy)
{
contractsNode.Nodes.Add("Dummy Node, never to be shown");
return contractsNode;
}
// Enumerate the nodes.
try
{
IEnumWCFReferenceContracts contracts = group.GetContractsEnumerator();
foreach (IVsWCFReferenceContract contract in contracts)
{
contractsNode.Nodes.Add(CreateContractNode(contract));
}
}
catch (Exception ex)
{
contractsNode.Nodes.Add(CreateErrorNode(ex));
}
return contractsNode;
}