Freigeben über


ServiceCollection.Item[] Eigenschaft

Definition

Ruft die Service-Instanz ab, die vom übergebenen Parameter angegeben wird, oder legt diese fest.

Überlädt

Item[Int32]

Ruft den Wert eines Service am angegebenen nullbasierten Index ab oder legt diesen fest.

Item[String]

Ruft einen Service ab, der durch seinen Namen angegeben wird.

Item[Int32]

Ruft den Wert eines Service am angegebenen nullbasierten Index ab oder legt diesen fest.

public:
 property System::Web::Services::Description::Service ^ default[int] { System::Web::Services::Description::Service ^ get(int index); void set(int index, System::Web::Services::Description::Service ^ value); };
public System.Web.Services.Description.Service this[int index] { get; set; }
member this.Item(int) : System.Web.Services.Description.Service with get, set
Default Public Property Item(index As Integer) As Service

Parameter

index
Int32

Der nullbasierte Index des Service, der geändert oder zurückgegeben werden soll.

Eigenschaftswert

Service

Ein Service.

Beispiele

// 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))

Gilt für

Item[String]

Ruft einen Service ab, der durch seinen Namen angegeben wird.

public:
 property System::Web::Services::Description::Service ^ default[System::String ^] { System::Web::Services::Description::Service ^ get(System::String ^ name); };
public System.Web.Services.Description.Service this[string name] { get; }
member this.Item(string) : System.Web.Services.Description.Service
Default Public ReadOnly Property Item(name As String) As Service

Parameter

name
String

Der Name des zurückgegebenen Service.

Eigenschaftswert

Service

Ein Service.

Beispiele

// Create a new XmlTextWriter with specified URL.
XmlTextReader^ myXmlReader = gcnew XmlTextReader( "All_CS.wsdl" );
ServiceDescription^ myServiceDescription = ServiceDescription::Read( myXmlReader );
myServiceDescription->TargetNamespace = "http://tempuri.org/";

// Remove the service named MathService.
ServiceCollection^ myServiceDescriptionCollection = myServiceDescription->Services;
myServiceDescriptionCollection->Remove( myServiceDescription->Services[ "MathService" ] );
// Create a new XmlTextWriter with specified URL.
XmlTextReader myXmlReader = new XmlTextReader("All_CS.wsdl");
ServiceDescription myServiceDescription =
   ServiceDescription.Read(myXmlReader);
myServiceDescription.TargetNamespace = "http://tempuri.org/";

// Remove the service named MathService.
ServiceCollection myServiceDescriptionCollection =
   myServiceDescription.Services;
myServiceDescriptionCollection.Remove(
   myServiceDescription.Services["MathService"]);
' Create a new XmlTextWriter with specified URL.
Dim myXmlReader As New XmlTextReader("All_VB.wsdl")
Dim myServiceDescription As ServiceDescription = _
   ServiceDescription.Read(myXmlReader)
myServiceDescription.TargetNamespace = "http://tempuri.org/"

' Remove the service named MathService.
Dim myServiceDescriptionCollection As ServiceCollection = _
   myServiceDescription.Services
myServiceDescriptionCollection.Remove( _
   myServiceDescription.Services("MathService"))

Gilt für