IVsWCFReferenceEndpoint Interface

Represents an endpoint definition in a configuration file.

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

Syntax

'Declaration
<GuidAttribute("EFD57B55-A7DA-4C65-A6DF-90B3B656D749")> _
<InterfaceTypeAttribute()> _
Public Interface IVsWCFReferenceEndpoint
'Usage
Dim instance As IVsWCFReferenceEndpoint
[GuidAttribute("EFD57B55-A7DA-4C65-A6DF-90B3B656D749")]
[InterfaceTypeAttribute()]
public interface IVsWCFReferenceEndpoint
[GuidAttribute(L"EFD57B55-A7DA-4C65-A6DF-90B3B656D749")]
[InterfaceTypeAttribute()]
public interface class IVsWCFReferenceEndpoint
public interface IVsWCFReferenceEndpoint

Remarks

Each IVsWCFReferenceEndpoint represents an endpoint definition in a configuration file. All properties are read-only; the object is a snapshot of configuration data taken at the time when the endpoint enumerator was created. Consumers must use System.Configuration and WCF Service Model APIs to update or remove endpoints and must repeat the endpoint enumeration if the endpoint configuration changes.

Examples

The following example demonstrates how to add endpoint data to a DataGridView control.

/// Populates the values to a grid with the initial values of all of
/// the endpoints selected.
private void PopulateGrid(IVsWCFReferenceGroup referenceGroup)
{
    if (referenceGroup == null)
    {
        throw new ArgumentNullException("referenceGroup");
    }

    IEnumWCFReferenceContracts contractsEnum = 
 referenceGroup.GetContractsEnumerator();

    foreach (IVsWCFReferenceContract contract in contractsEnum)
    {
        string contractName = contract.GetPortTypeName();
        string contractNamespace = contract.GetTargetNamespace();

        IEnumWCFReferenceEndpoints endpointsEnum =
 contract.GetReferenceEndpointEnumerator();
        foreach (IVsWCFReferenceEndpoint endpoint in endpointsEnum)
        {
            endpointsDataGridView.Rows.Add(true, endpoint.GetName(),
 contractNamespace, contractName);
        }
            }
}

See Also

Reference

IVsWCFReferenceEndpoint Members

Microsoft.VisualStudio.WCFReference.Interop Namespace