IEnumWCFReferenceEndpoints Interface
Visual Studio 2015
An enumerator for Windows Communication Foundation (WCF) service endpoints.
Assembly: Microsoft.VisualStudio.WCFReference.Interop (in Microsoft.VisualStudio.WCFReference.Interop.dll)
| Name | Description | |
|---|---|---|
![]() | Clone(IEnumWCFReferenceEndpoints) | Clones this IEnumWCFReferenceEndpoints interface by creating another instance. |
![]() | GetEnumerator() | (Inherited from IEnumerable.) |
![]() | 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. |
You can get an instance of the interface by using the GetReferenceEndpointEnumerator method of the IVsWCFReferenceContract interface.
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;
}
Show:
