ServiceDescription.Services Property

Definition

Gets the collection of Service instances contained in the ServiceDescription.

C#
public System.Web.Services.Description.ServiceCollection Services { get; }

Property Value

A collection of service instances contained in the service description.

Examples

C#
// Read a ServiceDescription from existing WSDL.
ServiceDescription myServiceDescription =
   ServiceDescription.Read("Input_CS.wsdl");
myServiceDescription.TargetNamespace = "http://tempuri.org/";

// Get the ServiceCollection of the ServiceDescription.
ServiceCollection myServiceCollection = myServiceDescription.Services;

// Remove the Service at index 0 of the collection.
myServiceCollection.Remove(myServiceDescription.Services[0]);

Remarks

The ServiceCollection returned by this property corresponds to the list of service elements enclosed by the Web Services Description Language (WSDL) definitions root element. For more information about WSDL, see the WSDL specification.

Applies to

Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)