Share via


IVsWCFReferenceGroupCollection Interface

Definition

Provides an interface for managing Windows Communication Foundation (WCF) reference groups.

public interface class IVsWCFReferenceGroupCollection : Microsoft::VisualStudio::WCFReference::Interop::IVsWCFObject
public interface class IVsWCFReferenceGroupCollection : Microsoft::VisualStudio::WCFReference::Interop::IVsWCFObject
__interface IVsWCFReferenceGroupCollection : Microsoft::VisualStudio::WCFReference::Interop::IVsWCFObject
[System.Runtime.InteropServices.Guid("343173D2-F910-4C03-930D-16AB1568431B")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IVsWCFReferenceGroupCollection : Microsoft.VisualStudio.WCFReference.Interop.IVsWCFObject
[<System.Runtime.InteropServices.Guid("343173D2-F910-4C03-930D-16AB1568431B")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IVsWCFReferenceGroupCollection = interface
    interface IVsWCFObject
Public Interface IVsWCFReferenceGroupCollection
Implements IVsWCFObject
Attributes
Implements

Examples

The following example demonstrates how to use the IVsWCFReferenceGroupCollection interface to enumerate WCF reference groups.

/// Enumerates reference groups and returns the tree node representing /// the reference groups.  
private TreeNode EnumerateReferenceGroups(IVsWCFReferenceManager  
 referenceManager)  
{  
    IVsWCFReferenceGroupCollection referenceGroups =  
 referenceManager.GetReferenceGroupCollection();  
    TreeNode groupsNode = CreateExplorerTreeNode(Resources.EnumRefGrp,  
                                        ExplorerNodeType.Group,  
                                        referenceManager,  
                                        ExplorerNodeType.Reference);  

    for (int i = 0; i < referenceGroups.Count(); ++i)  
    {  
        try  
        {  
            IVsWCFReferenceGroup group = referenceGroups.Item(i);  
            groupsNode.Nodes.Add(CreateReferenceGroupNode(group));  
        }  
        catch (Exception ex)  
        {  
            groupsNode.Nodes.Add(CreateErrorNode(ex));  
         }  
     }  

    return groupsNode;  
}  

Remarks

A WCF reference group is the basic unit for code generation. A project or solution can contain multiple reference groups.

Methods

Add(String, String)

Adds a Windows Communication Foundation (WCF) reference group to the collection.

ContainingProject()

Returns the project hierarchy for the project that contains the collection.

Count()

Returns a count of Windows Communication Foundation (WCF) reference groups in the collection.

GetReferenceGroupByName(String, String)

Returns a specified Windows Communication Foundation (WCF) reference group in the collection.

GetReferenceGroupFromMapFile(String)

Returns a specified Windows Communication Foundation (WCF) reference group in the collection.

IsValid()

Determines if the index for a Windows Communication Foundation (WCF) reference group is valid in the collection.

Item(Int32)

Returns a specified Windows Communication Foundation (WCF) reference group in the collection.

Reload()

Refreshes a Windows Communication Foundation (WCF) reference group collection.

Remove(IVsWCFReferenceGroup)

Removes a Windows Communication Foundation (WCF) reference group from the collection.

RemoveAt(Int32)

Removes a Windows Communication Foundation (WCF) reference group from the collection by index.

UpdateAll(IDiscoverySession)

Updates all Windows Communication Foundation (WCF) reference group in the collection.

Applies to