IEnumWCFReferenceEndpoints 介面

定義

Windows Communication Foundation (WCF) 服務端點的列舉值。An enumerator for Windows Communication Foundation (WCF) service endpoints.

public interface class IEnumWCFReferenceEndpoints : System::Collections::IEnumerable
[System.Runtime.InteropServices.Guid("0D66F264-C498-44C6-B08A-1A9EF57DDD63")]
[System.Runtime.InteropServices.TypeLibType(4096)]
public interface IEnumWCFReferenceEndpoints : System.Collections.IEnumerable
[<System.Runtime.InteropServices.Guid("0D66F264-C498-44C6-B08A-1A9EF57DDD63")>]
[<System.Runtime.InteropServices.TypeLibType(4096)>]
type IEnumWCFReferenceEndpoints = interface
    interface IEnumerable
Public Interface IEnumWCFReferenceEndpoints
Implements IEnumerable
屬性
實作

範例

下列範例示範如何使用列舉值來填入 TreeNode 端點 IEnumWCFReferenceEndpointsThe following example demonstrates how to populate a TreeNode with endpoints by using the IEnumWCFReferenceEndpoints enumerator.

/// Creates a single contract node.  
private TreeNode CreateContractNode(IVsWCFReferenceContract contract)  
{  
    TreeNode contractNode = CreateExplorerTreeNode(contract.GetName(),  
                                    ExplorerNodeType.Contract,  
                                    contract);  

    try  
    {  
        contractNode.Nodes.Add(CreateLeafNode(String.Format  
 (CultureInfo.InvariantCulture, Resources.EnumContractsName,   
 contract.GetName())));  
        contractNode.Nodes.Add(CreateLeafNode(String.Format  
 (CultureInfo.InvariantCulture, Resources.EnumContractsPortTypeName,  
  contract.GetPortTypeName())));  
        contractNode.Nodes.Add(CreateLeafNode(String.Format  
 (CultureInfo.InvariantCulture, Resources.EnumContractsRefGrpName,  
 contract.GetReferenceGroup().GetName())));  
        contractNode.Nodes.Add(CreateLeafNode(String.Format  
 (CultureInfo.InvariantCulture, Resources.EnumContractsTargetNamespace,  
 contract.GetTargetNamespace())));  
        contractNode.Nodes.Add(CreateLeafNode(String.Format  
 (CultureInfo.InvariantCulture, Resources.EnumContractsTypeName,  
 contract.GetTypeName())));  

        IEnumWCFReferenceEndpoints endpoints =   
 contract.GetReferenceEndpointEnumerator();  
        contractNode.Nodes.Add(EnumerateEndpoints(endpoints));  
    }  
    catch (Exception ex)  
    {  
        contractNode.Nodes.Add(CreateErrorNode(ex));  
    }  
    return contractNode;  
}  

備註

您可以使用介面的方法取得介面的實例 GetReferenceEndpointEnumerator IVsWCFReferenceContractYou can get an instance of the interface by using the GetReferenceEndpointEnumerator method of the IVsWCFReferenceContract interface.

方法

Clone(IEnumWCFReferenceEndpoints)

IEnumWCFReferenceEndpoints 由建立另一個實例來複製這個介面。Clones this IEnumWCFReferenceEndpoints interface by creating another instance.

Next(UInt32, IVsWCFReferenceEndpoint[], UInt32)

抓取下一個 IVsWCFReferenceEndpointRetrieves the next IVsWCFReferenceEndpoint.

Reset()

將列舉值傳回至其初始狀態。Return the enumerator to its initial state.

Skip(UInt32)

略過指定數目的 IVsWCFReferenceEndpoint 介面。Skips a specified number of IVsWCFReferenceEndpoint interfaces.

適用於