다음을 통해 공유


IVsWCFReferenceEndpoint Interface

Definition

Represents an endpoint definition in a configuration file.

public interface class IVsWCFReferenceEndpoint
public interface class IVsWCFReferenceEndpoint
__interface IVsWCFReferenceEndpoint
[System.Runtime.InteropServices.Guid("EFD57B55-A7DA-4C65-A6DF-90B3B656D749")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IVsWCFReferenceEndpoint
[<System.Runtime.InteropServices.Guid("EFD57B55-A7DA-4C65-A6DF-90B3B656D749")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IVsWCFReferenceEndpoint = interface
Public Interface IVsWCFReferenceEndpoint
Attributes

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

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.

Methods

GetAddress()

Returns the EndpointAddress from the configuration file.

GetBehaviorConfiguration()

Returns the endpoint BehaviorConfiguration from the configuration file.

GetBinding()

Returns the endpoint Binding from the configuration file.

GetBindingConfiguration()

Returns the endpoint BindingConfiguration from the configuration file.

GetContract()

Returns the endpoint Contract from the configuration file.

GetName()

Returns the endpoint Name from the configuration file.

Applies to