ServiceDescriptionCollection.GetService メソッド
ServiceDescriptionCollection を検索し、コレクションに含まれた ServiceDescription インスタンスのいずれかのメンバである、指定した名前を持つ Service を返します。
Public Function GetService( _
ByVal name As XmlQualifiedName _) As Service
[C#]
public Service GetService(XmlQualifiedNamename);
[C++]
public: Service* GetService(XmlQualifiedName* name);
[JScript]
public function GetService(
name : XmlQualifiedName) : Service;
パラメータ
- name
参照渡しされた XmlQualifiedName 。この Name プロパティは、返された Service で共有されます。
戻り値
Service 。
例外
例外の種類 | 条件 |
---|---|
Exception | 指定した Service は、コレクション内のどの ServiceDescription インスタンスのメンバでもありません。 |
使用例
' Construct an XML qualified name.
Dim myXmlQualifiedName As _
New XmlQualifiedName("MathService", "http://tempuri2.org/")
' Get the Service from the collection.
Dim myService As Service = myCollection.GetService(myXmlQualifiedName)
[C#]
// Construct an XML qualified name.
XmlQualifiedName myXmlQualifiedName =
new XmlQualifiedName("MathService", "http://tempuri2.org/");
// Get the Service from the collection.
Service myService = myCollection.GetService(myXmlQualifiedName);
[C++]
// Construct an XML qualified name.
XmlQualifiedName* myXmlQualifiedName =
new XmlQualifiedName(S"MathService", S"http://tempuri2.org/");\
// Get the Service from the collection.
myCollection->GetService(myXmlQualifiedName);
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
ServiceDescriptionCollection クラス | ServiceDescriptionCollection メンバ | System.Web.Services.Description 名前空間