IEnumWCFReferenceContracts Interface

Definition

An enumerator for Windows Communication Foundation (WCF) service contracts.

public interface class IEnumWCFReferenceContracts : System::Collections::IEnumerable
[System.Runtime.InteropServices.Guid("A8F120C5-E7DF-465A-A7FB-711805281A3B")]
[System.Runtime.InteropServices.TypeLibType(4096)]
public interface IEnumWCFReferenceContracts : System.Collections.IEnumerable
[<System.Runtime.InteropServices.Guid("A8F120C5-E7DF-465A-A7FB-711805281A3B")>]
[<System.Runtime.InteropServices.TypeLibType(4096)>]
type IEnumWCFReferenceContracts = interface
    interface IEnumerable
Public Interface IEnumWCFReferenceContracts
Implements IEnumerable
Attributes
Implements

Examples

The following example demonstrates how to populate a TreeNode with contracts by using the IEnumWCFReferenceContracts enumerator.

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

Remarks

You can get an instance of the interface by using the GetContractsEnumerator method of the IVsWCFReferenceGroup interface.

Methods

Clone(IEnumWCFReferenceContracts)

Clones this IEnumWCFReferenceContracts interface by creating another instance.

Next(UInt32, IVsWCFReferenceContract[], UInt32)

Retrieves the next IVsWCFReferenceContract.

Reset()

Returns the enumerator to its initial state.

Skip(UInt32)

Skips a specified number of IVsWCFReferenceContract interfaces.

Applies to