Compartilhar via


ServiceDescription.Services Propriedade

Definição

Obtém a coleção de instâncias de Service contidas no ServiceDescription.

public:
 property System::Web::Services::Description::ServiceCollection ^ Services { System::Web::Services::Description::ServiceCollection ^ get(); };
public System.Web.Services.Description.ServiceCollection Services { get; }
member this.Services : System.Web.Services.Description.ServiceCollection
Public ReadOnly Property Services As ServiceCollection

Valor da propriedade

ServiceCollection

Uma coleção de instâncias de serviço contidas na descrição do serviço.

Exemplos

// 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 ] );
// 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]);
' Read a ServiceDescription from existing WSDL.
Dim myServiceDescription As ServiceDescription = _
   ServiceDescription.Read("Input.vb.wsdl")
myServiceDescription.TargetNamespace = "http://tempuri.org/"

' Get the ServiceCollection of the ServiceDescription.
Dim myServiceCollection As ServiceCollection = _
   myServiceDescription.Services

' Remove the Service at index 0 of the collection.
myServiceCollection.Remove(myServiceDescription.Services.Item(0))

Comentários

O ServiceCollection retornado por essa propriedade corresponde à lista de service elementos incluídos pelo elemento raiz WSDL (Linguagem de Descrição dos definitions Serviços Web). Para obter mais informações sobre WSDL, confira a especificação WSDL.

Aplica-se a