IVsWCFReferenceContract Interface

Definition

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

public interface class IVsWCFReferenceContract
public interface class IVsWCFReferenceContract
__interface IVsWCFReferenceContract
[System.Runtime.InteropServices.Guid("0ED7423C-615C-47EB-931A-8E7D3F45DDCD")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IVsWCFReferenceContract
[<System.Runtime.InteropServices.Guid("0ED7423C-615C-47EB-931A-8E7D3F45DDCD")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IVsWCFReferenceContract = interface
Public Interface IVsWCFReferenceContract
Attributes

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);  
        }  
            }  
}  

Methods

GetName()

Returns the contract name from the configuration file.

GetPortTypeName()

Returns the port type name from the Web Services Description Language (WSDL).

GetReferenceEndpointEnumerator()

Returns the collection of endpoints for the Windows Communication Foundation (WCF) service reference.

GetReferenceGroup()

Returns the reference group that contains the contract.

GetTargetNamespace()

Returns the target namespace of the Web Services Description Language (WSDL).

GetTypeName()

Returns the full name of the contract Type.

Applies to