次の方法で共有


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

'宣言
<InterfaceTypeAttribute()> _
<GuidAttribute("EFD57B55-A7DA-4C65-A6DF-90B3B656D749")> _
Public Interface IVsWCFReferenceEndpoint
[InterfaceTypeAttribute()]
[GuidAttribute("EFD57B55-A7DA-4C65-A6DF-90B3B656D749")]
public interface IVsWCFReferenceEndpoint
[InterfaceTypeAttribute()]
[GuidAttribute(L"EFD57B55-A7DA-4C65-A6DF-90B3B656D749")]
public interface class IVsWCFReferenceEndpoint
[<InterfaceTypeAttribute()>]
[<GuidAttribute("EFD57B55-A7DA-4C65-A6DF-90B3B656D749")>]
type IVsWCFReferenceEndpoint =  interface end
public interface IVsWCFReferenceEndpoint

The IVsWCFReferenceEndpoint type exposes the following members.

Methods

  Name Description
Public method GetAddress Returns the EndpointAddress from the configuration file.
Public method GetBehaviorConfiguration Returns the endpoint BehaviorConfiguration from the configuration file.
Public method GetBinding Returns the endpoint Binding from the configuration file.
Public method GetBindingConfiguration Returns the endpoint BindingConfiguration from the configuration file.
Public method GetContract Returns the endpoint Contract from the configuration file.
Public method GetName Returns the endpoint Name from the configuration file.

Top

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

Microsoft.VisualStudio.WCFReference.Interop Namespace