ServiceDescription Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the ServiceDescription class.
Overloads
ServiceDescription() |
Initializes a new instance of the ServiceDescription class. |
ServiceDescription(IEnumerable<ServiceEndpoint>) |
Initializes a new instance of the ServiceDescription class from a specified enumeration of service endpoints. |
ServiceDescription()
Initializes a new instance of the ServiceDescription class.
public:
ServiceDescription();
public ServiceDescription ();
Public Sub New ()
Examples
// Use Default constructor
ServiceDescription sd = new ServiceDescription();
' Use Default constructor
Dim sd As New ServiceDescription()
Applies to
ServiceDescription(IEnumerable<ServiceEndpoint>)
Initializes a new instance of the ServiceDescription class from a specified enumeration of service endpoints.
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))
Parameters
- endpoints
- IEnumerable<ServiceEndpoint>
The IEnumerable<T> of type ServiceEndpoint used to initialize the service description.
Exceptions
endpoints
is null
.
Examples
// 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)
Applies to
.NET
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示