Condividi tramite


IEnumWCFReferenceGroupMetadataItems Interface

An enumerator for Windows Communication Foundation (WCF) service metadata items.

Namespace:  Microsoft.VisualStudio.WCFReference.Interop
Assembly:  Microsoft.VisualStudio.WCFReference.Interop (in Microsoft.VisualStudio.WCFReference.Interop.dll)

Syntax

'Dichiarazione
<GuidAttribute("603A2AEA-C925-4A8C-A273-65B3B81CD43A")> _
Public Interface IEnumWCFReferenceGroupMetadataItems _
    Inherits IEnumerable
[GuidAttribute("603A2AEA-C925-4A8C-A273-65B3B81CD43A")]
public interface IEnumWCFReferenceGroupMetadataItems : IEnumerable
[GuidAttribute(L"603A2AEA-C925-4A8C-A273-65B3B81CD43A")]
public interface class IEnumWCFReferenceGroupMetadataItems : IEnumerable
[<GuidAttribute("603A2AEA-C925-4A8C-A273-65B3B81CD43A")>]
type IEnumWCFReferenceGroupMetadataItems =  
    interface
        interface IEnumerable
    end
public interface IEnumWCFReferenceGroupMetadataItems extends IEnumerable

The IEnumWCFReferenceGroupMetadataItems type exposes the following members.

Methods

  Name Description
Public method Clone Clones this IEnumWCFReferenceGroupMetadataItems interface by creating another instance.
Public method GetEnumerator Returns an enumerator that iterates through a collection. (Inherited from IEnumerable.)
Public method Next Retrieves the next IVsWCFReferenceGroupMetadataItem.
Public method Reset Returns the enumerator to its initial state.
Public method Skip Skips a specified number of IVsWCFReferenceGroupMetadataItem interfaces.

Top

Remarks

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

Examples

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

/// Enumerates the metadataItems under the Reference Group.
private TreeNode EnumerateGroupMetadataItems(IVsWCFReferenceGroup group)
{
    TreeNode metadataItemsNode = 
 CreateExplorerTreeNode(Resources.EnumMetaDataItems,
                                        ExplorerNodeType.Group,
                                        group,
                                        ExplorerNodeType.MetadataItem);
    try
    {
        IEnumWCFReferenceGroupMetadataItems metadataItems =
  group.GetMetadataItemsEnumerator();
        foreach (IVsWCFReferenceGroupMetadataItem item in
 metadataItems)
        {
            metadataItemsNode.Nodes.Add(CreateMetadataItemNode(item));
        }
    }
    catch (Exception ex)
    {
        metadataItemsNode.Nodes.Add(CreateErrorNode(ex));
    }
    return metadataItemsNode;
}

See Also

Reference

Microsoft.VisualStudio.WCFReference.Interop Namespace