IEnumWCFReferenceEndpoints Interface

Definition

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")]
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
[<System.Runtime.InteropServices.Guid("0D66F264-C498-44C6-B08A-1A9EF57DDD63")>]
type IEnumWCFReferenceEndpoints = interface
    interface IEnumerable
Public Interface IEnumWCFReferenceEndpoints
Implements IEnumerable
Attributes
Implements

Examples

The 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;  
}  

Remarks

You can get an instance of the interface by using the GetReferenceEndpointEnumerator method of the IVsWCFReferenceContract interface.

Methods

Clone(IEnumWCFReferenceEndpoints)

Clones this IEnumWCFReferenceEndpoints interface by creating another instance.

Next(UInt32, IVsWCFReferenceEndpoint[], UInt32)

Retrieves the next IVsWCFReferenceEndpoint.

Reset()

Return the enumerator to its initial state.

Skip(UInt32)

Skips a specified number of IVsWCFReferenceEndpoint interfaces.

Applies to