Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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
[GuidAttribute("0D66F264-C498-44C6-B08A-1A9EF57DDD63")]
public interface IEnumWCFReferenceEndpoints : IEnumerable
[GuidAttribute(L"0D66F264-C498-44C6-B08A-1A9EF57DDD63")]
public interface class IEnumWCFReferenceEndpoints : IEnumerable
[<GuidAttribute("0D66F264-C498-44C6-B08A-1A9EF57DDD63")>]
type IEnumWCFReferenceEndpoints =
interface
interface IEnumerable
end
public interface IEnumWCFReferenceEndpoints extends IEnumerable
The IEnumWCFReferenceEndpoints type exposes the following members.
Methods
Name | Description | |
---|---|---|
![]() |
Clone | Clones this IEnumWCFReferenceEndpoints interface by creating another instance. |
![]() |
GetEnumerator | Returns an enumerator that iterates through a collection. (Inherited from IEnumerable.) |
![]() |
Next | Retrieves the next IVsWCFReferenceEndpoint. |
![]() |
Reset | Return the enumerator to its initial state. |
![]() |
Skip | Skips a specified number of IVsWCFReferenceEndpoint interfaces. |
Top
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;
}