Cliquez pour évaluer et commenter
MSDN
MSDN Library
Développement .NET
Versions précédentes
.NET Framework 3.0
Bibliothèque de classes
System.ServiceModel
ServiceHostBase, classe
Méthodes ServiceHostBase
AddServiceEndpoint, méthode
 AddServiceEndpoint, méthode (String...
Réduire tout/Développer tout Réduire tout
Cette page est spécifique à
.NET Framework 3.0

D'autres versions sont également disponibles pour :
ServiceHostBase.AddServiceEndpoint, méthode (String, Binding, String)
Adds a service endpoint to the hosted service with a specified contract, binding, and endpoint address.

Espace de noms: System.ServiceModel
Assembly : System.ServiceModel (dans system.servicemodel.dll)

Visual Basic (Déclaration)
Public Function AddServiceEndpoint ( _
    implementedContract As String, _
    binding As Binding, _
    address As String _
) As ServiceEndpoint
Visual Basic (Utilisation)
Dim instance As ServiceHostBase
Dim implementedContract As String
Dim binding As Binding
Dim address As String
Dim returnValue As ServiceEndpoint

returnValue = instance.AddServiceEndpoint(implementedContract, binding, address)
C#
public ServiceEndpoint AddServiceEndpoint (
    string implementedContract,
    Binding binding,
    string address
)
C++
public:
ServiceEndpoint^ AddServiceEndpoint (
    String^ implementedContract, 
    Binding^ binding, 
    String^ address
)
J#
public ServiceEndpoint AddServiceEndpoint (
    String implementedContract, 
    Binding binding, 
    String address
)
JScript
public function AddServiceEndpoint (
    implementedContract : String, 
    binding : Binding, 
    address : String
) : ServiceEndpoint
XAML
Non applicable.

Paramètres

implementedContract

The contract implemented by the endpoint.

binding

The Binding for the endpoint added.

address

The String that contains the address for the endpoint added. This could be an absolute or relative URI. If it is a relative URI, one of the base address of the ServiceHost (depending on the binding protocol) is used as the endpoint's base address.

Valeur de retour

The ServiceEndpoint added to the hosted service.
Type d'exceptionCondition

ArgumentNullException

implementedContract or binding or address or is référence Null (Nothing en Visual Basic).

InvalidOperatorException

The host is not in a Created or an Opening state or there is no ServiceDescription for the hosted service and so an endpoint cannot be added or the binding lacks a transport of binding scheme.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile pour Pocket PC, Windows Mobile pour Smartphone, Windows Server 2003, Windows XP Édition Media Center, Windows XP Professionnel Édition x64, Windows XP SP2, Windows XP Starter Edition

Microsoft .NET Framework 3.0 est pris en charge sur Windows Vista, Microsoft Windows XP SP2 et Windows Server 2003 SP1.

.NET Framework

Prise en charge dans : 3.0
Contenu de la communauté   Qu'est-ce que le Contenu de la communauté ?
Ajouter du contenu RSS  Annotations
Processing
© 2009 Microsoft Corporation. Tous droits réservés. Conditions d'utilisation | Marques | Confidentialité
Page view tracker