ServiceCollection.Item[] Proprietà
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Ottiene o imposta l'istanza di Service specificata dal parametro passato.
Overload
Item[Int32] |
Ottiene o imposta il valore di un oggetto Service in corrispondenza dell'indice in base zero specificato. |
Item[String] |
Ottiene un oggetto Service specificato in base al nome. |
Item[Int32]
Ottiene o imposta il valore di un oggetto Service in corrispondenza dell'indice in base zero specificato.
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
Parametri
Valore della proprietà
Oggetto Service
.
Esempio
// 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))
Si applica a
Item[String]
Ottiene un oggetto Service specificato in base al nome.
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
Parametri
Valore della proprietà
Oggetto Service
.
Esempio
// 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"))