IVsWCFReferenceContract Interface

Represents a Windows Communication Foundation (WCF) reference contract interface generated by the proxy generator.

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

Syntax

'Declaration
<GuidAttribute("0ED7423C-615C-47EB-931A-8E7D3F45DDCD")> _
<InterfaceTypeAttribute()> _
Public Interface IVsWCFReferenceContract
'Usage
Dim instance As IVsWCFReferenceContract
[GuidAttribute("0ED7423C-615C-47EB-931A-8E7D3F45DDCD")]
[InterfaceTypeAttribute()]
public interface IVsWCFReferenceContract
[GuidAttribute(L"0ED7423C-615C-47EB-931A-8E7D3F45DDCD")]
[InterfaceTypeAttribute()]
public interface class IVsWCFReferenceContract
public interface IVsWCFReferenceContract

Examples

The following example demonstrates how to implement the IVsWCFReferenceContract interface.

/// Populates the values to a grid with the initial values of all 
/// 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

IVsWCFReferenceContract Members

Microsoft.VisualStudio.WCFReference.Interop Namespace