次の方法で共有


ServiceDescriptionImporter.ServiceDescriptions プロパティ

ServiceDescriptionImporter でインポートされている ServiceDescriptionCollection を取得します。

Public ReadOnly Property ServiceDescriptions As _
   ServiceDescriptionCollection
[C#]
public ServiceDescriptionCollection ServiceDescriptions {get;}
[C++]
public: __property ServiceDescriptionCollection*
   get_ServiceDescriptions();
[JScript]
public function get ServiceDescriptions() :
   ServiceDescriptionCollection;

プロパティ値

ServiceDescriptionCollection

解説

メモ   読み取り専用プロパティを形成するコレクションでは、コレクションにメンバを追加したり、コレクションからメンバを削除したり、コレクションによって公開されたメソッドを使用してメンバを変更したりできます。ただし、開発時にこのコレクションへメンバを追加する場合には、 AddServiceDescription メソッドの使用をお勧めします。

使用例

 
Dim myImporter As New ServiceDescriptionImporter()
' Add the ServiceDescription to the ServiceDescriptionImporter.
myImporter.AddServiceDescription(myServiceDescription, "", "")
Dim myCollection As ServiceDescriptionCollection = _
                                    myImporter.ServiceDescriptions
Console.WriteLine("Style : " + myImporter.Style.ToString())
' Get the XMLSchema related to the ServiceDescriptionImporter.
Dim mySchemas As XmlSchemas = myImporter.Schemas

If myCollection.Contains(myServiceDescription) Then
   Console.WriteLine("ServiceDescription is available, TargetNamespace: " + _
                      myServiceDescription.TargetNamespace)
Else
   Console.WriteLine("ServiceDescription is not available")
End If

[C#] 
ServiceDescriptionImporter myImporter = new ServiceDescriptionImporter();
// Add the ServiceDescription to the ServiceDescriptionImporter.
myImporter.AddServiceDescription(myServiceDescription, "", "");
ServiceDescriptionCollection myCollection = 
                             myImporter.ServiceDescriptions;
Console.WriteLine("Style : " + myImporter.Style.ToString());
// Get the XMLSchema related to the ServiceDescriptionImporter.
XmlSchemas mySchemas = myImporter.Schemas;

if (myCollection.Contains(myServiceDescription))
   Console.WriteLine("ServiceDescription is available, TargetNamespace: "
      + myServiceDescription.TargetNamespace);
else
   Console.WriteLine("ServiceDescription is not available");

[C++] 
ServiceDescriptionImporter* myImporter = new ServiceDescriptionImporter();
// Add the ServiceDescription to the ServiceDescriptionImporter.
myImporter->AddServiceDescription(myServiceDescription, S"", S"");
ServiceDescriptionCollection* myCollection =
   myImporter->ServiceDescriptions;
Console::WriteLine(S"Style : {0}",__box( myImporter->Style));
// Get the XMLSchema related to the ServiceDescriptionImporter.
myImporter->Schemas;

if (myCollection->Contains(myServiceDescription))
   Console::WriteLine(S"ServiceDescription is available, TargetNamespace: {0}", myServiceDescription->TargetNamespace);
else
   Console::WriteLine(S"ServiceDescription is not available");

[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 ファミリ

参照

ServiceDescriptionImporter クラス | ServiceDescriptionImporter メンバ | System.Web.Services.Description 名前空間