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.
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
<InterfaceTypeAttribute()> _
<GuidAttribute("0ED7423C-615C-47EB-931A-8E7D3F45DDCD")> _
Public Interface IVsWCFReferenceContract
[InterfaceTypeAttribute()]
[GuidAttribute("0ED7423C-615C-47EB-931A-8E7D3F45DDCD")]
public interface IVsWCFReferenceContract
[InterfaceTypeAttribute()]
[GuidAttribute(L"0ED7423C-615C-47EB-931A-8E7D3F45DDCD")]
public interface class IVsWCFReferenceContract
[<InterfaceTypeAttribute()>]
[<GuidAttribute("0ED7423C-615C-47EB-931A-8E7D3F45DDCD")>]
type IVsWCFReferenceContract =  interface end
public interface IVsWCFReferenceContract
The IVsWCFReferenceContract type exposes the following members.
Methods
| Name | Description | |
|---|---|---|
| .gif) | GetName | Returns the contract name from the configuration file. | 
| .gif) | GetPortTypeName | Returns the port type name from the Web Services Description Language (WSDL). | 
| .gif) | GetReferenceEndpointEnumerator | Returns the collection of endpoints for the Windows Communication Foundation (WCF) service reference. | 
| .gif) | GetReferenceGroup | Returns the reference group that contains the contract. | 
| .gif) | GetTargetNamespace | Returns the target namespace of the Web Services Description Language (WSDL). | 
| .gif) | GetTypeName | Returns the full name of the contract Type. | 
Top
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);
        }
            }
}