次の方法で共有


ServiceCollection.Item[] プロパティ

定義

渡されたパラメーターによって指定された Service インスタンスを取得または設定します。

オーバーロード

Item[Int32]

指定の 0 から始まるインデックス番号に対応する Service の値を取得または設定します。

Item[String]

名前で指定された Service を取得します。

Item[Int32]

指定の 0 から始まるインデックス番号に対応する Service の値を取得または設定します。

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

パラメーター

index
Int32

変更または返される Service の、0 から始まるインデックス番号。

プロパティ値

Service

Service

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

適用対象

Item[String]

名前で指定された Service を取得します。

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

パラメーター

name
String

返された Service の名前。

プロパティ値

Service

Service

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

適用対象