ServiceDescription Konstruktorer
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Initierar en ny instans av ServiceDescription klassen.
Överlagringar
| Name | Description |
|---|---|
| ServiceDescription() |
Initierar en ny instans av ServiceDescription klassen. |
| ServiceDescription(IEnumerable<ServiceEndpoint>) |
Initierar en ny instans av ServiceDescription klassen från en angiven uppräkning av tjänstslutpunkter. |
ServiceDescription()
Initierar en ny instans av ServiceDescription klassen.
public:
ServiceDescription();
public ServiceDescription();
Public Sub New ()
Exempel
// Use Default constructor
ServiceDescription sd = new ServiceDescription();
' Use Default constructor
Dim sd As New ServiceDescription()
Gäller för
ServiceDescription(IEnumerable<ServiceEndpoint>)
Initierar en ny instans av ServiceDescription klassen från en angiven uppräkning av tjänstslutpunkter.
public:
ServiceDescription(System::Collections::Generic::IEnumerable<System::ServiceModel::Description::ServiceEndpoint ^> ^ endpoints);
public ServiceDescription(System.Collections.Generic.IEnumerable<System.ServiceModel.Description.ServiceEndpoint> endpoints);
new System.ServiceModel.Description.ServiceDescription : seq<System.ServiceModel.Description.ServiceEndpoint> -> System.ServiceModel.Description.ServiceDescription
Public Sub New (endpoints As IEnumerable(Of ServiceEndpoint))
Parametrar
- endpoints
- IEnumerable<ServiceEndpoint>
Den IEnumerable<T> typ ServiceEndpoint som används för att initiera tjänstbeskrivningen.
Undantag
endpoints är null.
Exempel
// Create ServiceDescription from a collection of service endpoints
List<ServiceEndpoint> endpoints = new List<ServiceEndpoint>();
ContractDescription conDescr = new ContractDescription("ICalculator");
EndpointAddress endpointAddress = new EndpointAddress("http://localhost:8001/Basic");
ServiceEndpoint ep = new ServiceEndpoint(conDescr, new BasicHttpBinding(), endpointAddress);
endpoints.Add(ep);
ServiceDescription sd2 = new ServiceDescription(endpoints);
' Create ServiceDescription from a collection of service endpoints
Dim endpoints As New List(Of ServiceEndpoint)()
Dim conDescr As New ContractDescription("ICalculator")
Dim endpointAddress As New EndpointAddress("http://localhost:8001/Basic")
Dim ep As New ServiceEndpoint(conDescr, New BasicHttpBinding(), endpointAddress)
endpoints.Add(ep)
Dim sd2 As New ServiceDescription(endpoints)