IEnumWCFReferenceEndpoints Interface
An enumerator for Windows Communication Foundation (WCF) service endpoints.
Namespace: Microsoft.VisualStudio.WCFReference.Interop
Assembly: Microsoft.VisualStudio.WCFReference.Interop (in Microsoft.VisualStudio.WCFReference.Interop.dll)
Syntax
'Declaration
<GuidAttribute("0D66F264-C498-44C6-B08A-1A9EF57DDD63")> _
Public Interface IEnumWCFReferenceEndpoints _
Inherits IEnumerable
'Usage
Dim instance As IEnumWCFReferenceEndpoints
[GuidAttribute("0D66F264-C498-44C6-B08A-1A9EF57DDD63")]
public interface IEnumWCFReferenceEndpoints : IEnumerable
[GuidAttribute(L"0D66F264-C498-44C6-B08A-1A9EF57DDD63")]
public interface class IEnumWCFReferenceEndpoints : IEnumerable
public interface IEnumWCFReferenceEndpoints extends IEnumerable
Remarks
You can get an instance of the interface by using the GetReferenceEndpointEnumerator method of the IVsWCFReferenceContract interface.
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;
}